From 4bba55b8c06c44bf0de04ae5cda75c831e4b3a1d Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Mon, 31 Aug 2015 21:41:35 -0500 Subject: [PATCH] Add a Makefile to build XEPs --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..38849269 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +.SILENT: + +OUTDIR?=build +XMLDEPS=xep.xsl xep.xsd xep.ent xep.dtd ref.xsl + +.PHONY: help +help: + @echo 'XEP makefile targets:' + @echo ' ' + @echo ' help - (this message)' + @echo ' all - build all XEPs' + @echo ' clean - recursively unlink the build tree' + @echo ' xep-xxxx - build xep-xxxx.html' + @echo ' ' + @echo 'Output directory: "$(OUTDIR)/"' + +.PHONY: all +all: $(patsubst %.xml, $(OUTDIR)/%.html, $(wildcard *.xml)) + +.PHONY: xep-% +xep-%: $(OUTDIR)/xep-%.html + + +$(OUTDIR)/%.html: %.xml $(XMLDEPS) $(OUTDIR) + xsltproc xep.xsl "$<" > "$@" + +$(OUTDIR): + mkdir -p $(OUTDIR) + +.PHONY: clean +clean: + rm -rf $(OUTDIR)