xeps/Makefile

33 lines
679 B
Makefile
Raw Normal View History

2015-08-31 22:41:35 -04:00
.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)