chris@lxn.chi.il.us (Christopher D. Orr) (01/11/90)
I am trying to get the following Makefile to keep a library up to date. The problem I am having is that GNU Make continually rebuilds entries into the library regardless if the source file has changed or not. As you can probably tell by the implicit rules defined below, I have the source RCS'd and want to keep it there. This makefile checks out the source, compiles a .o file, adds it to the library, then deletes the .o and source file. Can somebody PLEASE tell me why GNU make wants to repeatedly recompile every source file and add it into the archive!?!??!?!? *-*-*-*-*-*-*-*-*-*-*-*-*- CUT HERE *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- #*----------------------------------------------------------------------*# # Define Usable Variables #*----------------------------------------------------------------------*# L = THELIB D = /usr/product/RCS/THELIB I = /usr/product/INCLUDE CFLAGS = -O -I$(I) #*----------------------------------------------------------------------*# # Archive Dependencies #*----------------------------------------------------------------------*# $L: $L(ttyinit.o) $L(ttyspeed.o) $L(ttyraw.o) $L(ttysane.o) \ $L(str2dol.o) $L(stralnum.o) $L(strapp.o) $L(strdigit.o) \ $L(strpad.o) $L(strrpt.o) $L(strscn.o) $L(strsuff.o) \ $L(strtrim.o) $L(strunc.o) $L(strupr.o) $L(strzform.o) #*----------------------------------------------------------------------*# # Implicit Rules that do the real work #*----------------------------------------------------------------------*# (%.o): $(D)/%.c,v $(CO) $(D)/$*.c,v $(CC) -c $(CFLAGS) $(CPPFLAGS) $*.c $(AR) $(ARFLAGS) $@ $*.o rm -f $*.o $*.c *-*-*-*-*-*-*-*-*-*-*-*-*- CUT HERE *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- -- Christopher D. Orr | WISE OLD SAYING: UUCP: {edsews,lehi3b15}!lxn!chris | Subtlety is the art of saying what you or chris@lxn.chi.il.us | think and getting out of the way or chris%lxn@clout.chi.il.us | before it is understood.