Mail Archives: djgpp/1997/09/30/09:21:30
On Tue, 30 Sep 1997, Peter Palotas wrote:
> How would I go about it if I wanted the user to be able to provide two
> arguments to the makefile, and the makefile (or make utility) would then
> select two (or more) header-files, based on the two arguments provided, and
> merge them into a third one.
This is explained very clearly and in great detail in the Make on-line
manual; you really should read it.
In short, if you say something like this:
make VAR1=foo VAR2=bar
then you can access variables VAR1 and VAR2 inside the Makefile as usual
Mak variables. For example:
ifeq ($(VAR1),foo)
do something useful
endif
(Of course, there's no requirement that the name of the variable should
be in upper case.)
- Raw text -