Il 27/11/2012 17:49, Markus Armbruster ha scritto:
>>> +%/translate.o: CFLAGS := $(patsubst -O2,-O1,$(CFLAGS))
>>> +
>>
>> This may change some string argument in CFLAGS, for example an argument
>> to -I.
>>
>> How about:
>>
>>   CFLAGS_opt = -O2
>>   CFLAGS += $(CFLAGS_opt)
>>   ...
>>   %/translate.o: CFLAGS_opt = -O1
> 
> Just append -O1 to CFLAGS; the last -O wins.

But you don't want to override -O0...

Anyhow, v2 was posted and does it in a different, more fine-grained manner.

Paolo


Reply via email to