projects/booket

annotate Makefile @ 29:58f3589982ea

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