diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -2,12 +2,14 @@ SITENAME=http://njw.me.uk FOAF=http://njw.me.uk/card\#i -MARKDOWN=smu +MD=smu RSS=index.ttl +BIB=publications/index.ttl PAGES=$(shell find . -name '*.txt' ! -name 'robots.txt' ! -name $(RSS)) +PUBS=$(shell find ./publications/ -name '*.txt' ! -name 'index.*') EXTRAS=$(shell find . -name '*.css') card.ttl -TARGETS=$(PAGES:.txt=.xml) $(RSS) +TARGETS=$(PAGES:.txt=.xml) $(RSS) # $(PUBS:.txt=.pdf) GZIP=$(PAGES:=.gz) $(TARGETS:=.gz) $(EXTRAS:=.gz) all: $(TARGETS) $(GZIP) @@ -18,12 +20,21 @@ $(RSS): $(PAGES) makerss.sh echo making $@ sh makerss.sh $(SITENAME) $(FOAF) $* > $@ +publications/index.txt: $(BIB) bibtotxt.sh + echo making $@ + sh bibtotxt.sh $(BIB) > $@ + .txt.xml: echo making $@ sed "s/TITLE/`head -n 1 < $<`/" < includes/header.xml > $@ - $(MARKDOWN) $< >> $@ + $(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 $< @@ -32,5 +43,5 @@ $(RSS): $(PAGES) makerss.sh clean: rm -f -- $(TARGETS) $(GZIP) -.SUFFIXES: .txt .xml .rdf .gz +.SUFFIXES: .txt .xml .rdf .pdf .tex .gz .SILENT: |