summaryrefslogtreecommitdiff
blob: e9c637245dfedf6f9682a17ed17e632ac59ec68a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
DTDS = devbook.dtd glsa.dtd metadata.dtd mirrors.dtd \
       projects.dtd repositories.dtd userinfo.dtd

RNCS = $(patsubst %.dtd,%.rnc,$(DTDS))

ifneq ($(PV),)
PN=nxml-gentoo-schemas-$(PV)
else
PN=nxml-gentoo-schemas-$(shell TZ=UTC date '+%Y%m%d')
endif

TARBALL=$(PN).tar.xz

.PHONY: all clean
.PRECIOUS: $(RNCS) $(DTDS)

all: $(TARBALL)

clean:
	rm -f *.dtd

$(TARBALL): Makefile LICENCE schemas.xml $(RNCS)
	mkdir -p $(PN)
	cp $^ $(PN)
	tar cJf $@ $(PN)

%.rnc: %.dtd
	trang -I dtd -O rnc $< $@

%.dtd:
	wget -N --no-verbose https://www.gentoo.org/dtd/$@

devbook.dtd:
	wget -N --no-verbose \
	  https://gitweb.gentoo.org/proj/devmanual.git/plain/$@