-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
131 lines (96 loc) · 3.48 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
TARGET=firefox
VERSION=3.6.0
TDIR=build/${TARGET}
TBDIR=$(TDIR)/build
ZIPPER=$(TBDIR)/tabhunter-$(TARGET)-$(VERSION).zip
TDIRS=$(TDIR) $(TDIR)/build $(TDIR)/_locales $(TDIR)/_locales/en $(TDIR)/icons \
$(TDIR)/popup $(TDIR)/popup/images $(TDIR)/content
SOURCES=$(TDIR) $(TBDIR) $(TDIR)/_locales $(TDIR)/_locales/en $(TDIR)/icons $(TDIR)/popup \
$(TDIR)/_locales/en/messages.json \
$(TDIR)/icons/martini-16x16.png \
$(TDIR)/icons/martini-24x24.png \
$(TDIR)/icons/martini-32x32.png \
$(TDIR)/icons/tabhunter-install.png \
$(TDIR)/icons/th-128x128.png \
$(TDIR)/icons/th-32x32.png \
$(TDIR)/icons/th-48x48.png \
$(TDIR)/icons/th-96x96.png \
$(TDIR)/LICENSE.txt \
$(TDIR)/README.md \
$(TDIR)/build.sh \
$(TDIR)/manifest.json \
$(TDIR)/content/matchText.js \
$(TDIR)/popup/jquery-3.2.1.min.js \
$(TDIR)/popup/prefs.css \
$(TDIR)/popup/prefs.html \
$(TDIR)/popup/prefs.js \
$(TDIR)/popup/images/restore12.png \
$(TDIR)/popup/tabhunter.css \
$(TDIR)/popup/tabhunter.html \
$(TDIR)/popup/tabhunter.js
all: build all-firefox all-chrome
all-firefox:
$(MAKE) -e TARGET=firefox do-firefox
all-chrome:
$(MAKE) -e TARGET=chrome do-chrome
do-firefox: $(TDIRS) $(ZIPPER)
do-chrome: $(TDIRS) $(TDIR)/popup/browser-polyfill.min.js $(ZIPPER)
$(ZIPPER): $(SOURCES)
cd $(TDIR) ; ./build.sh
build:
mkdir -p $@
$(TDIR) $(TDIR)/build $(TDIR)/_locales $(TDIR)/_locales/en $(TDIR)/icons $(TDIR)/popup $(TDIR)/popup/images $(TDIR)/content:
mkdir -p $@
$(TDIR)/_locales/en/messages.json: _locales/en/messages.json
cp $< $@
$(TDIR)/icons/martini-16x16.png: icons/martini-16x16.png
cp $< $@
$(TDIR)/icons/martini-24x24.png: icons/martini-24x24.png
cp $< $@
$(TDIR)/icons/martini-32x32.png: icons/martini-32x32.png
cp $< $@
$(TDIR)/icons/tabhunter-install.png: icons/tabhunter-install.png
cp $< $@
$(TDIR)/icons/th-128x128.png: icons/th-128x128.png
cp $< $@
$(TDIR)/icons/th-32x32.png: icons/th-32x32.png
cp $< $@
$(TDIR)/icons/th-48x48.png: icons/th-48x48.png
cp $< $@
$(TDIR)/icons/th-96x96.png: icons/th-96x96.png
cp $< $@
$(TDIR)/LICENSE.txt : LICENSE.txt
cp $< $@
$(TDIR)/README.md : README.md
cp $< $@
$(TDIR)/build.sh : build.sh.erb Makefile
TARGET=${TARGET} VERSION=${VERSION} erb -T 2 $< > $@
chmod +x $@
$(TDIR)/manifest.json : manifest.json.erb Makefile
TARGET=${TARGET} VERSION=${VERSION} erb -T 2 $< > $@
$(TDIR)/popup/browser-polyfill.min.js: popup/browser-polyfill-0.2.1.min.js
cp $< $@
$(TDIR)/popup/jquery-3.2.1.min.js: popup/jquery-3.2.1.min.js
cp $< $@
$(TDIR)/content/matchText.js: content/matchText.js.erb
TARGET=${TARGET} VERSION=${VERSION} erb -T 2 $< > $@
node -c $@
$(TDIR)/popup/prefs.css: popup/prefs.css
cp $< $@
$(TDIR)/popup/prefs.js: popup/prefs.js.erb Makefile
TARGET=${TARGET} VERSION=${VERSION} erb -T 2 $< > $@
node -c $@
$(TDIR)/popup/tabhunter.css: popup/tabhunter.css
cp $< $@
$(TDIR)/popup/tabhunter.html: popup/tabhunter.html.erb popup/_prefs.html.erb Makefile
TARGET=${TARGET} VERSION=${VERSION} erb -T 2 $< > $@
$(TDIR)/popup/tabhunter.js: popup/tabhunter.js.erb Makefile
TARGET=${TARGET} VERSION=${VERSION} erb -T 2 $< > $@
node -c $@
$(TDIR)/popup/prefs.html: popup/prefs.html.erb popup/_prefs.html.erb Makefile
TARGET=${TARGET} VERSION=${VERSION} erb -T 2 $< > $@
$(TDIR)/popup/images/restore12.png: popup/images/restore12.png
cp $< $@
tarSource: tabhunter.tgz
tabhunter.tgz: HISTORY.md LICENSE.txt Makefile README.md _locales/ build.sh.erb content/ defaults/ icons/ m* popup/ screenshots/ updates.md PRIVACY.md
tar cfz $@ $^