🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
2 messages
2 total messages Started by Howard Brenner Fri, 11 Sep 1992 13:58
Make bug?
#953
Author: Howard Brenner
Date: Fri, 11 Sep 1992 13:58
10 lines
695 bytes
This is rare, but it has happened to me twice.

In V2.1 of NeXTStep I was performing a make on my program when in the  
middle I realized I wanted to change a file.  I pressed CNTRL-C during the  
make and got the following message:
	<filename>.m removed

and sure enough my source file was gone!

Has anyone else run into this problem?
Re: Make bug?
#983
Author: Julie Zelenski
Date: Sat, 12 Sep 1992 02:20
76 lines
2912 bytes
In article <BuF2u0.EIC@monitor.com> howard@monitor.com (Howard Brenner)  
writes:
> This is rare, but it has happened to me twice.
> 
> In V2.1 of NeXTStep I was performing a make on my program when in the  
> middle I realized I wanted to change a file.  I pressed CNTRL-C during  
the  
> make and got the following message:
> 	<filename>.m removed
> 
> and sure enough my source file was gone!
> 
> Has anyone else run into this problem?

I can't watch innocent source files get eaten without wanting to help out.   
Here's the text from NextAnswers.736.   Be sure to put the PRECIOUS target  
in the *postamble* (SRCFILES isn't defined til after Makefile gets  
processed)

Julie Zelenski
Developer Support

make removes files

Q:  Every now and then, if I use control-c to interrupt a make(1), it  
decides to remove one of  my files.  I admit that my code isn't always the  
cleanest, but is my computer trying to tell me something?  Is there a cure  
for this? 

A:  There is a bug in make where it sometimes removes a source file  
instead of the target when interrupted.  Here is a script of one of those  
nasty interchanges between you and make:

hostname> make debug
^C*** `File.m' removed
*** Exit 2
Stop.

hostname> make debug
Make:  Don't know how to make File.m.  Stop.
*** Exit 1
Stop.

As a workaround, you can add the .PRECIOUS pseudo-target in your  
Makefile.postamble to protect yourself from this unwanted deletion.  (See  
below for more about .PRECIOUS)  It should depend on SRCFILES (which  
covers CFILES, MFILES, HFILES, nibs, tiffs, etc).
#
#  Make sure we don't remove anything by accident if 
#  interrupted at the wrong time.
#
PRECIOUS : $(SRCFILES)



About .PRECIOUS

make normally stops if any command it generates returns a non-zero exit  
code.  Before quitting, however, it removes the current target it is  
making.  The assumption here is that target is probably in a partly  
finished state.  If it were left in place, it would show as up-to-date in  
subsequent invocations of make, due to its now-revised date of last  
modification.  

There may be occasions when you do not want the target removed upon  
occurrence of errors.  The .PRECIOUS: pseudo-target allows you to specify  
any file you do not want destroyed.  For example., the description fie  
entry
	.PRECIOUS : target1 target2 target3
prevents any of the three named targets from being removed by make.  This  
entry can occur anywhere in the description file.

QA736

Valid for 1.0
Valid for 2.0
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads