# should always be first (for portability) SHELL=/bin/sh #### begin config stuff ##################### It=lifter Ext=awk # library stuff Lib="$(HOME)/lib/wisp/" Macros=requirez.m4 # general stuff Tmp=$(HOME)/tmp Bin=$(HOME)/bin/wisp Exe=$(Bin)/$(It) #### end config stuff ###################### # begin internal stuff. Src=$(It).$(Ext) all : dirs code examples dirs : if [ ! -d $(Bin) ]; then mkdir $(Bin); fi if [ ! -d $(Tmp) ]; then mkdir $(Tmp); fi code : $(Src) $(Macros) bash $(Src) | m4 -P --include=$(Lib) $(Macros) - > $(Exe) chmod +x $(Exe) examples : eg/Makefile cd eg && make audit : code cd $(Tmp) ; \ (printf "\n" | pgawk --profile --lint --dump-variables -f $(Exe); \ cat awkprof.out awkvars.out) 2>&1 | tee awkaudit.out | less check : cd eg && make check