Gentoo Archives: gentoo-pms

From: Ulrich Mueller <ulm@g.o>
To: gentoo-pms@l.g.o
Subject: [gentoo-pms] [PATCH] Makefile: new "dist" target.
Date: Fri, 09 Aug 2013 19:25:22
Message-Id: 20997.16925.752266.787734@a1i15.kph.uni-mainz.de
1 Find a patch below with a small update to the Makefile.
2 The text of the spec doesn't change.
3
4 Ulrich
5
6
7 From 77fa772e1637e78fd24af002b809200ea36c8239 Mon Sep 17 00:00:00 2001
8 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@g.o>
9 Date: Fri, 9 Aug 2013 21:18:54 +0200
10 Subject: [PATCH] Makefile: new "dist" target.
11
12 New "dist" target in Makefile for creating a distribution tarball.
13 Don't remove vc.tex with "clean" because it cannot be recreated
14 outside of a git working tree. The new "maintainer-clean" target
15 will remove vc.tex.
16 ---
17 Makefile | 14 ++++++++++++--
18 1 file changed, 12 insertions(+), 2 deletions(-)
19
20 diff --git a/Makefile b/Makefile
21 index f3deb94..f88af7e 100644
22 --- a/Makefile
23 +++ b/Makefile
24 @@ -3,7 +3,10 @@ html : pms.html
25
26 clean :
27 rm -f *~ *.pdf *.dvi *.log *.aux *.bbl *.blg *.toc *.lol *.loa *.lox \
28 - *.lot *.out *.html *.css *.png *.4ct *.4tc *.idv *.lg *.tmp *.xref vc.tex || true
29 + *.lot *.out *.html *.css *.png *.4ct *.4tc *.idv *.lg *.tmp *.xref
30 +
31 +maintainer-clean: clean
32 + rm -f vc.tex
33
34 LATEXFILES = $(shell find -name '*.tex') pms.cls
35 LISTINGFILES = $(shell ls *.listing)
36 @@ -53,10 +56,17 @@ pms.dvi: $(SOURCEFILES) pms.bbl
37 latex pms
38 latex pms
39
40 +dist: $(SOURCEFILES) pms.bib vc vc-git.awk vc.tex Makefile
41 + @if test -z $(PV); then \
42 + echo "Usage: $(MAKE) $@ PV=<version>"; false; \
43 + fi
44 + tar -cJf pms-$(PV).tar.xz --exclude=.git \
45 + --transform='s%^%pms-$(PV)/%' $^
46 +
47 upload:
48 scp pms.pdf eapi-cheatsheet.pdf pms*.html pms.css \
49 dev.gentoo.org:public_html/pms/head/
50
51 .default: all
52
53 -.phony: clean upload
54 +.phony: clean maintainer-clean dist upload
55 --
56 1.8.3.2