From: Rik Blok Newsgroups: comp.os.msdos.djgpp Subject: updating command-line variables in make? Date: Sat, 11 Oct 1997 20:10:16 -0700 Organization: Lynx Internet Lines: 24 Message-ID: <34403F98.699BFBAF@physics.ubc.ca> NNTP-Posting-Host: lynx1042.lynx.bc.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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) I'm new to make and any help would be appreciated. Rik Blok P.S. Is it possible to copy an implicit rule? For example, is there a generic way to copy the rule for %:%.o to %.exe:%.o? -- Rik Blok Department of Physics and Astronomy, University of British Columbia, Canada http://www.physics.ubc.ca/~blok