🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Kent Forschmiedt Fri, 28 Oct 1988 20:33
Make(1) bug in SVR2
#907
Author: Kent Forschmiedt
Date: Fri, 28 Oct 1988 20:33
48 lines
1828 bytes
Make did a very evil thing.  I had created a circular dependency in my 
makefile, and was using make -d to find it.  A condensed version, 
showing my mistake, follows. 

There are about 35 object files in the library that it was building. 
There is an odd rule for one of the objects, because part of its source 
is generated by another program.  I had accidentally made the program 
dependent on the library, thus creating the circle. 

In the context of the example below, $(LIB)(file1.o) was not up to date 
realtive to s.file1.c, and $(LIB)(file2.o) was up to date. 

I was watching it go, using ^S/^Q to stop and start it, until I found 
the problem, then hit ^C (DEL, for purists) to stop it.  I couldn't see 
what it was doing when I did that, since ^C flushes the tty output 
buffer. 

It said "*** s.file2.c removed ***" !!!

And it was true!


LIBOBJ = $(LIB)(file1.o) $(LIB)(file2.o)

# file1.c #includes x.i
$(LIB)(file1.o): file1.c funnycmd
	funnycmd >x.i
	$(CC) -c $(CFLAGS) file1.c
	ar rv $(LIB) file1.o
	rm -f file1.o

funnycmd: $(LIB)

.c.a:
	$(LINT) $(LINTFLAGS) -u -lm -Ldb -c $<
	$(CC) $(CFLAGS) -c $<
	ar rv $@ $*.o
	rm -f $*.o

.c~.a:
	$(GET) $(GFLAGS) -p $< > $*.c
	$(LINT) $(LINTFLAGS) -u -lm -Ldb -c $*.c
	$(CC) -c $(CFLAGS) $*.c
	ar rv $@ $*.o
	rm -f $*.[co]
-- 
  kent@happym.UUCP, tikal!camco!happym!kent, Happy Man Corp. USA 206-282-9598
Re: Make(1) bug in SVR2
#900
Author: Chris Bertin
Date: Sat, 05 Nov 1988 17:18
26 lines
1159 bytes
In article <555@happym.UUCP>, kent@happym.UUCP (Kent Forschmiedt) writes:
> I was watching it go, using ^S/^Q to stop and start it, until I found 
> the problem, then hit ^C (DEL, for purists) to stop it.  I couldn't see 
> what it was doing when I did that, since ^C flushes the tty output 
> buffer. 
> 
> It said "*** s.file2.c removed ***" !!!
> 
> And it was true!

The same thing happened to me several years ago. I didn't want to chase the
bug, so I edited main.c and added:

	&& !sdot(p)

to the list of removal conditions in the intrupt() routine. For those without
sources, 'sdot(p)' checks if 'p' is an 's.' file.

I wonder how many flames will cross the Atlantic... -:)

Chris
-- 
Chris Bertin	| CETIA
		| 150, Av Marcelin Berthelot, Z.I. Toulon-Est
+33(94)212005	| 83088 Toulon Cedex, France
Ext: 239	| inria!cetia
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