diff -r 000000000000 -r b33e0bb8c644 Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Mon Jan 23 13:07:49 2006 -0500 @@ -0,0 +1,58 @@ +#/usr/bin/make + +targets=$(addprefix $(1), .html .pdf .txt /index.html) +output=$(addprefix $(1), .html .pdf .txt) $(1) + +TOP=`pwd` +INSTALL_DIR=$(TOP)/install +SRCS=cthulhu_19e.xml +FOP=fop +NWALSH_XSL_DIR=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh +OUTPUT=$(foreach target,$(basename $(SRCS)),$(call output,$(target))) +UPLOAD=$(OUTPUT) + +all: $(basename $(SRCS)) + +cthulhu_19e: $(call targets,cthulhu_19e) + +# title.xsl: title.xml +# xsltproc -o $@ $(NWALSH_XSL_DIR)/template/titlepage.xsl $< + +%.fo: %.xml print.xsl common.xsl + xsltproc -o $@ print.xsl $< + +%.pdf: %.fo +# xsltproc -o $@.tmp.fo strip-attributes.xsl $< +# xmlto pdf -o $(dir $@) $< + fop $< $@ +# rm $@.tmp.fo + +%.pdf: %.sxw + xvfb-run -a oowriter2 -pt PDF $< + mv $(OO_PDF_OUTPUT_DIR)/$@ $@ + +%.pdf: %.sxi + xvfb-run -a ooimpress2 -pt PDF $< + mv $(OO_PDF_OUTPUT_DIR)/$@ $@ + +%.html: %.xml html.xsl common.xsl + xsltproc --xinclude -o $@ html.xsl $< +# recode u8..l1 $@ + +%/index.html: %.xml chunk.xsl common.xsl + rm -rf $(dir $@) + mkdir -p $(dir $@) + xsltproc --xinclude -o $(dir $@) chunk.xsl $< + +%.txt: %.html + w3m -dump $< > $@ + +install: $(UPLOAD) + -mkdir -p $(INSTALL_DIR) + cp -a $^ $(INSTALL_DIR) + +clean: + rm -f *~ *.fo + +purge: clean + rm -rf $(OUTPUT)