diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -4,10 +4,18 @@ DTDS = book.dtd gleps.dtd glsa.dtd guide.dtd metadata.dtd metadoc.dtd \ DTDDEPS = $(patsubst %.dtd,%.dep,$(DTDS)) RNCS = $(patsubst %.dtd,%.rnc,$(DTDS)) +ifdef ($(PV),) +PN=nxml-gentoo-schemas-$(PV) +else +PN=nxml-gentoo-schemas-$(shell date '+%Y%m%d') +endif + +TARBALL=$(PN).tar.bz2 + .SUFFIXES: .dtd .rnc .dep .PHONY: depend all clean -all: .depend $(RNCS) +all: .depend $(TARBALL) depend: .depend @@ -17,11 +25,17 @@ clean: .depend: $(DTDDEPS) cat *.dep > $@ +$(TARBALL): Makefile LICENCE schemas.xml $(RNCS) + mkdir -p $(PN) + cp $^ $(PN) + tar jcf $@ $(PN) + .dtd.dep: echo > $@ sed -n -e '/ENTITY/s|<!ENTITY % \w\+ SYSTEM "\(.*\)\.dtd">|\1|p' $< | \ while read dep; do \ - echo "$(patsubst %.dtd,%,$<).rnc: $$dep.rnc" >> $@ || exit 1; \ + echo "$(patsubst %.dtd,%.rnc,$<): $$dep.rnc" >> $@ || exit 1; \ + echo "$(TARBALL): $$dep.rnc" >> $@ || exit 1; \ $(MAKE) "$$dep.dep" || exit 1; \ done |