summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-01-21 23:04:33 +0100
committerUlrich Müller <ulm@gentoo.org>2022-01-21 23:04:33 +0100
commitb86ec5d5a0f7503d1cbb3d994f7b65f8b73a3592 (patch)
tree7593f3fb7c378a750d58681f01984c25c1e46c08
parentdevbook.rnc: Update from DTD (diff)
downloadnxml-gentoo-schemas-b86ec5d5.tar.gz
nxml-gentoo-schemas-b86ec5d5.tar.bz2
nxml-gentoo-schemas-b86ec5d5.zip
Makefile: New dist target replaces $(TARBALL)
Use tar --transform, so we don't need a temporary directory. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--.gitignore1
-rw-r--r--Makefile20
2 files changed, 9 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 7d15794..fb79b6a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
*.dtd
+*.tar.xz
diff --git a/Makefile b/Makefile
index e9c6372..acba372 100644
--- a/Makefile
+++ b/Makefile
@@ -4,25 +4,21 @@ DTDS = devbook.dtd glsa.dtd metadata.dtd mirrors.dtd \
RNCS = $(patsubst %.dtd,%.rnc,$(DTDS))
ifneq ($(PV),)
-PN=nxml-gentoo-schemas-$(PV)
+P=nxml-gentoo-schemas-$(PV)
else
-PN=nxml-gentoo-schemas-$(shell TZ=UTC date '+%Y%m%d')
+P=nxml-gentoo-schemas-$(shell TZ=UTC date '+%Y%m%d')
endif
-TARBALL=$(PN).tar.xz
-
-.PHONY: all clean
+.PHONY: all dist clean
.PRECIOUS: $(RNCS) $(DTDS)
-all: $(TARBALL)
+all: $(RNCS)
-clean:
- rm -f *.dtd
+dist: Makefile LICENCE schemas.xml $(RNCS)
+ tar -cJf $(P).tar.xz --transform='s%^%$(P)/%' $^
-$(TARBALL): Makefile LICENCE schemas.xml $(RNCS)
- mkdir -p $(PN)
- cp $^ $(PN)
- tar cJf $@ $(PN)
+clean:
+ rm -f *.dtd *.tar.xz
%.rnc: %.dtd
trang -I dtd -O rnc $< $@