From 8967b310b2fa27fc675351583af9e5d800df1f37 Mon Sep 17 00:00:00 2001 From: Trevor Elliott Date: Fri, 7 Jun 2013 16:48:12 -0700 Subject: Split extension packaging into a separate target --- Makefile | 3 +++ src/js/chrome/build.mk | 19 ++++++++++++------- src/js/firefox/build.mk | 10 ++++++++-- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 6e84922..19778d3 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,9 @@ .PHONY: all all: +.PHONY: package +package: + .PHONY: unpack unpack: diff --git a/src/js/chrome/build.mk b/src/js/chrome/build.mk index b93cc6f..30c07f3 100644 --- a/src/js/chrome/build.mk +++ b/src/js/chrome/build.mk @@ -2,7 +2,9 @@ # Chrome Extension ############################################################# -all: $(build-dir)/fiveui.crx +all: stage-chrome + +package: $(build-dir)/fiveui.crx chrome-dir := $(path) @@ -12,7 +14,7 @@ chrome-build := $(build-dir)/chrome # Generic Extension Parts ###################################################### # pull in the base fiveui extension -$(eval $(call stage-fiveui,$(chrome-build),$(build-dir)/fiveui.crx)) +$(eval $(call stage-fiveui,$(chrome-build),stage-chrome)) # Chrome File Staging ########################################################## @@ -36,12 +38,15 @@ $(chrome-build): | $(build-dir) # Packaging #################################################################### +.PHONY: stage-chrome +stage-chrome: $(chrome-build)/manifest.json \ + $(chrome-build)/data/background.html \ + $(chrome-build)/data/js/platform-port.js \ + $(chrome-build)/data/js/platform-background.js \ + | $(chrome-build) + # generate the executable after copying over all files -$(build-dir)/fiveui.crx: $(chrome-build)/manifest.json \ - $(chrome-build)/data/background.html \ - $(chrome-build)/data/js/platform-port.js \ - $(chrome-build)/data/js/platform-background.js \ - | $(chrome-build) +$(build-dir)/fiveui.crx: stage-chrome $(call label,MAKECRX $(call drop-prefix,$@)) ( cd $(build-dir) \ && $(topdir)/tools/bin/makecrx $(chrome-build) \ $(topdir)/fiveui.pem fiveui \ diff --git a/src/js/firefox/build.mk b/src/js/firefox/build.mk index 6d2e20a..9f1caa8 100644 --- a/src/js/firefox/build.mk +++ b/src/js/firefox/build.mk @@ -1,7 +1,10 @@ # Firefox Extension ############################################################ -all: $(build-dir)/firefox.xpi +all: stage-firefox + +package: $(build-dir)/firefox.xpi + firefox-dir := $(path) @@ -82,7 +85,10 @@ stage-firefox: \ $(firefox-build)/data/icons/options-icon.js \ | $(firefox-build) -$(build-dir)/firefox.xpi: stage-firefox $(addon-sdk-unpacked) +$(build-dir)/firefox.xpi: \ + stage-firefox \ + $(addon-sdk-unpacked) \ + $(topdir)/profiles/firefox $(call label,XPI $(call drop-prefix,$@))\ $(call cfx,$(build-dir),xpi -p $(topdir)/profiles/firefox \ --pkgdir=$(firefox-build) ) -- cgit v1.2.3