summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-11-21 23:00:29 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-11-21 23:00:29 +0100
commit4ca267025b2d42bce72888b9b26985a46e123bb3 (patch)
treeb17aa10cfbe2a4f3da69f6d95c8f79e5d8508e7a
parentRemove comment that is now false. (diff)
downloadnxml-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--Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e39846e..273c67d 100644
--- a/Makefile
+++ b/Makefile
@@ -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