Date: Mon, 13 Oct 1997 14:36:16 +0200 (IST) From: Eli Zaretskii 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) Use the "override" directive in your Makefile, like so: override CFLAGS += -I$(INCLUDE_LIBS) This is all described in the Make manual; from the DOS prompt type "info make 'using variables' override" and read there. (Note the single quotes around 'using variables': they are important.)