smd@rehder.larc.nasa.gov (Steve Dahmen) (03/27/91)
After diligently scanning the blessed manpage for Pmake, i am at wits end trying to get my pmake file to function correctly. Here's the problem. I am keeping both a library (libsmart.a) and an executable (smart) up to date. The library is basically all the .o files used in the executable, to be used by developers when linking their own test versions, etc. Most everything works fine. The odd thing happens when I make a change to a source (.c) file. When I invoke pmake, it compiles the .c file correctly, and changes the archive, but then tells me that my executable is "up to date", but I (think) I have my executable depending on the library file. When it exits, I can then reinvoke "pmake Smart", and it compiles my executable appropriately. How can I get it to do it in the same invocation of pmake? Here's the abbreviated makefile.... email is fine/preferred. =================== # $SMART and $PROJ are environmental variables #PROJ = $(SMART) # where you want the smart executable INSTALLDIR = $(SMART) # where you want the library put LIBDIR = $(SMART) .PATH : $(PROJ)/code .PATH.h : $(PROJ)/code/include $(PROJ)/code/datastruc .LIBS: .a .PATH.a : $(LIBDIR) LIB= libsmart.a OBJS = an_node.o\ curves.o\ popup.o\ bezier_link.o\ reset_tree.o\ dim_node.o .... etc. CFLAGSD = -c -g $(.INCLUDES) LDFLAGS = -t $(.LIBS) -lsmart -lgl_s -lgutil -limage -lm -g .c.o : $(CC) $(CFLAGSD) $(.IMPSRC) -o $(.TARGET) ${LIB}: ${LIB}($(OBJS)) Smart: ${LIB} $(CC) $(LDFLAGS) -o Smart strip Smart # for those compiles where you know all is ok. force: $(CC) $(LDFLAGS) -o Smart strip Smart install: Smart # pmake Smart ln $(LIB) $(LIBDIR) ln Smart $(INSTALLDIR)/smart .o.a: ... ar cru ${LIB} $(.OODATE) rm -f $(.OODATE) continuing with all the individual dependencies for the .o files, not listing special commands to make them. -- -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* Steve Dahmen, Systems Analyst (804) 864-4519 (W) M/S 365, NASA Langley Research Center Hampton, Virginia 23665 smd@rehder.larc.nasa.gov