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