# See COPYING file for copyright, license and warranty details. SITENAME=http://njw.me.uk FOAF=http://njw.me.uk/card\#i MD=smu RSS=index.ttl BIB=publications/index.ttl BIBTXT=publications/index.txt PAGES=$(shell find . -name '*.txt' ! -name 'robots.txt' ! -name $(RSS)) $(BIBTXT) PUBS=$(shell find ./publications/ -name '*.txt' ! -name 'index.*') EXTRAS=$(shell find . -name '*.css') card.ttl TARGETS=$(PAGES:.txt=.xml) $(RSS) $(BIBTXT) GZIP=$(PAGES:=.gz) $(TARGETS:=.gz) $(EXTRAS:=.gz) $(BIB:=.gz) all: $(TARGETS) $(GZIP) $(TARGETS): includes/header.xml includes/footer.xml $(RSS): $(PAGES) echo making $@ sh makerss.sh $(SITENAME) $(FOAF) $* > $@ publications/index.txt: $(BIB) echo making $@ sh bibtotxt.sh $< > $@ .txt.xml: echo making $@ sed "s/TITLE/`head -n 1 < $<`/" < includes/header.xml > $@ $(MD) $< >> $@ sed "s/MODDATE/`ls -lc --time-style=+%Y-%m-%d $<|awk '{print $$6}'`/" < includes/footer.xml >> $@ .tex.pdf: echo making $@ pdflatex -output-directory $(shell dirname $<) $*.tex rm $*.aux $*.log $*.out # not POSIX compatible %.gz: % echo compressing $< gzip < $< > $@ clean: rm -f -- $(TARGETS) $(GZIP) .SUFFIXES: .txt .xml .rdf .pdf .tex .gz .SILENT: