use MAKEFILE_LIST to get the name of the top make file#130
Conversation
this way we dont assume the make file is 'Makefile' so it will work if named 'makefile'
|
not sure this is worth the effort - its pretty standard to have all makefiles called "Makefile" |
|
No big deal if you don't want this, just throwing it out there. I haven't made a habit of keeping track of how often I see 'makefile' vs 'Makefile' in projects, but the gnu make docs list 'makefile' as valid: http://www.gnu.org/software/make/manual/html_node/Makefile-Names.html Not sure if there is a more canonical source for "standardness" regarding make files. |
|
@sej7278 I agree that it is pretty standard to call makefiles as "Makefile", but since this pull request is going to be backward compatible and also removes a hardcoded value, I am thinking of merging it. But before that, I want to fully understand your concern as well. Any specific reason why you don't want this to be merged. |
|
It's not entirely uncommon to add postfixes to the Makefile names, e.,g Makefile.uno could be an example in this context (and then run with Regarding the actual pull request: Does it make sense to take just the first word out of MAKEFILE_LIST? Why not just take all? As an added bonus, your sketches will be recompiled when you pull a new version of Arduino-Makefile, which seems like a good idea to me? |
|
nothing really against it, just didn't see the point, i was a little concerned about firstword as matt says, and also case-insensitive filesystems like on windows |
|
@sej7278 @matthijskooijman I agree that just using firstword might not be a good idea and we can take in all. Let me test it in a couple of scenarios to see whether including all will have any issues or not. |
|
Just merged it. I also edited the commit so that we use all of |
While using Arduino-Makefile, I had some trouble getting it to work because my make file was called 'makefile'. This commit uses MAKEFILE_LIST to get the name of the top make file so it will work with any capitalization.