-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
51 lines (38 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- Mode: Makefile -*-
#
# Makefile for Undo Close Tab
#
FILES = manifest.json \
background.js \
tabhandling.js \
default-preferences.json \
options.html \
options.js \
options.css \
utils/storage.js \
utils/iconupdater.js \
utils/html-i18n.js \
$(wildcard _locales/*/messages.json) \
$(wildcard icons/*.svg)
ADDON = undoclosetab
VERSION = $(shell sed -n 's/^ "version": "\([^"]\+\).*/\1/p' manifest.json)
WEBEXT_UTILS_REPO = git@github.com:M-Reimer/webext-utils.git
trunk: $(ADDON)-trunk.xpi
release: $(ADDON)-$(VERSION).xpi
%.xpi: $(FILES) icons/$(ADDON)-light.svg
@zip -9 - $^ > $@
icons/$(ADDON)-light.svg: icons/$(ADDON).svg
@sed 's/:#0c0c0d/:#f9f9fa/g' $^ > $@
clean:
rm -f $(ADDON)-*.xpi
rm -f icons/$(ADDON)-light.svg
# Starts local debug session
run: icons/$(ADDON)-light.svg
web-ext run --pref=devtools.browserconsole.contentMessages=true --bc
# Subtree stuff for webext-utils
# Note to myself. Initial setup of subtree:
# git subtree add --prefix utils git@github.com:M-Reimer/webext-utils.git master
subtree-pull:
git subtree pull --prefix utils "$(WEBEXT_UTILS_REPO)" master
subtree-push:
git subtree push --prefix utils "$(WEBEXT_UTILS_REPO)" master