BIN = /bin/sh Target = $(HOME)/bin/wisp Wlib = $(HOME)/lib/wisp Dirp = if [ ! -d $(dir) ]; then echo making $(dir); mkdir $(dir); fi; Dirs = $(HOME)/lib $(HOME)/lib/wisp $(HOME)/lib/wisp/string \ $(HOME)/lib/wisp/math $(HOME)/lib/wisp/os \ $(HOME)/lib/wisp/io $(HOME)/lib/wisp/list $(HOME)/lib/wisp/misc Bash = $(shell which bash) Rc = $(HOME)/etc/wisp/config/our_requirezrc all : hello gofun installdirs $(Target)/requirez install hello : @echo "making requirez ....... macros and libraries for gawk" gofun : ../gofun @cd $^ && make installdirs : @ $(foreach dir, $(Dirs), $(Dirp) ) install : theMainFile libs egs $(Rc) theMainFile : $(Target)/requirez $(Target)/requirez : bash/requirez (echo '#!' $(Bash); cat bash/requirez)> $(Target)/requirez; chmod +x $(Target)/requirez libs : strings maths lists miscs oss strings : cd lib/string && make -f ~/lib/wisp/MakeNewer prefix=$(Wlib)/string maths : @cd lib/math && make -f ~/lib/wisp/MakeNewer prefix=$(Wlib)/math lists : @cd lib/list && make -f ~/lib/wisp/MakeNewer prefix=$(Wlib)/list miscs : @cd lib/misc && make -f ~/lib/wisp/MakeNewer prefix=$(Wlib)/misc oss : @cd lib/os && make -f ~/lib/wisp/MakeNewer prefix=$(Wlib)/os egs : @cd eg && make $(Rc) : etc/our_requirezrc @cp $^ $@ ; chmod +x $@