# # # Name: vmworkshop/vm.marist.edu/track/makefile # # BASEURL = http://vm.marist.edu/track # "all" becomes the default target by appearing first all: index.fl code.fl @echo "$(MAKE):" @echo "$(MAKE): ignore 'Timestamp out of range' errors" @echo "$(MAKE):" cat index.fl code.fl | uniq | sort | uniq | xargs make # index for this archive (better than an auto-index of just the files) index.html: wget $(BASEURL)/index.html # the list of all files in this archive referenced in the "index" index.fl: index.html cat index.html \ | sed -r 's# +# #g' \ | tr A-Z a-z \ | sed 's#href=#\nhref=#g' \ | sed 's# index.t0 cat index.t0 | grep '^href=' > index.t1 cat index.t0 | grep '^# #g' | awk '{print $$1}' \ | sed 's#href=##' \ | sed 's#src=##' \ | uniq | sort | uniq \ > index.fl @rm index.t0 index.t1 index.t2 # the list of all files in this archive referenced in the "index" code.fl: code.html cat code.html \ | sed -r 's# +# #g' \ | tr A-Z a-z \ | sed 's#href=#\nhref=#g' \ | sed 's# code.t0 cat code.t0 | grep '^href=' > code.t1 cat code.t0 | grep '^# #g' | awk '{print $$1}' \ | sed 's#href=##' \ | sed 's#src=##' \ | uniq | sort | uniq \ > code.fl @rm code.t0 code.t1 code.t2 # for each item, the default rule is to us 'wget' under the base URL %: wget $(BASEURL)/$@ # a rule to clean things up clean: rm -f index.* code.* *.fl *';'* # a more aggressive rule to get rid of everything veryclean: rm -f index.* code.* *.fl *';'* \ *.html *.vmarc *.rexx *.exec *.module \ *.assemble *.zip *.jpg *.aws *.doc *.text \ *.read1st *.helpcms *.gif