From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2bfffd778090b54f X-Google-Attributes: gidfee84,public From: Craig Neth USG Subject: Re: DU 4.0B make/ld doesn't delete target Date: 1997/10/13 Message-ID: <344266D3.15FB@zk3.dec.com>#1/1 X-Deja-AN: 280277394 References: <343A6D93.B8274E3A@alumni.cse.ucsc.edu> Organization: Digital UNIX Development Environment Group Newsgroups: comp.unix.osf.osf1 Dylan Salisbury wrote:> > After a link error during a make, I end up with the partially linked > executable remaining! It's my understanding that make should always > delete a failed target unless the .PRECIOUS special target is specified, > correct? > > Are there any flags or commands I can use to get around this problem > without switching development tools? If not, I'd love recommendations > for the next-least-painful solution (which I imagine is to go GNU?) I've never heard of a make rule that it delete a failed target but I'm no expert on make. What I _have_ seen is lots of makefiles that look like this: foo: $(foo_OBJS) cc -o $@.X $(foo_OBJS) mv $@.X $@ I.e. they link into a temporary target and then move it to real target. If the link fails, the 'mv' won't be executed. -- ------------------------------------------------------------------------------- Craig Neth ! neth@zk3.dec.com DIGITAL Equipment Corporation ! 110 Spit Brook Road ZKO2-3/W17 ! Nashua, NH 03062 ! Opinions expressed herein are my own. ===============================================================================