URL = http://www.cs.princeton.edu/~dwallach/simple-pp URL_DIR = $(HOME)/public_html/simple-pp TARGETS = sample sample.html simple-pp-docs simple-pp-docs.html SIMPLE_PP_DEFS = -define MY_SITE=$(URL) .SUFFIXES: .xhtml .html .xhtml.html: simple-pp $(SIMPLE_PP_DEFS) -define html -output $@ $< # # note how simple-pp runs *twice* -- the first pass generates # two output files and the second pass puts them back together again, # after lynx has finished formatting the document. Unfortunately, # lynx cannot be convinced to take HTML input from stdin, so we # need to use this tmp.html file. # .xhtml: simple-pp $(SIMPLE_PP_DEFS) -define ascii -output tmp.html $< lynx -dump tmp.html | simple-pp > $@ rm -f tmp.html all: $(TARGETS) install: $(TARGETS) cp Makefile sample sample.html sample.xhtml $(URL_DIR) cp simple-pp-docs.html $(URL_DIR)/index.html cp simple-pp-docs README clean: rm -f $(TARGETS) *~ *.hdr