annotate Makefile @ 4:8f8a0b35515b

Added tag version-1 for changeset 48b036902118
author Guido Berhoerster <guido+set-aside@berhoerster.name>
date Thu, 22 Nov 2018 15:52:42 +0100
parents d13d59494613
children 152e886b6e28
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
1 #
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
2 # Copyright (C) 2018 Guido Berhoerster <guido+set-aside@berhoerster.name>
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
3 #
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
4 # Permission is hereby granted, free of charge, to any person obtaining
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
5 # a copy of this software and associated documentation files (the
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
6 # "Software"), to deal in the Software without restriction, including
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
7 # without limitation the rights to use, copy, modify, merge, publish,
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
8 # distribute, sublicense, and/or sell copies of the Software, and to
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
9 # permit persons to whom the Software is furnished to do so, subject to
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
10 # the following conditions:
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
11 #
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
12 # The above copyright notice and this permission notice shall be included
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
13 # in all copies or substantial portions of the Software.
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
14 #
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
18 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
19 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
22 #
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
23
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
24 NAME = set-aside
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
25 VERSION = 1
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
26 EXT_NAME = $(subst -,_,$(NAME))-$(VERSION)
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
27
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
28 INKSCAPE := inkscape
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
29 INFOZIP := zip
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
30 SED := sed
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
31
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
32 BITMAP_ICONS = icons/set-aside-16.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
33 icons/set-aside-32.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
34 icons/set-aside-48.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
35 icons/set-aside-96.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
36 icons/set-aside-action-dark-16.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
37 icons/set-aside-action-dark-32.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
38 icons/set-aside-action-light-16.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
39 icons/set-aside-action-light-32.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
40 icons/set-aside-sidebar-16.png \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
41 icons/set-aside-sidebar-32.png
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
42 DIST_FILES = COPYING \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
43 NEWS \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
44 README \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
45 background.js \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
46 manifest.json \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
47 sidebar/images/defaultFavicon.svg \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
48 sidebar/images/remove.svg \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
49 sidebar/images/thumbnail-placeholder.svg \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
50 sidebar/js/tab-collection-manager.js \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
51 sidebar/style/photon-colors.css \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
52 sidebar/style/tab-collection-manager.css \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
53 sidebar/tab-collection-manager.html \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
54 $(wildcard _locales/*/messages.json) \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
55 $(BITMAP_ICONS)
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
56
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
57 .DEFAULT_TARGET = all
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
58
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
59 .PHONY: all extension clean clobber
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
60
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
61 all: extension
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
62
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
63 extension: $(EXT_NAME).zip
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
64
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
65 $(EXT_NAME).zip: $(DIST_FILES)
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
66 $(INFOZIP) $@ $^
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
67
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
68 define generate-icon-rule
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
69 $1: $(1:%-$(lastword $(subst -, ,$1))=%.svg)
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
70 size=$(lastword $(subst -, ,$(basename $1))); \
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
71 $(INKSCAPE) -w $$$${size} -h $$$${size} -e $$@ $$<
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
72 endef
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
73
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
74 $(foreach icon,$(BITMAP_ICONS),$(eval $(call generate-icon-rule,$(icon))))
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
75
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
76 manifest.json: manifest.json.in
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
77 $(SED) 's|@VERSION@|$(VERSION)|g' $< >$@
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
78
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
79 clean:
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
80 -rm -f $(BITMAP_ICONS) manifest.json
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
81
d13d59494613 Initial revision
Guido Berhoerster <guido+set-aside@berhoerster.name>
parents:
diff changeset
82 clobber: clean