-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (42 loc) · 1.39 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
52
53
54
55
56
# -*- Mode: Makefile -*-
#
# Makefile for Undo Cookie Whitelist
#
FILES = manifest.json \
background.js \
default-preferences.json \
options.html \
options.js \
options.css \
utils/options.css \
utils/storage.js \
utils/html-i18n.js \
icons/cookiewhitelist.svg \
$(wildcard _locales/*/messages.json)
ADDON = cookiewhitelist
VERSION = $(shell sed -n 's/^ "version": "\([^"]\+\).*/\1/p' manifest.json)
ANDROIDDEVICE = $(shell adb devices | cut -s -d$$'\t' -f1 | head -n1)
WEBEXT_UTILS_REPO = [email protected]:M-Reimer/webext-utils.git
trunk: $(ADDON)-trunk.xpi
release: $(ADDON)-$(VERSION).xpi
%.xpi: $(FILES)
@zip -9 - $^ > $@
clean:
rm -f $(ADDON)-*.xpi
# Starts local debug session
run:
web-ext run --pref=devtools.browserconsole.contentMessages=true --bc
# Starts debug session on connected Android device
arun:
@if [ -z "$(ANDROIDDEVICE)" ]; then \
echo "No android devices found!"; \
else \
web-ext run --target=firefox-android --firefox-apk=org.mozilla.fenix --android-device="$(ANDROIDDEVICE)"; \
fi
# Subtree stuff for webext-utils
# Note to myself. Initial setup of subtree:
# git subtree add --prefix utils [email protected]: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