GUIDES = $(wildcard */*guide) BAKLIST = $(wildcard */*~ *~ ../*~) FTPHOST = willers.employees.org STORIES = $(wildcard */*) SDIRS = $(patsubst %/,%,$(sort $(dir $(STORIES)))) DESTDIR = /users/ftp/mdb/ql-archive RSYNC = rsync -e ssh --delete -av #install: allsync install: sync install-dos install-aqc all: Story-Guide dos aqc clean: @echo rm -f $(BAKLIST) @-/bin/rm -f $(BAKLIST) sync: all $(RSYNC) . $(FTPHOST):$(DESTDIR)/alt.ql.creative allsync: all index cd ..;$(RSYNC) . $(FTPHOST):$(DESTDIR) Story-Guide: $(GUIDES) @-/bin/mv -f Story-Guide Story-Guide.bak @touch $@ @for f in $(GUIDES); do (cat $$f;echo "";echo "") >> $@; done @chmod go-w $@ @echo made $@ .PHONY: dos aqc dos-install install-aqc index index: Index-byname Index-byname: ls-lR.Z cd ..;./mkindicies ls-lR: cd ..;ls -lR > ls-lR ls-lR.Z: ls-lR cd ..;compress < ls-lR > ls-lR.Z dos: cd ..;./update-dos-aqc.perl install-dos: dos cd ..;$(RSYNC) dos-aqc/. $(FTPHOST):$(DESTDIR)/dos-aqc/. aqc: cd ..;./update-aqc.perl; install-aqc: aqc cd ..;$(RSYNC) aqc/. $(FTPHOST):$(DESTDIR)/aqc/. missing: @echo The following stories are missing guides:; \ for d in $(SDIRS); do \ if [ ! -f $$d/$$d.guide ]; then \ echo $$d/$$d.guide; \ grep '^From:' $$d/$$d.p01; \ echo ""; \ fi \ done