diff options
author | Ulrich Müller <ulm@gentoo.org> | 2017-05-08 20:52:48 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2017-05-08 20:52:48 +0200 |
commit | 3b1782b687e9ca4262365a5bd0d28fcf1aaf9128 (patch) | |
tree | adeb839537e50715355a72cccda7e1826be01115 /Makefile | |
parent | Makefile: Major rewrite. (diff) | |
download | pms-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-- | Makefile | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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 \ |