diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-11-21 23:00:29 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-11-21 23:00:29 +0100 |
commit | 4ca267025b2d42bce72888b9b26985a46e123bb3 (patch) | |
tree | b17aa10cfbe2a4f3da69f6d95c8f79e5d8508e7a | |
parent | Remove comment that is now false. (diff) | |
download | nxml-gentoo-schemas-4ca267025b2d42bce72888b9b26985a46e123bb3.tar.gz nxml-gentoo-schemas-4ca267025b2d42bce72888b9b26985a46e123bb3.tar.bz2 nxml-gentoo-schemas-4ca267025b2d42bce72888b9b26985a46e123bb3.zip |
Update the Makefile so that it takes care also of tarball generation.
-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 |