mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 08:45:04 -05:00
Add a Makefile to build XEPs
This commit is contained in:
parent
c20b089c0f
commit
4bba55b8c0
32
Makefile
Normal file
32
Makefile
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user