annotate Makefile @ 8:688074a7d58e default tip

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