On Wed, 2014-06-11 at 13:45 -0400, Paul Smith wrote:
> Unfortunately in older versions of make the option and argument
> are left as two separate words:
> 
>   $ echo 'a:;: $(MAKEFLAGS)' | make-3.81 -f- -I/usr/include -I/bin
>   : I /usr/include -I /bin
> 
> which makes it much more difficult to remove them.

Sorry, pushed send too soon.

One idea would be something like this:

  MAKEFLAGS := $(filter-out -,$(filter-out -I%,$(subst -I ,-I,-$(MAKEFLAGS)))

which is gross for sure but should work.


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to