Make(1) bug in SVR2
    Kent Forschmiedt 
    kent at happym.UUCP
       
    Sat Oct 29 06:33:15 AEST 1988
    
    
  
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 at happym.UUCP, tikal!camco!happym!kent, Happy Man Corp. USA 206-282-9598
    
    
More information about the Comp.bugs.sys5
mailing list