-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
42 lines (31 loc) · 1006 Bytes
/
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
# -*- Mode: Makefile -*-
#
# Makefile for Toggle Fonts
#
FILES = manifest.json \
background.js \
iconupdater.js \
$(wildcard _locales/*/messages.json) \
$(wildcard icons/*.svg)
ADDON = togglefonts
VERSION = $(shell sed -n 's/^ "version": "\([^"]\+\).*/\1/p' manifest.json)
ANDROIDDEVICE = $(shell adb devices | cut -s -d$$'\t' -f1 | head -n1)
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
# Starts debug session on connected Android device
arun:
@if [ -z "$(ANDROIDDEVICE)" ]; then \
echo "No android devices found!"; \
else \
web-ext run --target=firefox-android --android-device="$(ANDROIDDEVICE)"; \
fi