[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: removing compile directive
From: |
Brian Dessent |
Subject: |
Re: removing compile directive |
Date: |
Mon, 21 Apr 2008 10:43:12 -0700 |
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