Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 689 lines (647 sloc) 32.652 kb
ae58e65 initial commit
Marcel Duran authored
1 # Copyright (c) 2012, Yahoo! Inc. All rights reserved.
2 # Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
3
4 # source directories
5 SRC := src
6 SRC_COMMON := $(SRC)/common
7 SRC_YUI := $(SRC)/yui/3.3.0
8 SRC_FIREFOX := $(SRC)/firefox
9 SRC_CHROME := $(SRC)/chrome
10 SRC_BOOKMARKLET := $(SRC)/bookmarklet
11 SRC_HAR := $(SRC)/har
12 SRC_NODEJS := $(SRC)/nodejs
13 SRC_OPERA := $(SRC)/opera
14 SRC_SAFARI := $(SRC)/safari
15 SRC_WSH := $(SRC)/wsh
16 SRC_RHINO := $(SRC)/rhino
327c5c5 Added phantomjs flavor
Marcel Duran authored
17 SRC_PHANTOMJS := $(SRC)/phantomjs
ae58e65 initial commit
Marcel Duran authored
18
19 # build directories
20 BUILD := build
21 BUILD_FIREFOX := $(BUILD)/firefox
22 BUILD_CHROME := $(BUILD)/chrome
23 BUILD_YUI := $(BUILD)/yui
24 BUILD_BOOKMARKLET := $(BUILD)/bookmarklet
25 BUILD_HAR := $(BUILD)/har
26 BUILD_NODEJS := $(BUILD)/nodejs
27 BUILD_OPERA := $(BUILD)/opera
28 BUILD_SAFARI_ROOT := $(BUILD)/safari
29 BUILD_SAFARI := $(BUILD_SAFARI_ROOT)/yslow.safariextension
30 BUILD_WSH := $(BUILD)/wsh
31 BUILD_RHINO := $(BUILD)/rhino
327c5c5 Added phantomjs flavor
Marcel Duran authored
32 BUILD_PHANTOMJS := $(BUILD)/phantomjs
ae58e65 initial commit
Marcel Duran authored
33
34 # package directories
35 PKG := pkg
36 PKG_FIREFOX := $(PKG)/firefox
37 PKG_CHROME := $(PKG)/chrome
38 PKG_BOOKMARKLET := $(PKG)/bookmarklet
39 PKG_NODEJS := $(PKG)/nodejs
40 PKG_OPERA := $(PKG)/opera
41 PKG_SAFARI := $(PKG)/safari
42 PKG_WSH := $(PKG)/wsh
43 PKG_RHINO := $(PKG)/rhino
327c5c5 Added phantomjs flavor
Marcel Duran authored
44 PKG_PHANTOMJS := $(PKG)/phantomjs
ae58e65 initial commit
Marcel Duran authored
45
46 # file names / versions / licenses
47 BOOKMARKLET_YSLOW_JS := yslow-files-bookmarklet.js
48 BOOKMARKLET_YSLOW_CSS := yslow-files-style.css
49 BOOKMARKLET_JS := yslow-bookmarklet.js
50 BOOKMARKLET_CSS := yslow-style.css
51 YSLOW_VERSION := $(shell egrep '^Version' CHANGELOG | head -1 | awk '{print $$2;}')
52 ifdef config
53 BM_CONFIG = $(config)
54 else
55 BM_CONFIG = config-local.js
56 endif
57 YUI_LICENSE := $(SRC_YUI)/license
58 YSLOW_LICENSE := $(SRC_COMMON)/license
59
60 # lib/tools directories/files
61 YUI_LIB := $(SRC_YUI)/build
62 IMG := img
dad4e50 bumped yuicompressor version and changed its execution calls
Marcel Duran authored
63 YUICOMPRESSOR := java -jar ~/bin/yuicompressor-2.4.7.jar
ae58e65 initial commit
Marcel Duran authored
64
327c5c5 Added phantomjs flavor
Marcel Duran authored
65 all: show-version bookmarklet chrome firefox har nodejs opera safari wsh rhino phantomjs
ae58e65 initial commit
Marcel Duran authored
66
327c5c5 Added phantomjs flavor
Marcel Duran authored
67 clean: clean-bookmarklet clean-chrome clean-firefox clean-har clean-nodejs clean-opera clean-safari clean-wsh clean-rhino clean-phantomjs
ae58e65 initial commit
Marcel Duran authored
68 @if [ -d $(BUILD) ]; then rmdir $(BUILD); fi
69
327c5c5 Added phantomjs flavor
Marcel Duran authored
70 pkg: pkg-bookmarklet pkg-chrome pkg-firefox pkg-nodejs pkg-opera pkg-safari pkg-wsh pkg-rhino pkg-phantomjs
71
ae58e65 initial commit
Marcel Duran authored
72 show-version:
73 @echo "YSLOW version: $(YSLOW_VERSION)"
74
75 yui:
76 @echo "building YUI..."
77 @if [ ! -d $(BUILD_YUI) ]; then mkdir -p $(BUILD_YUI); fi
78 @cat $(YUI_LIB)/yui/yui-base$(YUI_MODE).js \
79 $(YUI_LIB)/yui/features$(YUI_MODE).js \
80 $(YUI_LIB)/yui/get$(YUI_MODE).js \
81 $(YUI_LIB)/oop/oop$(YUI_MODE).js \
82 $(YUI_LIB)/jsonp/jsonp$(YUI_MODE).js \
83 $(YUI_LIB)/jsonp/jsonp-url$(YUI_MODE).js \
84 $(YUI_LIB)/yql/yql$(YUI_MODE).js \
85 $(YUI_LIB)/event-custom/event-custom-base$(YUI_MODE).js \
86 $(YUI_LIB)/event/event-base$(YUI_MODE).js \
87 $(YUI_LIB)/dom/dom-base$(YUI_MODE).js \
88 $(YUI_LIB)/dom/dom-style$(YUI_MODE).js \
89 $(YUI_LIB)/dom/selector-native$(YUI_MODE).js \
90 $(YUI_LIB)/dom/selector-css2$(YUI_MODE).js \
91 $(YUI_LIB)/node/node-base$(YUI_MODE).js \
92 $(YUI_LIB)/node/node-style$(YUI_MODE).js \
93 > $(BUILD_YUI)/yui$(YUI_MODE).js
94 @echo "done"
95
96 bookmarklet-files:
97 @echo "building BOOKMARKLET files..."
98 @if [ ! -d $(BUILD_BOOKMARKLET) ]; then mkdir -p $(BUILD_BOOKMARKLET); fi
99 @cat $(SRC_COMMON)/yslow.js \
100 $(SRC_COMMON)/version.js \
101 $(SRC_COMMON)/componentSet.js \
102 $(SRC_COMMON)/component.js \
327c5c5 Added phantomjs flavor
Marcel Duran authored
103 $(SRC_COMMON)/component-bm-ch.js \
ae58e65 initial commit
Marcel Duran authored
104 $(SRC_COMMON)/controller.js \
105 $(SRC_COMMON)/util.js \
106 $(SRC_COMMON)/doc.js \
107 $(SRC_COMMON)/rules.js \
108 $(SRC_COMMON)/resultset.js \
109 $(SRC_COMMON)/view.js \
110 $(SRC_COMMON)/context.js \
111 $(SRC_COMMON)/renderers.js \
112 $(SRC_COMMON)/peeler.js \
327c5c5 Added phantomjs flavor
Marcel Duran authored
113 $(SRC_COMMON)/peeler-bm-ch-ph.js \
ae58e65 initial commit
Marcel Duran authored
114 $(SRC_BOOKMARKLET)/$(BM_CONFIG) \
115 $(SRC_BOOKMARKLET)/controller.js | \
116 sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ | \
117 sed s/{{BOOKMARKLET_JS}}/$(BOOKMARKLET_JS)/ | \
118 sed s/{{BOOKMARKLET_CSS}}/$(BOOKMARKLET_CSS)/ \
119 > $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_JS)
120 @cat $(SRC_COMMON)/yslow.css \
121 $(SRC_BOOKMARKLET)/yslow.css \
122 $(SRC_COMMON)/tabview.css \
123 > $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_CSS)
124 @echo "done"
125
126 bookmarklet: yui bookmarklet-files
127 @echo "merging YUI and BOOKMARKLET..."
128 @cat $(BUILD_YUI)/yui$(YUI_MODE).js \
129 $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_JS) \
130 > $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_JS)
131 @cp $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_CSS) \
132 $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_CSS)
133 @rm $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_JS) \
134 $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_CSS)
135 @echo "done"
136
137 chrome:
138 @echo "building CHROME EXTENSION..."
139 @if [ ! -d $(BUILD_CHROME) ]; then mkdir -p $(BUILD_CHROME); fi
140 @cp $(SRC_CHROME)/128.png \
141 $(SRC_CHROME)/16.png \
142 $(SRC_CHROME)/32.png \
143 $(SRC_CHROME)/48.png \
144 $(SRC_CHROME)/background.html \
145 $(SRC_CHROME)/options.html \
146 $(SRC_CHROME)/content.js \
147 $(SRC_CHROME)/pref-init.js \
148 $(SRC_CHROME)/controller.js \
149 $(SRC_CHROME)/icon.png \
150 $(SRC_CHROME)/yslow.html \
151 $(BUILD_CHROME)/
152 @cat $(SRC_COMMON)/yslow.js \
153 $(SRC_COMMON)/version.js \
154 $(SRC_COMMON)/componentSet.js \
155 $(SRC_COMMON)/component.js \
327c5c5 Added phantomjs flavor
Marcel Duran authored
156 $(SRC_COMMON)/component-bm-ch.js \
ae58e65 initial commit
Marcel Duran authored
157 $(SRC_COMMON)/controller.js \
158 $(SRC_COMMON)/util.js \
159 $(SRC_COMMON)/doc.js \
160 $(SRC_COMMON)/rules.js \
161 $(SRC_COMMON)/resultset.js \
162 $(SRC_COMMON)/view.js \
163 $(SRC_COMMON)/context.js \
164 $(SRC_COMMON)/renderers.js \
165 $(SRC_COMMON)/peeler.js \
327c5c5 Added phantomjs flavor
Marcel Duran authored
166 $(SRC_COMMON)/peeler-bm-ch-ph.js \
ae58e65 initial commit
Marcel Duran authored
167 $(SRC_CHROME)/yslow-chrome-pref.js | \
168 sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
169 > $(BUILD_CHROME)/yslow-chrome.js
170 @cat $(SRC_CHROME)/manifest.json | \
171 sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
172 > $(BUILD_CHROME)/manifest.json
173 @cat $(SRC_COMMON)/yslow.css \
174 $(SRC_COMMON)/tabview.css \
175 > $(BUILD_CHROME)/style.css
176 @echo "done"
177
178 firefox:
179 @echo "building FIREFOX ADD-ON..."
180 @if [ ! -d $(BUILD_FIREFOX)/chrome/content/yslow/lib ]; then mkdir -p $(BUILD_FIREFOX)/chrome/content/yslow/lib; fi
181 @if [ ! -d $(BUILD_FIREFOX)/chrome/content/yslow/img ]; then mkdir -p $(BUILD_FIREFOX)/chrome/content/yslow/img; fi
182 @if [ ! -d $(BUILD_FIREFOX)/chrome/skin ]; then mkdir -p $(BUILD_FIREFOX)/chrome/skin; fi
183 @if [ ! -d $(BUILD_FIREFOX)/defaults/preferences ]; then mkdir -p $(BUILD_FIREFOX)/defaults/preferences; fi
184 @cp $(SRC_FIREFOX)/chrome.manifest \
185 $(SRC_FIREFOX)/license.txt \
186 $(BUILD_FIREFOX)/
187 @cp $(SRC_FIREFOX)/defaults/preferences/yslow.js \
188 $(BUILD_FIREFOX)/defaults/preferences/
189 @cp $(SRC_FIREFOX)/chrome/skin/yslow.css \
190 $(BUILD_FIREFOX)/chrome/skin/
191 @cp $(SRC_FIREFOX)/chrome/content/bindings.xml \
192 $(SRC_FIREFOX)/chrome/content/browser.xul \
193 $(SRC_FIREFOX)/chrome/content/exporter.js \
194 $(SRC_FIREFOX)/chrome/content/platform-ff.js \
195 $(SRC_FIREFOX)/chrome/content/yslow-ff-pref.js \
196 $(SRC_FIREFOX)/chrome/content/yslow-firebug-net.js \
197 $(SRC_FIREFOX)/chrome/content/yslow-firebug.js \
198 $(SRC_FIREFOX)/chrome/content/yslow-firefox-net.js \
199 $(SRC_FIREFOX)/chrome/content/yslow-firefox.js \
200 $(SRC_FIREFOX)/chrome/content/yslowOptions.xul \
201 $(SRC_FIREFOX)/chrome/content/yslowOverlay.xul \
202 $(BUILD_FIREFOX)/chrome/content/
203 @cp $(SRC_FIREFOX)/chrome/content/yslow/ad_rules.js \
204 $(SRC_FIREFOX)/chrome/content/yslow/jslintwrapper.js \
205 $(SRC_FIREFOX)/chrome/content/yslow/net.js \
206 $(SRC_FIREFOX)/chrome/content/yslow/printable.css \
207 $(SRC_FIREFOX)/chrome/content/yslow/tool.css \
208 $(SRC_FIREFOX)/chrome/content/yslow/tools.js \
209 $(BUILD_FIREFOX)/chrome/content/yslow/
210 @cp $(SRC_FIREFOX)/chrome/content/yslow/lib/beautify.js \
211 $(SRC_FIREFOX)/chrome/content/yslow/lib/cssmin.js \
212 $(SRC_FIREFOX)/chrome/content/yslow/lib/fulljslint.js \
213 $(SRC_FIREFOX)/chrome/content/yslow/lib/fulljsmin.js \
214 $(SRC_FIREFOX)/chrome/content/yslow/lib/json2.js \
215 $(BUILD_FIREFOX)/chrome/content/yslow/lib/
216 @cp $(IMG)/logo_32x32.png \
217 $(BUILD_FIREFOX)/chrome/content/yslow/img/
218 @cp $(SRC_COMMON)/yslow.js \
219 $(SRC_COMMON)/componentSet.js \
220 $(SRC_COMMON)/controller.js \
221 $(SRC_COMMON)/util.js \
222 $(SRC_COMMON)/doc.js \
223 $(SRC_COMMON)/rules.js \
224 $(SRC_COMMON)/resultset.js \
225 $(SRC_COMMON)/context.js \
226 $(SRC_COMMON)/renderers.js \
227 $(SRC_COMMON)/yslow.css \
228 $(BUILD_FIREFOX)/chrome/content/yslow/
20990d7 Brokedown setComponentDetails per platform
Marcel Duran authored
229 @cat $(SRC_COMMON)/component.js \
230 $(SRC_FIREFOX)/chrome/content/yslow/component.js \
231 > $(BUILD_FIREFOX)/chrome/content/yslow/component.js
ae58e65 initial commit
Marcel Duran authored
232 @cat $(SRC_COMMON)/version.js | \
233 sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
234 > $(BUILD_FIREFOX)/chrome/content/yslow/version.js
235 @cat $(SRC_COMMON)/peeler.js \
236 $(SRC_FIREFOX)/chrome/content/yslow/peeler.js \
237 > $(BUILD_FIREFOX)/chrome/content/yslow/peeler.js
238 @cat $(SRC_COMMON)/view.js \
239 $(SRC_FIREFOX)//chrome/content/view.js \
240 > $(BUILD_FIREFOX)/chrome/content/view.js
241 @cat $(SRC_FIREFOX)/install.rdf | \
242 sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
243 > $(BUILD_FIREFOX)/install.rdf
244 @cp $(SRC_COMMON)/yslow.css \
245 $(SRC_COMMON)/tabview.css \
246 $(BUILD_FIREFOX)/chrome/content/yslow/
247 @echo "done"
248
249 har:
250 @echo "building HAR IMPORTER..."
251 @if [ ! -d $(BUILD_HAR) ]; then mkdir -p $(BUILD_HAR); fi
252 @cat $(SRC_COMMON)/yslow.js \
253 $(SRC_COMMON)/version.js \
254 $(SRC_COMMON)/componentSet.js \
255 $(SRC_COMMON)/component.js \
20990d7 Brokedown setComponentDetails per platform
Marcel Duran authored
256 $(SRC_HAR)/component.js \
ae58e65 initial commit
Marcel Duran authored
257 $(SRC_COMMON)/context.js \
258 $(SRC_COMMON)/controller.js \
259 $(SRC_COMMON)/util.js \
260 $(SRC_COMMON)/doc.js \
261 $(SRC_COMMON)/rules.js \
262 $(SRC_COMMON)/resultset.js \
263 $(SRC_COMMON)/peeler.js \
264 $(SRC_HAR)/har-importer.js \
265 $(SRC_HAR)/export.js | \
266 sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
267 > $(BUILD_HAR)/yslow-har.js
268 @echo "done"
269
270 nodejs: har
271 @echo "building NODE.JS HAR IMPORTER..."
272 @if [ ! -d $(BUILD_NODEJS)/node_modules ]; then mkdir -p $(BUILD_NODEJS)/node_modules; fi
273 @cp $(BUILD_HAR)/yslow-har.js \
274 $(BUILD_NODEJS)/node_modules/yslow.js
275 @cat $(SRC_NODEJS)/executable \
276 $(SRC_NODEJS)/controller.js \
277 > $(BUILD_NODEJS)/yslow
278 @chmod +x $(BUILD_NODEJS)/yslow
279 @echo "done"
280
281 opera:
282 @echo "building OPERA EXTENSION..."
283 @if [ ! -d $(BUILD_OPERA) ]; then mkdir -p $(BUILD_OPERA); fi
284 @if [ ! -d $(BUILD_OPERA)/images ]; then mkdir -p $(BUILD_OPERA)/images; fi
285 @if [ ! -d $(BUILD_OPERA)/includes ]; then mkdir -p $(BUILD_OPERA)/includes; fi
286 @cp $(SRC_OPERA)/background.js \
287 $(SRC_OPERA)/index.html \
288 $(BUILD_OPERA)/
289 @cp $(SRC_OPERA)/images/icon_18.png \
290 $(SRC_OPERA)/images/icon_64.png \
291 $(BUILD_OPERA)/images/
292 @cp $(SRC_OPERA)/includes/injected.js \
293 $(BUILD_OPERA)/includes/
294 @sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
295 $(SRC_OPERA)/config.xml \
296 > $(BUILD_OPERA)/config.xml
297 @echo "done"
298
299 safari:
300 @echo "building SAFARI EXTENSION..."
301 @if [ ! -d $(BUILD_SAFARI) ]; then mkdir -p $(BUILD_SAFARI); fi
302 @cp $(SRC_SAFARI)/16.png \
303 $(SRC_SAFARI)/Icon-32.png \
304 $(SRC_SAFARI)/Icon-48.png \
305 $(SRC_SAFARI)/Settings.plist \
306 $(SRC_SAFARI)/global.html \
307 $(SRC_SAFARI)/injected.js \
308 $(BUILD_SAFARI)/
309 @sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
310 $(SRC_SAFARI)/Info.plist \
311 > $(BUILD_SAFARI)/Info.plist
312 @echo "done"
313
314 wsh: har
315 @echo "building WSH HAR IMPORTER..."
316 @if [ ! -d $(BUILD_WSH) ]; then mkdir -p $(BUILD_WSH); fi
317 @cat $(SRC_WSH)/json2.js \
318 $(BUILD_HAR)/yslow-har.js \
319 $(SRC_WSH)/controller.js \
320 > $(BUILD_WSH)/yslow.js
321 @echo "done"
322
323 rhino: har
324 @echo "building RHINO HAR IMPORTER..."
3615b4d fixed rhino build
Marcel Duran authored
325 @if [ ! -d $(BUILD_RHINO)/lib ]; then mkdir -p $(BUILD_RHINO)/lib; fi
ae58e65 initial commit
Marcel Duran authored
326 @cp $(BUILD_HAR)/yslow-har.js \
327 $(BUILD_RHINO)/lib/yslow.js
3615b4d fixed rhino build
Marcel Duran authored
328 @cp $(SRC_RHINO)/env.rhino.1.2.js \
329 $(SRC_RHINO)/blank.html \
ae58e65 initial commit
Marcel Duran authored
330 $(BUILD_RHINO)/lib/
3615b4d fixed rhino build
Marcel Duran authored
331 @cp $(SRC_RHINO)/controller.js \
ae58e65 initial commit
Marcel Duran authored
332 $(BUILD_RHINO)/yslow.js
333 @echo "done"
334
327c5c5 Added phantomjs flavor
Marcel Duran authored
335 phantomjs:
336 @echo "building PHANTOMJS..."
337 @if [ ! -d $(BUILD_PHANTOMJS) ]; then mkdir -p $(BUILD_PHANTOMJS); fi
338 @(sed '/YSLOW HERE/q;' $(SRC_PHANTOMJS)/controller.js; \
339 cat $(SRC_COMMON)/yslow.js \
340 $(SRC_COMMON)/version.js \
341 $(SRC_COMMON)/componentSet.js \
342 $(SRC_COMMON)/component.js \
343 $(SRC_PHANTOMJS)/component.js \
344 $(SRC_COMMON)/controller.js \
345 $(SRC_COMMON)/util.js \
346 $(SRC_COMMON)/doc.js \
347 $(SRC_COMMON)/rules.js \
348 $(SRC_COMMON)/resultset.js \
349 $(SRC_COMMON)/view.js \
350 $(SRC_COMMON)/context.js \
351 $(SRC_COMMON)/renderers.js \
352 $(SRC_COMMON)/peeler.js \
353 $(SRC_COMMON)/peeler-bm-ch-ph.js; \
354 tail -r $(SRC_PHANTOMJS)/controller.js | sed '/YSLOW HERE/q' | tail -r ) | sed '/YSLOW HERE/d' \
355 > $(BUILD_PHANTOMJS)/yslow.js
356 @sed -i -e "s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/" $(BUILD_PHANTOMJS)/yslow.js
357 @echo "done"
358
ae58e65 initial commit
Marcel Duran authored
359 clean-yui:
360 @echo "cleaning YUI..."
361 @if [ -f $(BUILD_YUI)/yui.js ]; then rm $(BUILD_YUI)/yui.js; fi
362 @if [ -f $(BUILD_YUI)/yui-min.js ]; then rm $(BUILD_YUI)/yui-min.js; fi
363 @if [ -d $(BUILD_YUI) ]; then rmdir $(BUILD_YUI); fi
364 @echo "done"
365
366 clean-bookmarklet: clean-yui
367 @echo "cleaning BOOKMARKLET..."
368 @if [ -f $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_JS) ]; then rm $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_JS); fi
369 @if [ -f $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_JS) ]; then rm $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_JS); fi
370 @if [ -f $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_CSS) ]; then rm $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_CSS); fi
371 @if [ -d $(BUILD_BOOKMARKLET) ]; then rmdir $(BUILD_BOOKMARKLET); fi
372 @echo "done"
373
374 clean-chrome:
375 @echo "cleaning CHROME EXTENSION..."
376 @if [ -f $(BUILD_CHROME)/128.png ]; then rm $(BUILD_CHROME)/128.png; fi
377 @if [ -f $(BUILD_CHROME)/16.png ]; then rm $(BUILD_CHROME)/16.png; fi
378 @if [ -f $(BUILD_CHROME)/32.png ]; then rm $(BUILD_CHROME)/32.png; fi
379 @if [ -f $(BUILD_CHROME)/48.png ]; then rm $(BUILD_CHROME)/48.png; fi
380 @if [ -f $(BUILD_CHROME)/background.html ]; then rm $(BUILD_CHROME)/background.html; fi
381 @if [ -f $(BUILD_CHROME)/options.html ]; then rm $(BUILD_CHROME)/options.html; fi
382 @if [ -f $(BUILD_CHROME)/content.js ]; then rm $(BUILD_CHROME)/content.js; fi
383 @if [ -f $(BUILD_CHROME)/pref-init.js ]; then rm $(BUILD_CHROME)/pref-init.js; fi
384 @if [ -f $(BUILD_CHROME)/controller.js ]; then rm $(BUILD_CHROME)/controller.js; fi
385 @if [ -f $(BUILD_CHROME)/icon.png ]; then rm $(BUILD_CHROME)/icon.png; fi
386 @if [ -f $(BUILD_CHROME)/yslow.html ]; then rm $(BUILD_CHROME)/yslow.html; fi
387 @if [ -f $(BUILD_CHROME)/yslow-chrome.js ]; then rm $(BUILD_CHROME)/yslow-chrome.js; fi
388 @if [ -f $(BUILD_CHROME)/manifest.json ]; then rm $(BUILD_CHROME)/manifest.json; fi
389 @if [ -f $(BUILD_CHROME)/style.css ]; then rm $(BUILD_CHROME)/style.css; fi
390 @if [ -d $(BUILD_CHROME) ]; then rmdir $(BUILD_CHROME); fi
391 @echo "done"
392
393 clean-firefox:
394 @echo "cleaning FIREFOX ADD-ON..."
395 @if [ -f $(BUILD_FIREFOX)/chrome.manifest ]; then rm $(BUILD_FIREFOX)/chrome.manifest; fi
396 @if [ -f $(BUILD_FIREFOX)/license.txt ]; then rm $(BUILD_FIREFOX)/license.txt; fi
397 @if [ -f $(BUILD_FIREFOX)/defaults/preferences/yslow.js ]; then rm $(BUILD_FIREFOX)/defaults/preferences/yslow.js; fi
398 @if [ -f $(BUILD_FIREFOX)/chrome/skin/yslow.css ]; then rm $(BUILD_FIREFOX)/chrome/skin/yslow.css; fi
399 @if [ -f $(BUILD_FIREFOX)/chrome/content/bindings.xml ]; then rm $(BUILD_FIREFOX)/chrome/content/bindings.xml; fi
400 @if [ -f $(BUILD_FIREFOX)/chrome/content/browser.xul ]; then rm $(BUILD_FIREFOX)/chrome/content/browser.xul; fi
401 @if [ -f $(BUILD_FIREFOX)/chrome/content/exporter.js ]; then rm $(BUILD_FIREFOX)/chrome/content/exporter.js; fi
402 @if [ -f $(BUILD_FIREFOX)/chrome/content/platform-ff.js ]; then rm $(BUILD_FIREFOX)/chrome/content/platform-ff.js; fi
403 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow-ff-pref.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow-ff-pref.js; fi
404 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow-firebug-net.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow-firebug-net.js; fi
405 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow-firebug.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow-firebug.js; fi
406 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow-firefox-net.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow-firefox-net.js; fi
407 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow-firefox.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow-firefox.js; fi
408 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslowOptions.xul ]; then rm $(BUILD_FIREFOX)/chrome/content/yslowOptions.xul; fi
409 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslowOverlay.xul ]; then rm $(BUILD_FIREFOX)/chrome/content/yslowOverlay.xul; fi
410 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/ad_rules.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/ad_rules.js; fi
411 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/jslintwrapper.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/jslintwrapper.js; fi
412 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/net.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/net.js; fi
413 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/printable.css ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/printable.css; fi
414 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/tool.css ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/tool.css; fi
415 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/tools.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/tools.js; fi
416 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/lib/beautify.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/lib/beautify.js; fi
417 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/lib/cssmin.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/lib/cssmin.js; fi
418 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/lib/fulljslint.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/lib/fulljslint.js; fi
419 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/lib/fulljsmin.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/lib/fulljsmin.js; fi
420 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/lib/json2.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/lib/json2.js; fi
421 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/img/logo_32x32.png ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/img/logo_32x32.png; fi
422 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/yslow.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/yslow.js; fi
423 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/componentSet.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/componentSet.js; fi
424 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/component.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/component.js; fi
425 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/controller.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/controller.js; fi
426 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/util.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/util.js; fi
427 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/doc.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/doc.js; fi
428 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/rules.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/rules.js; fi
429 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/resultset.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/resultset.js; fi
430 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/context.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/context.js; fi
431 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/renderers.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/renderers.js; fi
432 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/yslow.css ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/yslow.css; fi
433 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/version.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/version.js; fi
434 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/peeler.js ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/peeler.js; fi
435 @if [ -f $(BUILD_FIREFOX)/chrome/content/view.js ]; then rm $(BUILD_FIREFOX)/chrome/content/view.js; fi
436 @if [ -f $(BUILD_FIREFOX)/install.rdf ]; then rm $(BUILD_FIREFOX)/install.rdf; fi
437 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/yslow.css ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/yslow.css; fi
438 @if [ -f $(BUILD_FIREFOX)/chrome/content/yslow/tabview.css ]; then rm $(BUILD_FIREFOX)/chrome/content/yslow/tabview.css; fi
439 @if [ -d $(BUILD_FIREFOX)/chrome/content/yslow/img ]; then rmdir $(BUILD_FIREFOX)/chrome/content/yslow/img; fi
440 @if [ -d $(BUILD_FIREFOX)/chrome/content/yslow/lib ]; then rmdir $(BUILD_FIREFOX)/chrome/content/yslow/lib; fi
441 @if [ -d $(BUILD_FIREFOX)/chrome/content/yslow ]; then rmdir $(BUILD_FIREFOX)/chrome/content/yslow; fi
442 @if [ -d $(BUILD_FIREFOX)/chrome/content ]; then rmdir $(BUILD_FIREFOX)/chrome/content; fi
443 @if [ -d $(BUILD_FIREFOX)/chrome/skin ]; then rmdir $(BUILD_FIREFOX)/chrome/skin; fi
444 @if [ -d $(BUILD_FIREFOX)/chrome ]; then rmdir $(BUILD_FIREFOX)/chrome; fi
445 @if [ -d $(BUILD_FIREFOX)/defaults/preferences ]; then rmdir $(BUILD_FIREFOX)/defaults/preferences; fi
446 @if [ -d $(BUILD_FIREFOX)/defaults ]; then rmdir $(BUILD_FIREFOX)/defaults; fi
447 @if [ -d $(BUILD_FIREFOX) ]; then rmdir $(BUILD_FIREFOX); fi
448 @echo "done"
449
450 clean-har:
451 @echo "cleaning HAR IMPORTER..."
452 @if [ -f $(BUILD_HAR)/yslow-har.js ]; then rm $(BUILD_HAR)/yslow-har.js; fi
453 @if [ -d $(BUILD_HAR) ]; then rmdir $(BUILD_HAR); fi
454 @echo "done"
455
456 clean-nodejs:
457 @echo "cleaning NODE.JS HAR IMPORTER..."
458 @if [ -f $(BUILD_NODEJS)/node_modules/yslow.js ]; then rm $(BUILD_NODEJS)/node_modules/yslow.js; fi
459 @if [ -f $(BUILD_NODEJS)/yslow ]; then rm $(BUILD_NODEJS)/yslow; fi
460 @if [ -d $(BUILD_NODEJS)/node_modules ]; then rmdir $(BUILD_NODEJS)/node_modules; fi
461 @if [ -d $(BUILD_NODEJS) ]; then rmdir $(BUILD_NODEJS); fi
462 @echo "done"
463
464 clean-opera:
465 @echo "cleaning OPERA EXTENSION..."
466 @if [ -f $(BUILD_OPERA)/background.js ]; then rm $(BUILD_OPERA)/background.js; fi
467 @if [ -f $(BUILD_OPERA)/config.xml ]; then rm $(BUILD_OPERA)/config.xml; fi
468 @if [ -f $(BUILD_OPERA)/index.html ]; then rm $(BUILD_OPERA)/index.html; fi
469 @if [ -f $(BUILD_OPERA)/images/icon_18.png ]; then rm $(BUILD_OPERA)/images/icon_18.png; fi
470 @if [ -f $(BUILD_OPERA)/images/icon_64.png ]; then rm $(BUILD_OPERA)/images/icon_64.png; fi
471 @if [ -f $(BUILD_OPERA)/includes/injected.js ]; then rm $(BUILD_OPERA)/includes/injected.js; fi
472 @if [ -d $(BUILD_OPERA)/images/ ]; then rmdir $(BUILD_OPERA)/images/; fi
473 @if [ -d $(BUILD_OPERA)/includes/ ]; then rmdir $(BUILD_OPERA)/includes/; fi
474 @if [ -d $(BUILD_OPERA) ]; then rmdir $(BUILD_OPERA); fi
475 @echo "done"
476
477 clean-safari:
478 @echo "cleaning SAFARI EXTENSION..."
479 @if [ -f $(BUILD_SAFARI)/16.png ]; then rm $(BUILD_SAFARI)/16.png; fi
480 @if [ -f $(BUILD_SAFARI)/Icon-32.png ]; then rm $(BUILD_SAFARI)/Icon-32.png; fi
481 @if [ -f $(BUILD_SAFARI)/Icon-48.png ]; then rm $(BUILD_SAFARI)/Icon-48.png; fi
482 @if [ -f $(BUILD_SAFARI)/Info.plist ]; then rm $(BUILD_SAFARI)/Info.plist; fi
483 @if [ -f $(BUILD_SAFARI)/Settings.plist ]; then rm $(BUILD_SAFARI)/Settings.plist; fi
484 @if [ -f $(BUILD_SAFARI)/global.html ]; then rm $(BUILD_SAFARI)/global.html; fi
485 @if [ -f $(BUILD_SAFARI)/injected.js ]; then rm $(BUILD_SAFARI)/injected.js; fi
486 @if [ -d $(BUILD_SAFARI) ]; then rmdir $(BUILD_SAFARI); fi
487 @if [ -d $(BUILD_SAFARI_ROOT) ]; then rmdir $(BUILD_SAFARI_ROOT); fi
488 @echo "done"
489
490 clean-wsh:
491 @echo "cleaning WSH HAR IMPORTER..."
492 @if [ -f $(BUILD_WSH)/yslow.js ]; then rm $(BUILD_WSH)/yslow.js; fi
493 @if [ -d $(BUILD_WSH) ]; then rmdir $(BUILD_WSH); fi
494 @echo "done"
495
496 clean-rhino:
497 @echo "cleaning RHINO HAR IMPORTER..."
498 @if [ -f $(BUILD_RHINO)/lib/yslow.js ]; then rm $(BUILD_RHINO)/lib/yslow.js; fi
499 @if [ -f $(BUILD_RHINO)/lib/env.rhino.1.2.js ]; then rm $(BUILD_RHINO)/lib/env.rhino.1.2.js; fi
500 @if [ -f $(BUILD_RHINO)/lib/blank.html ]; then rm $(BUILD_RHINO)/lib/blank.html; fi
501 @if [ -f $(BUILD_RHINO)/yslow.js ]; then rm $(BUILD_RHINO)/yslow.js; fi
502 @if [ -d $(BUILD_RHINO)/lib ]; then rmdir $(BUILD_RHINO)/lib; fi
503 @if [ -d $(BUILD_RHINO) ]; then rmdir $(BUILD_RHINO); fi
504 @echo "done"
505
327c5c5 Added phantomjs flavor
Marcel Duran authored
506 clean-phantomjs:
507 @echo "cleaning PHANTOMJS..."
508 @if [ -f $(BUILD_PHANTOMJS)/yslow.js ]; then rm $(BUILD_PHANTOMJS)/yslow.js; fi
509 @if [ -d $(BUILD_PHANTOMJS) ]; then rmdir $(BUILD_PHANTOMJS); fi
510 @echo "done"
ae58e65 initial commit
Marcel Duran authored
511
512 pkg-bookmarklet: BM_CONFIG := config-ycs.js
513 pkg-bookmarklet: yui bookmarklet-files
514 @echo "packaging BOOKMARKLET..."
515 @if [ ! -d $(PKG_BOOKMARKLET)/$(YSLOW_VERSION) ]; then mkdir -p $(PKG_BOOKMARKLET)/$(YSLOW_VERSION); fi
516 @if [ -f $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_JS) ]; then \
517 echo "$(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_JS) already exists"; \
518 exit 1; \
519 fi
520 @if [ -f $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_CSS) ]; then \
521 echo "$(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_CSS) already exists"; \
522 exit 1; \
523 fi
524 @echo " minifying YUI..."
dad4e50 bumped yuicompressor version and changed its execution calls
Marcel Duran authored
525 @$(YUICOMPRESSOR) $(BUILD_YUI)/yui$(YUI_MODE).js -o $(BUILD_YUI)/yui$(YUI_MODE)-min.js
ae58e65 initial commit
Marcel Duran authored
526 @rm $(BUILD_YUI)/yui$(YUI_MODE).js
527 @echo " done"
528 @echo " minifying BOOKMARKLET files..."
dad4e50 bumped yuicompressor version and changed its execution calls
Marcel Duran authored
529 @$(YUICOMPRESSOR) $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_JS) -o $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_YSLOW_JS)
ae58e65 initial commit
Marcel Duran authored
530 @rm $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_JS)
dad4e50 bumped yuicompressor version and changed its execution calls
Marcel Duran authored
531 @$(YUICOMPRESSOR) $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_CSS) -o $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_YSLOW_CSS)
ae58e65 initial commit
Marcel Duran authored
532 @rm $(BUILD_BOOKMARKLET)/$(BOOKMARKLET_YSLOW_CSS)
533 @echo " done"
534 @echo " merging minified YUI and BOOKMARKLET..."
327c5c5 Added phantomjs flavor
Marcel Duran authored
535 @cat $(YUI_LICENSE) \
536 > $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_JS)
537 @cat $(BUILD_YUI)/yui$(YUI_MODE)-min.js \
538 >> $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_JS)
539 @echo "" >> $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_JS)
540 @cat $(YSLOW_LICENSE) \
541 >> $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_JS)
542 @cat $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_YSLOW_JS) \
543 >> $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_JS)
ae58e65 initial commit
Marcel Duran authored
544 @rm $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_YSLOW_JS) \
545 $(BUILD_YUI)/yui$(YUI_MODE)-min.js
546 @cat $(YSLOW_LICENSE) \
547 $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_YSLOW_CSS) \
548 > $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_CSS)
549 @rm $(PKG_BOOKMARKLET)/$(YSLOW_VERSION)/$(BOOKMARKLET_YSLOW_CSS)
550 @echo " done"
551 @echo "done"
552
553 pkg-chrome: chrome
554 @echo "packaging CHROME EXTENSION..."
555 @if [ ! -d $(PKG_CHROME) ]; then mkdir -p $(PKG_CHROME); fi
556 @if [ -f $(PKG_CHROME)/yslow-chrome-$(YSLOW_VERSION).zip ]; then \
557 echo "$(PKG_CHROME)/yslow-chrome-$(YSLOW_VERSION).zip already exists"; \
558 exit 1; \
559 fi
560 @cd $(BUILD_CHROME); \
561 zip ../../$(PKG_CHROME)/yslow-chrome-$(YSLOW_VERSION).zip \
562 128.png \
563 16.png \
564 32.png \
565 48.png \
566 background.html \
567 options.html \
568 content.js \
569 pref-init.js \
570 controller.js \
571 icon.png \
572 manifest.json \
573 style.css \
574 yslow-chrome.js \
575 yslow.html
576 @echo "done"
577
578 pkg-firefox: firefox
579 @echo "packaging FIREFOX ADD-ON..."
580 @if [ ! -d $(PKG_FIREFOX) ]; then mkdir -p $(PKG_FIREFOX); fi
581 @if [ -f $(PKG_FIREFOX)/yslow-firefox-$(YSLOW_VERSION).xpi ]; then \
582 echo "$(PKG_FIREFOX)/yslow-firefox-$(YSLOW_VERSION).xpi already exists"; \
583 exit 1; \
584 fi
585 @cd $(BUILD_FIREFOX); \
586 zip -r ../../$(PKG_FIREFOX)/yslow-firefox-$(YSLOW_VERSION).xpi *
587 @echo "done"
588
589 pkg-nodejs: nodejs
590 @echo "packaging NODE.JS HAR IMPORTER..."
591 @if [ -d $(PKG_NODEJS)/yslow-$(YSLOW_VERSION) ]; then \
592 echo "$(PKG_NODEJS)/yslow-$(YSLOW_VERSION) already exists"; \
593 exit 1; \
594 fi
595 @mkdir -p $(PKG_NODEJS)/yslow-$(YSLOW_VERSION)/lib
596 @mkdir -p $(PKG_NODEJS)/yslow-$(YSLOW_VERSION)/bin
597 @cp $(BUILD_NODEJS)/node_modules/yslow.js \
598 $(PKG_NODEJS)/yslow-$(YSLOW_VERSION)/lib/yslow.js
599 @cp $(BUILD_NODEJS)/yslow \
600 $(PKG_NODEJS)/yslow-$(YSLOW_VERSION)/bin/yslow
601 @sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
602 $(SRC_NODEJS)/package.json \
603 > $(PKG_NODEJS)/yslow-$(YSLOW_VERSION)/package.json
604 @echo "done"
605
606 pkg-opera: opera
607 @echo "packaging OPERA EXTENSION..."
608 @if [ ! -d $(PKG_OPERA) ]; then mkdir -p $(PKG_OPERA); fi
609 @if [ -f $(PKG_OPERA)/yslow-opera-$(YSLOW_VERSION).oex ]; then \
610 echo "$(PKG_OPERA)/yslow-opera-$(YSLOW_VERSION).oex already exists"; \
611 exit 1; \
612 fi
613 @cd $(BUILD_OPERA); \
614 zip ../../$(PKG_OPERA)/yslow-opera-$(YSLOW_VERSION).oex \
615 background.js \
616 config.xml \
617 index.html \
618 images/icon_18.png \
619 images/icon_64.png \
620 includes/injected.js
621 @echo "done"
622
623 pkg-safari: safari
624 @echo "packaging SAFARI EXTENSION..."
625 @if [ ! -d $(PKG_SAFARI) ]; then mkdir -p $(PKG_SAFARI); fi
626 @if [ -f $(PKG_SAFARI)/yslow-$(YSLOW_VERSION).safariextz ]; then \
627 echo "$(PKG_SAFARI)/yslow-$(YSLOW_VERSION).safariextz already exists"; \
628 exit 1; \
629 fi
630 @if [ -f $(PKG_SAFARI)/update-$(YSLOW_VERSION).plist ]; then \
631 echo "$(PKG_SAFARI)/update-$(YSLOW_VERSION).plist already exists"; \
632 exit 1; \
633 fi
634 # CURRENTLY XAR DOES NOT SIGN EXTENSION, USE SAFARI INSTEAD
635 # @cd $(BUILD_SAFARI); \
636 # xar -cv -f ../../../$(PKG_SAFARI)/yslow-$(YSLOW_VERSION).safariextz \
637 # 16.png \
638 # Icon-32.png \
639 # Icon-48.png \
640 # Info.plist \
641 # Settings.plist \
642 # global.html \
643 # injected.js
644 @sed s/{{YSLOW_VERSION}}/$(YSLOW_VERSION)/ \
645 $(SRC_SAFARI)/update.plist \
646 > $(PKG_SAFARI)/update-$(YSLOW_VERSION).plist
647 @echo "done"
648 @echo "*** NOTE ***"
649 @echo "Use Safari to sign and build extension from $(BUILD_SAFARI) then save as $(PKG_SAFARI)/yslow-$(YSLOW_VERSION).safariextz"
650 @echo "Push $(PKG_SAFARI)/yslow-$(YSLOW_VERSION).safariextz to http://d.yimg.com/jc/safari/yslow.safariextz"
651 @echo "Push $(PKG_SAFARI)/update-$(YSLOW_VERSION).plist to http://d.yimg.com/jc/safari/update.plist"
652
653 pkg-wsh: wsh
654 @echo "packaging WSH HAR IMPORTER..."
655 @if [ -f $(PKG_WSH)/yslow-$(YSLOW_VERSION).js ]; then \
656 echo "$(PKG_WSH)/yslow-$(YSLOW_VERSION).js already exists"; \
657 exit 1; \
658 fi
659 @mkdir -p $(PKG_WSH)
660 @cp $(BUILD_WSH)/yslow.js \
661 $(PKG_WSH)/yslow-$(YSLOW_VERSION).js
662 @echo "done"
663
664 pkg-rhino: rhino
665 @echo "packaging RHINO HAR IMPORTER..."
666 @if [ -d $(PKG_RHINO)/yslow-$(YSLOW_VERSION) ]; then \
667 echo "$(PKG_RHINO)/yslow-$(YSLOW_VERSION) already exists"; \
668 exit 1; \
669 fi
670 @mkdir -p $(PKG_RHINO)/yslow-$(YSLOW_VERSION)/lib
671 @cp $(BUILD_RHINO)/yslow.js \
672 $(PKG_RHINO)/yslow-$(YSLOW_VERSION)/
673 @cp $(BUILD_RHINO)/lib/yslow.js \
674 $(BUILD_RHINO)/lib/env.rhino.1.2.js \
675 $(BUILD_RHINO)/lib/blank.html \
676 $(PKG_RHINO)/yslow-$(YSLOW_VERSION)lib/
677 @echo "done"
327c5c5 Added phantomjs flavor
Marcel Duran authored
678
679 pkg-phantomjs: phantomjs
680 @echo "packaging PHANTOMJS..."
681 @if [ -d $(PKG_PHANTOMJS)/$(YSLOW_VERSION) ]; then \
682 echo "$(PKG_PHANTOMJS)/$(YSLOW_VERSION) already exists"; \
683 exit 1; \
684 fi
685 @mkdir -p $(PKG_PHANTOMJS)/$(YSLOW_VERSION)
686 @cat $(YSLOW_LICENSE) > $(PKG_PHANTOMJS)/$(YSLOW_VERSION)/yslow.js
687 @$(YUICOMPRESSOR) $(BUILD_PHANTOMJS)/yslow.js >> $(PKG_PHANTOMJS)/$(YSLOW_VERSION)/yslow.js
688 @echo "done"
Something went wrong with that request. Please try again.