Mohan Lal Jangir wrote:
> Is there a way to remove compile directive? Something
like this
>
> CFLAGS -= -D_REMOVE_THIS_
>
> I have a source tree being compiled with -O2 option.
However, for debugging
> purpose, I want all files in one directory to compile
without -O2. However,
> Makefile in that directly takes CFLAGS from a parent
Makefile which I can
> not modify !!
CFLAGS = $(filter-out -D_REMOVE_THIS_,$(CFLAGS))
The filter-out function can also take %-style wildcards as
well as
multiple (space separated) patterns, if you need that.
Brian
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|