Follow-up Comment #4, bug #47880 (project make): > 5. Introduce a command line switch to allow the user to remove the default include directories. https://savannah.gnu.org/bugs/?60412. I was hoping to avoid adding a new command line switch. In general I don't like them, plus we may need them for something else, plus having things on the command line means that the behavior isn't encapsulated in the makefile itself which is not great for many reasons.
So what I was hoping is that if this issue could be addressed then we wouldn't need bug #60412. > 2. Allow the makefile to modify the search path through adding -I<path> to MAKEFLAGS. https://savannah.gnu.org/bugs/?58341. This is, unfortunately, not good enough to do what you suggest here. The problem is that MAKEFLAGS is only parsed once before all makefiles are read, and again after all makefiles are read. It is not re-parsed every time it is updated: see bug #45211 (enhancement). That means it's unsuitable for resetting -I since by the time it's reparsed all included files have already been read in. > Could be a problem. make tests use this feature. Users may use it as well. Make tests _test_ this feature; obviously if it were changed the tests would change to match the new behavior. But users may be using it, I agree. That's especially true since up until now you couldn't learn the -I options by examining MAKEFLAGS so looking at .INCLUDE_DIRS was the only way to see them. I can't speculate on how many peoples' makefiles care to examine the value of the -I options or why they might do so. I'm sure it's rare but I can't say no one does it. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?47880> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/