Date: Mon, 13 Oct 1997 11:52:27 -0400 (EDT) From: "Art S. Kagel" Reply-To: kagel AT ns1 DOT bloomberg DOT com To: Rik Blok Cc: djgpp AT delorie DOT com Subject: Re: updating command-line variables in make? In-Reply-To: <34403F98.699BFBAF@physics.ubc.ca> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sat, 11 Oct 1997, Rik Blok wrote: > I have a makefile with the line > > CFLAGS += -I$(INCLUDE_LIBS) > > and I sometimes want to call the makefile with CFLAGS preset > > make CFLAGS=-g > > but this seems to override CFLAGS instead of just initializing it. How > can I make this result in > > CFLAGS = -g -I$(INCLUDE_DIRS) In your makefile, initialize CFLAGS=$(CFINIT) and CFINIT=-O2 (or somesuch) then you can change the initial value of CFLAGS with: make CFINIT=-g and your append command will still work. Art S. Kagel, kagel AT bloomberg DOT com