#awk source files, colon separated Sources=util.awk:table.awk:effort.awk:risk.awk:defects.awk:mohawk.awk# Gawk=/usr/local/bin/gawk# Pgawk=/usr/local/bin/pgawk# Here=$(PWD)# Tmp:=$(Here)/tmp #What data to use Dataset:=#default dataset (no spaces here, please) Datadir:=$(Here)/data/# Data:=$(Datadir)$(Dataset)# #profiling output options Timestamp=$(shell date '+%m.%d.%y-%H:%M:%S.%N') Profout=$(Tmp)/profile-$(Dataset)-$(Timestamp).out Vardump=$(Tmp)/vars-$(Dataset)-$(Timestamp).out #What to run Src= -f $(subst :, -f ,$(Sources))# Run= $(Gawk) $(Src) #$(Data) Debug= $(Pgawk) --dump-variables=$(Vardump) --profile=$(Profout) $(Src) $(Data) Profile= $(Pgawk) --profile=$(Profout) $(Src) $(Data) Test= $(Gawk) -f testit.awk $(Testdir)/$(T) testfile=$(T) tmpdir=$(Tmp) #How to test what you run Testdir=$(Here)/eg Alltests:=$(shell cd $(Testdir); ls | egrep '^.*eg$$' | sort -n ) T=pipe.eg#default test to run (no spaces please) main : awk all awk : $(Gawk) -W version all : $(Run) run : $(Run) debug : echo Debuggin\' $(Debug) profile : echo Profilin\' $(Profile) test : $(Test) tests:; @$(foreach x, $(Alltests), $(MAKE) -s T=$x test;) clean : rm -f $(Tmp)/*.out rm -f $(Tmp)/*.got