I have '-Wredundant-decls' in my CXXFLAGS but for one file, I want it removed.
In my GNU makefile, how can I structure a rule to remove just that part of the CXXFLAGS.
I know how to add only for that file, I would do something like this:
$O/just_one_file.o: CXXFLAGS += -Wredundant-decls
So, ideally I'd do something like this (which doesn't work) to remove it:
$O/just_one_file.o: CXXFLAGS -= -Wredundant-decls
However, maybe with some $ magic, I can construct some kind of sed or perl script to strip out the -Wredundant-decls and set CXXFLAGS to the stripped value:
$O/just_one_file.o: CXXFLAGS = $(shell strip magic here for $CXXFLAGS)