TEMPLATES = template.hitop defs.hitop iain.nav sample.hitop majik.hitop \ holiday/diary.hitop holiday/photo.hitop holiday/captions.hitop \ gallery/defs.hitop HITOP = hitop MKPHOTODEP = scripts/mkphotodep.pl MKCAPTIONS = scripts/mkcaptions.pl MKPATCH = scripts/mkpatch.sh MKLINKS = scripts/mklinks.pl MKLINES = scripts/mklines.pl MCLAST = mc/mc.pl -qc GENTHUMBNAIL = scripts/genphoto.pl GENPHOTO = scripts/genphoto.pl SORTHITOPFILES = scripts/sorthitopfiles.pl HITOPPATH = .:gallery:gallery/Ducks:gallery/EasterPeople2004:gallery/Reception:gallery/Wedding:holiday:holiday/Barcelona:holiday/Europe:holiday/France:holiday/Oz:holiday/Russia:holiday/Wales:spam:tv LIVEFILES = $(shell $(SORTHITOPFILES) $(subst ./,,$(wildcard $(patsubst %,%/*.live,$(subst :, ,$(HITOPPATH)))))) # This searchs the HITOPPATH for .live files and does some pathname demangling. # Trust me, it works. HTMLFILES = $(LIVEFILES:.live=.html) CLEANFILES = $(HTMLFILES) holiday/photo.dep SPOTLESSFILES = holiday/captions.hitop majik.hitop \ $(wildcard holiday/photos/*.gif) \ $(wildcard holiday/photos/*.jpg) all: site site: majik $(HTMLFILES) majik: holiday/photo.dep holiday/captions.hitop majik.hitop majik.hitop: $(MKLINES) > $@ %.html: %.live $(TEMPLATES) $(HITOP) $< $@ %.gif: $(GENTHUMBNAIL) $@ %.jpg: $(GENPHOTO) $@ mc/cgi.html: mc/cgi.hitop MC.nav MC.nav: iain.nav perl -pe "s/\Qmc.cgi\E/cgi.html/" $^ > $@ cron: -$(RM) majik.hitop $(MAKE) site links: $(MKLINKS) perms: find -type d -print0 | xargs -0 chmod 755 find -type f -print0 | xargs -0 chmod 600 find -name \*.pl -print0 | xargs -0 chmod 700 find -name \*.cgi -print0 | xargs -0 chmod 755 find -name \*.sh -print0 | xargs -0 chmod 700 -find -name \*.gif -print0 | xargs -0 chmod 644 -find -name \*.xcf -print0 | xargs -0 chmod 644 -find -name \*.jpg -print0 | xargs -0 chmod 644 -find -name \*.html -print0 | xargs -0 chmod 644 chmod 644 Makefile iain.css hidden/project.tar.bz2 nav/colours \ lbw/markers address/book chmod 755 address/drab -chmod 700 junk working scripts rsync: rsync -PCauvz --delete -e ssh --exclude .xvpics --exclude .thumbnails --exclude private --exclude '*.tif' --exclude www.fusion21.co.uk.log.hitop --exclude panorama . fof:public_html tar: tar cvf working/current.tar . --exclude junk \ --exclude working --exclude working/current.tar \ --exclude photos --exclude address --exclude mc \ --exclude hidden echo: @echo $(HTMLFILES:%.html=%) patch: $(MKPATCH) clean: -$(RM) $(CLEANFILES) holiday/photo.dep -find -name \*~ -print0 | xargs -0 rm spotless: clean -$(RM) $(SPOTLESSFILES) holiday/photo.dep: $(filter holiday/%,$(HITOPFILES)) $(MKPHOTODEP) -p holiday/photos/ $^ > $@ # holiday/captions.hitop: holiday/photo.titles # $(MKCAPTIONS) holiday/photo.titles > $@ -include holiday/photo.dep .PHONY: all clean spotless site perms tar patch links majik echo