IME, a good solution would be to have a GNUlocal.mk file that contains temporary stuff and is -include'd into the framework. One could then do something like:
# GNUlocal.mk foo.o: CFLAGS += -g
HTH, Noel
Robert P. J. Day wrote:
(since i'm on the road shortly, i figured i might as well push my luck and ask for feedback on one more idea i had to support a really customizable non-recursive make structure. and if you just happen to have done something like this in the past, hey, i'd definitely like to hear from you. i can't imagine this idea hasn't been re-invented about a bazillion times in the past already.)
recap: sizable, multi-level, build structure, which consists of several components at various levels; components which can be given names like "foo", "bar" and so on.
now, strictly from the top level Makefile, i want to be able to tweak any aspect of the build, including things like preprocessor, compile and link flags without messing with editing makefiles. it occurs to me that i can do something like this.
say i want to support the standard make variables like CPPFLAGS, CFLAGS, LDFLAGS, LDLIBS and so on. and, for the next build, i want to tweak the CFLAGS value for a single component, say "foo", but for absolutely no other component.
it seems that i can define a number of variables (and support them with some fairly straightforward macros) like:
export foo_CFLAGS= export foo_CFLAGS_APPEND= export foo_CFLAGS_PREPEND=
what those variables represent should be obvious -- when the makefile for the "foo" component is invoked, it checks for any variables with the prefix "foo" and processes them accordingly. and it seems like it would be easy to whip up a few macros to do the string processing.
thoughts? is this really as simple as it looks? or is there something i'm missing that makes this a bad idea? thanks.
rday
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
