summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2017-05-08 20:52:48 +0200
committerUlrich Müller <ulm@gentoo.org>2017-05-08 20:52:48 +0200
commit3b1782b687e9ca4262365a5bd0d28fcf1aaf9128 (patch)
treeadeb839537e50715355a72cccda7e1826be01115 /Makefile
parentMakefile: Major rewrite. (diff)
downloadpms-3b1782b687e9ca4262365a5bd0d28fcf1aaf9128.tar.gz
pms-3b1782b687e9ca4262365a5bd0d28fcf1aaf9128.tar.bz2
pms-3b1782b687e9ca4262365a5bd0d28fcf1aaf9128.zip
Makefile: Automatically determine version info for distfiles.
Also create a tarball with pre-built files for app-doc/pms[binary].
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 53ccaa7..9bc131a 100644
--- a/Makefile
+++ b/Makefile
@@ -63,11 +63,20 @@ eapi-cheatsheet-nocombine.pdf: pms.pdf
grep -q 'Warning.*Rerun' eapi-cheatsheet-nocombine.log || break; \
done
-dist: $(SOURCES) vc.tex
- @if test -z $(PV); then \
- echo "Usage: $(MAKE) $@ PV=<version>"; false; \
- fi
- tar -cJf pms-$(PV).tar.xz --transform='s%^%pms-$(PV)/%' $^
+dist: $(SOURCES) vc.tex pms.pdf pms.html
+ PV='$(PV)'; \
+ if test -z "$${PV}"; then \
+ current_eapi=$$(sed -n 's/.*CurrentEAPIIs{\(.*\)}.*/\1/p' pms.tex); \
+ vc_date=$$(sed -n \
+ 's/.*VCDateISO{\([0-9]*\)-\([0-9]*\)-\([0-9]*\)}.*/\1\2\3/p' \
+ vc.tex); \
+ PV=$${current_eapi}_p$${vc_date}; \
+ fi; \
+ echo "PV = $${PV}"; \
+ tar -cJf pms-"$${PV}".tar.xz --transform="s%^%pms-$${PV}/%" \
+ $(SOURCES) vc.tex && \
+ tar -cJf pms-"$${PV}"-prebuilt.tar.xz --transform="s%^%pms-$${PV}/%" \
+ pms.pdf eapi-cheatsheet.pdf pms*.html pms.css
upload: pms.pdf pms.html
scp pms.pdf eapi-cheatsheet.pdf pms*.html pms.css \