annotate Makefile @ 32:06eba1bf219d default tip

Exclude "." from tarballs
author Guido Berhoerster <guido+booket@berhoerster.name>
date Tue, 13 Sep 2016 16:23:34 +0200
parents 58f3589982ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
1 #
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
2 # Copyright (C) 2014 Guido Berhoerster <guido+booket@berhoerster.name>
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
3 #
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
4 # Permission is hereby granted, free of charge, to any person obtaining
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
5 # a copy of this software and associated documentation files (the
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
6 # "Software"), to deal in the Software without restriction, including
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
7 # without limitation the rights to use, copy, modify, merge, publish,
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
8 # distribute, sublicense, and/or sell copies of the Software, and to
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
9 # permit persons to whom the Software is furnished to do so, subject to
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
10 # the following conditions:
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
11 #
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
12 # The above copyright notice and this permission notice shall be included
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
13 # in all copies or substantial portions of the Software.
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
14 #
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
18 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
19 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
22 #
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
23
29
58f3589982ea Add dist target to makefile
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 17
diff changeset
24 PACKAGE = booket
58f3589982ea Add dist target to makefile
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 17
diff changeset
25 VERSION = 5
58f3589982ea Add dist target to makefile
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 17
diff changeset
26 DISTNAME := $(PACKAGE)-$(VERSION)
17
8445c729ba97 Add logo and favicon
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 7
diff changeset
27 RSVG_CONVERT := rsvg-convert
7
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
28 SCOUR := scour
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
29 XMLLINT := xmllint
29
58f3589982ea Add dist target to makefile
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 17
diff changeset
30 PAX := pax
58f3589982ea Add dist target to makefile
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 17
diff changeset
31 GZIP := gzip
7
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
32
17
8445c729ba97 Add logo and favicon
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 7
diff changeset
33 SVGIMAGES := missing-favicon.svg booket-logo.svg
8445c729ba97 Add logo and favicon
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 7
diff changeset
34 PNGIMAGES := booket-favicon.png
7
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
35
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
36 .DEFAULT_TARGET = all
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
37
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
38 .PHONY: all clean clobber
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
39
17
8445c729ba97 Add logo and favicon
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 7
diff changeset
40 all: $(SVGIMAGES) $(PNGIMAGES)
7
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
41
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
42 %.svg: %.src.svg
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
43 $(SCOUR) --quiet -i $< --create-groups --enable-id-stripping \
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
44 --enable-comment-stripping --remove-metadata \
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
45 --no-renderer-workaround --strip-xml-prolog --enable-viewboxing \
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
46 --set-precision=5 | $(XMLLINT) --format --noblanks --output $@ -
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
47
17
8445c729ba97 Add logo and favicon
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 7
diff changeset
48 %.png: %.src.svg
8445c729ba97 Add logo and favicon
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 7
diff changeset
49 $(RSVG_CONVERT) -o $@ $<
8445c729ba97 Add logo and favicon
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 7
diff changeset
50
7
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
51 clean:
17
8445c729ba97 Add logo and favicon
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 7
diff changeset
52 rm -f $(SVGIMAGES) $(PNGIMAGES)
7
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
53
a1a934adff8d Add support for favicons
Guido Berhoerster <guido+booket@berhoerster.name>
parents:
diff changeset
54 clobber: clean
29
58f3589982ea Add dist target to makefile
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 17
diff changeset
55
58f3589982ea Add dist target to makefile
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 17
diff changeset
56 dist: all
58f3589982ea Add dist target to makefile
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 17
diff changeset
57 $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \
32
06eba1bf219d Exclude "." from tarballs
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 29
diff changeset
58 -s ',^\.$$,,' -s ',\./,$(DISTNAME)/,' . | \
06eba1bf219d Exclude "." from tarballs
Guido Berhoerster <guido+booket@berhoerster.name>
parents: 29
diff changeset
59 $(GZIP) > $(DISTNAME).tar.gz