Skip to content

Recursive compilation #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Recursive compilation #116

wants to merge 1 commit into from

Conversation

lestofante
Copy link

With this patch, the special case of the "utility" folder in compilation is removed.
In fact now the IDE will be compliant to standard, and will copy recursively all file to compiled keeping the folder structure.
Also changed all library #include to be compliant with the standard.

Now you can import and export complex library and give a logical organization of your code's file.

TODO: The source in the sketch sub-folder will remain inaccessible from the IDE, I'll fix that soon with another patch

copyRecursively(avrBasePath, libraryFolder, buildPath, objectFiles, includePaths, boardPreferences);
}

/*
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zombie code, can be safety removed

@cmaglie
Copy link
Member

cmaglie commented Nov 19, 2012

lestofante,

how does this patch impact on old libraries?
They should change #inlcude <something.h> to #include <utility/something.h>?
The old libraries must work without modifications, we can't pull a patch that brokes a lot of libraries out there.
Maybe we can keep including just the "utility" folder in the build path?

may you port this patch to 1.5?

@lestofante
Copy link
Author

yes, they should change #include <something.h> to #include
<utility/something.h>, but it is already done in this patch, because the
include witch have to be changed are INSIDE the library and will not affect
user's sketch or other library.
I've compiled all test example without any modification as test, and
everything just work.

i'll take a look to port the code.

2012/11/19 Cristian Maglie [email protected]

lestofante,

how does this patch impact on old libraries?
They should change #inlcude <something.h> to #include
<utility/something.h>?
The old libraries must work without modifications, we can't pull a patch
that brokes a lot of libraries out there.
Maybe we can keep including just the "utility" folder in the build path?

may you port this patch to 1.5?


Reply to this email directly or view it on GitHubhttps://github.com//pull/116#issuecomment-10511168.

@cmaglie
Copy link
Member

cmaglie commented Nov 19, 2012

I was talking about 3rd party libraries, many authors have found their way to circumvent this limitation, and I see that frequently they put some extra folders with documentation, diagrams etc.

For example:

https://github.com/billroy/bitlash

What happens if you try to compile this one?

@lestofante
Copy link
Author

looking at their code it is strange it can compile without this patch!
as you can see here
https://github.com/billroy/bitlash/blob/master/bitlash.cpp
it import src/*.c but with current IDE it should be only *.c and all src
file should be moved in the same folder of bitlash.cpp...

2012/11/19 Cristian Maglie [email protected]

I was talking about 3rd party libraries, many authors have found their way
to circumvent this limitation, and I see that frequently they put some
extra folders with documentation, diagrams etc.

For example:

https://github.com/billroy/bitlash

What happens if you try to compile this one?


Reply to this email directly or view it on GitHubhttps://github.com//pull/116#issuecomment-10512620.

@billroy
Copy link

billroy commented Nov 19, 2012

It may be strange, but it has been compiling successfully since 2008, and it would be a shame to break such a long run.

Best regards,

-br

On Nov 19, 2012, at 6:23 AM, lestofante wrote:

looking at their code it is strange it can compile without this patch!
as you can see here
https://github.com/billroy/bitlash/blob/master/bitlash.cpp
it import src/*.c but with current IDE it should be only *.c and all src
file should be moved in the same folder of bitlash.cpp...

2012/11/19 Cristian Maglie [email protected]

I was talking about 3rd party libraries, many authors have found their way
to circumvent this limitation, and I see that frequently they put some
extra folders with documentation, diagrams etc.

For example:

https://github.com/billroy/bitlash

What happens if you try to compile this one?


Reply to this email directly or view it on GitHubhttps://github.com//pull/116#issuecomment-10512620.


Reply to this email directly or view it on GitHub.

@lestofante
Copy link
Author

I'll try when i'll back home later

2012/11/19 Bill Roy [email protected]

It may be strange, but it has been compiling successfully since 2008, and
it would be a shame to break such a long run.

Best regards,

-br

On Nov 19, 2012, at 6:23 AM, lestofante wrote:

looking at their code it is strange it can compile without this patch!
as you can see here
https://github.com/billroy/bitlash/blob/master/bitlash.cpp
it import src/*.c but with current IDE it should be only *.c and all src
file should be moved in the same folder of bitlash.cpp...

2012/11/19 Cristian Maglie [email protected]

I was talking about 3rd party libraries, many authors have found their
way
to circumvent this limitation, and I see that frequently they put some
extra folders with documentation, diagrams etc.

For example:

https://github.com/billroy/bitlash

What happens if you try to compile this one?


Reply to this email directly or view it on GitHub<
https://github.com/arduino/Arduino/pull/116#issuecomment-10512620>.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//pull/116#issuecomment-10516682.

@damellis
Copy link
Contributor

I agree with Cristian that it's important to keep the special case for the
utility folder to maintain compatibility with existing libraries.

On Mon, Nov 19, 2012 at 10:24 AM, lestofante [email protected]:

I'll try when i'll back home later

2012/11/19 Bill Roy [email protected]

It may be strange, but it has been compiling successfully since 2008,
and
it would be a shame to break such a long run.

Best regards,

-br

On Nov 19, 2012, at 6:23 AM, lestofante wrote:

looking at their code it is strange it can compile without this patch!
as you can see here
https://github.com/billroy/bitlash/blob/master/bitlash.cpp
it import src/*.c but with current IDE it should be only *.c and all
src
file should be moved in the same folder of bitlash.cpp...

2012/11/19 Cristian Maglie [email protected]

I was talking about 3rd party libraries, many authors have found
their
way
to circumvent this limitation, and I see that frequently they put
some
extra folders with documentation, diagrams etc.

For example:

https://github.com/billroy/bitlash

What happens if you try to compile this one?


Reply to this email directly or view it on GitHub<
https://github.com/arduino/Arduino/pull/116#issuecomment-10512620>.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/arduino/Arduino/pull/116#issuecomment-10516682>.


Reply to this email directly or view it on GitHubhttps://github.com//pull/116#issuecomment-10517388.

@ffissore
Copy link
Contributor

feature added in #1152

@ffissore ffissore closed this Jan 28, 2013
tbowmo pushed a commit to tbowmo/Arduino that referenced this pull request Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants