Xref: utzoo comp.unix.questions:13550 comp.unix.ultrix:915 Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!voder!pyramid!prls!philabs!linus!mbunix!dsg From: dsg@mbunix.mitre.org (David S. Goldberg) Newsgroups: comp.unix.questions,comp.unix.ultrix Subject: A (hopefully) simple make question Keywords: make, debug Message-ID: <53121@linus.UUCP> Date: 11 May 89 17:58:21 GMT Sender: news@linus.UUCP Reply-To: dsg@mbunix.mitre.org (Goldberg) Organization: The MITRE Corporation, Bedford, Mass. Lines: 42 I am trying to find a way to change a macro without having to call the change on the command line. In Sun's make, there is a := operator that allows such changes, but the make in Ultrix 2.3 doesn't have this feature. One thing that has worked is to do a recursive make, but that doesn't seem as clean. I wonder if the :: operator, which I unfortunately can't find documented anywhere (the Sun man page has a little blurb on it, but nothing definitive - nothing in the tutorial or any of the Ultrix docs mentions it). I prefer to RTFM, but haven't been able to find this in any of the manuals I have. Basically what I want to do is this: CFLAGS = -I. -O OBJECTS= *.o # I won't bore you with the real filenames program: $(OBJECTS) cc $(CFLAGS) $(OBJECTS) -o program debug: # here I want to change CFLAGS to CFLAGS= -I. -g -DDEBUG and # force recompilation of the whole thing. I tried: make clean make CFLAGS="-I. -g -DDEBUG" program And that worked. It seems like there should be a better way. I remember a similar question being asked a while ago, but I unfortunately can't find any of those articles to see if they are relevant to my problem. I prefer not to generate a lot of net traffic with what seems (to my embarassment) a pretty basic problem so please mail any replies to dsg@mbunix.mitre.org or ...!linus!mbunix!dsg if you use UUCP. Thanks in advance for any help. Dave -------------------------------------------------------------------------- Dave Goldberg ARPA: dsg@mitre.org The Mitre Corporation UUCP: linus!mbunix!dsg MS B020 Bedford, MA 01730 617-271-2460