From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1E672139694 for ; Thu, 11 May 2017 04:57:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68C67E0E03; Thu, 11 May 2017 04:56:29 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 458BDE0E03 for ; Thu, 11 May 2017 04:56:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1B1AA341683 for ; Thu, 11 May 2017 04:56:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 71200744C for ; Thu, 11 May 2017 04:56:26 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1494269568.3b1782b687e9ca4262365a5bd0d28fcf1aaf9128.ulm@gentoo> Subject: [gentoo-commits] proj/pms:master commit in: / X-VCS-Repository: proj/pms X-VCS-Files: Makefile X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 3b1782b687e9ca4262365a5bd0d28fcf1aaf9128 X-VCS-Branch: master Date: Thu, 11 May 2017 04:56:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 53a92ed1-bb8c-48af-8438-b77a72ec4d06 X-Archives-Hash: 73a5270399057f0dd930226628b31255 commit: 3b1782b687e9ca4262365a5bd0d28fcf1aaf9128 Author: Ulrich Müller gentoo org> AuthorDate: Mon May 8 18:52:48 2017 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Mon May 8 18:52:48 2017 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=3b1782b6 Makefile: Automatically determine version info for distfiles. Also create a tarball with pre-built files for app-doc/pms[binary]. Makefile | 19 ++++++++++++++----- 1 file 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="; 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 \