Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/nxml-gentoo-schemas:master commit in: /
Date: Fri, 21 Jan 2022 22:08:12
Message-Id: 1642802673.b86ec5d5a0f7503d1cbb3d994f7b65f8b73a3592.ulm@gentoo
1 commit: b86ec5d5a0f7503d1cbb3d994f7b65f8b73a3592
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 21 22:04:33 2022 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 21 22:04:33 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/nxml-gentoo-schemas.git/commit/?id=b86ec5d5
7
8 Makefile: New dist target replaces $(TARBALL)
9
10 Use tar --transform, so we don't need a temporary directory.
11
12 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
13
14 .gitignore | 1 +
15 Makefile | 20 ++++++++------------
16 2 files changed, 9 insertions(+), 12 deletions(-)
17
18 diff --git a/.gitignore b/.gitignore
19 index 7d15794..fb79b6a 100644
20 --- a/.gitignore
21 +++ b/.gitignore
22 @@ -1 +1,2 @@
23 *.dtd
24 +*.tar.xz
25
26 diff --git a/Makefile b/Makefile
27 index e9c6372..acba372 100644
28 --- a/Makefile
29 +++ b/Makefile
30 @@ -4,25 +4,21 @@ DTDS = devbook.dtd glsa.dtd metadata.dtd mirrors.dtd \
31 RNCS = $(patsubst %.dtd,%.rnc,$(DTDS))
32
33 ifneq ($(PV),)
34 -PN=nxml-gentoo-schemas-$(PV)
35 +P=nxml-gentoo-schemas-$(PV)
36 else
37 -PN=nxml-gentoo-schemas-$(shell TZ=UTC date '+%Y%m%d')
38 +P=nxml-gentoo-schemas-$(shell TZ=UTC date '+%Y%m%d')
39 endif
40
41 -TARBALL=$(PN).tar.xz
42 -
43 -.PHONY: all clean
44 +.PHONY: all dist clean
45 .PRECIOUS: $(RNCS) $(DTDS)
46
47 -all: $(TARBALL)
48 +all: $(RNCS)
49
50 -clean:
51 - rm -f *.dtd
52 +dist: Makefile LICENCE schemas.xml $(RNCS)
53 + tar -cJf $(P).tar.xz --transform='s%^%$(P)/%' $^
54
55 -$(TARBALL): Makefile LICENCE schemas.xml $(RNCS)
56 - mkdir -p $(PN)
57 - cp $^ $(PN)
58 - tar cJf $@ $(PN)
59 +clean:
60 + rm -f *.dtd *.tar.xz
61
62 %.rnc: %.dtd
63 trang -I dtd -O rnc $< $@