www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/30/09:21:30

Date: Tue, 30 Sep 1997 15:18:12 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Peter Palotas <blizzar AT hem1 DOT passagen DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: Makefile question.
In-Reply-To: <3.0.16.19970930115822.28f79e60@hem1.passagen.se>
Message-ID: <Pine.SUN.3.91.970930151312.6404C-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019