#### # # This Makefile defines rules for testing list and string classes in the # support project. It will be exapanded as new support classes are added. # # # Define the location of the generic project Makefile.vars and include it. # MAKEFILEVARSDIR = ../../implementation/source/c++ include $(MAKEFILEVARSDIR)/Makefile.vars # # Override def of PLATFORM. # PLATFORM = SUN4T-work-work # # Define object file and source file paths. # STROBJS = \ $(IMPLEOBJDIR)/str.o STRLISTOBJS = \ $(IMPLEOBJDIR)/list.o \ $(IMPLEOBJDIR)/strlist.o \ $(IMPLEOBJDIR)/str.o INTLISTOBJS = \ $(IMPLEOBJDIR)/list.o \ $(IMPLEOBJDIR)/intlist.o STRLISTTESTOBJS = \ $(STRLISTOBJS) strlist-test.o INTLISTTESTOBJS = \ $(INTLISTOBJS) intlist-test.o STRTESTOBJS = \ $(STROBJS) str-test.o SRCS = \ $(IMPLEDIR)/*.C \ $(TESTDIR)/*.C DEPENDSRCS = $(SRCS) # # Execute test scripts, save results, and compare results with last good # results. By convention, rules ending in "-testing" do this. # all-testing: list-testing str-testing list-testing: list-output list-diffs str-testing: str-output str-diffs # # Execute test scripts and save output results. By convention, rules ending in # "-output" do this work. # list-output: strlist-test intlist-test @csh -q -c "source .make-list-output" str-output: str-test @csh -q -c "source .make-str-output" # # Compare current output results with last good results. By convention, rules # ending in "-diff" do this work. # list-diffs: @csh -q -c "source .make-list-diffs" str-diffs: @csh -q -c "source .make-str-diffs" # # Make the current output results the good results. By convention, rules # ending in "-good" so this work. # # NOTE WELL: 'make good' should only be performed after thorough analysis of # current output results to ensure that they are absolutely correct. # good: list-good str-good list-good: @csh -q -c "source .make-list-good" str-good: @csh -q -c "source .make-str-good" # # Compile the testing scripts. By convention, rules ending in "-test" do this # work. # strlist-test: $(STRLISTTESTOBJS) $(CC) $(LDFLAGS) $(STRLISTTESTOBJS) $(LIBS) \ -o strlist-test intlist-test: $(INTLISTTESTOBJS) $(CC) $(LDFLAGS) $(INTLISTTESTOBJS) $(LIBS) \ -o intlist-test str-test: str-test.o str.o $(CC) $(LDFLAGS) $(STRTESTOBJS) $(LIBS) \ -o str-test # # Force a remake of any implementation file, if necessary. This is a # convenience during the course of testing. I.e., if a bug is detected during # testing, the implementation fix can be made, and then make can be rerun in # the testing dir, without having to run it separately in the implementation # dir. # # If interested, see the 25jun97 entry in the enchilada LOG file for a # discussion of the structure of this rule. # %.o: $(IMPLEDIR)/%.C # @echo "in % rule" $(CC) $(CFLAGS) $< -o $(IMPLEOBJDIR)/$@ rm -f $@ ln -s $(IMPLEOBJDIR)/$@ . # # The following rule is an attempt to accomplish what the preceding rule # accomplishes, only here without the sym link. For some unknown reason it # does not work. Again, see the LOG file for a bit more discussion. #$(IMPLEOBJDIR)/%.o: # $(CC) $(CFLAGS) -c -o $< $@ # DO NOT DELETE THIS LINE -- make depend depends on it.