[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting variables for an included file only
From: |
Peter Simons |
Subject: |
Setting variables for an included file only |
Date: |
30 May 2003 13:56:53 +0200 |
Unfortunately, I couldn't find any clues in the (otherwise excellent!)
manual, so I'd really be grateful if somebody could help me with this
question:
I want to include several sub-makefiles from my top-level makefile,
but I need to overwrite some of the variables they define.
Unfortunately, I need to overwrite these variables with different
values for each sub-makefile! Since recursive make is not an option in
my case, I wonder whether GNU Make supports a construct like this:
| foo/GNUmakefile: CPPFLAGS=-I/somewhere
| bar/GNUmakefile: CPPFLAGS=-I/elsewhere
|
| include foo/GNUmakefile bar/GNUmakefile
I know I can specify per-target variables in newer makes, but can I
somehow specify an per-include variable as well?
If not, would it be very difficult to add this feature?
Peter