aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Trevor Elliott <trevor@galois.com>2013-06-07 16:48:12 -0700
committerGravatar Trevor Elliott <trevor@galois.com>2013-06-07 16:48:17 -0700
commit8967b310b2fa27fc675351583af9e5d800df1f37 (patch)
treea9cea8dd5456543da355f843eeb2e7ffea89fa3a
parent8b5d3c6b75744cf5938f253d20f367999e92b1a7 (diff)
Split extension packaging into a separate target
-rw-r--r--Makefile3
-rw-r--r--src/js/chrome/build.mk19
-rw-r--r--src/js/firefox/build.mk10
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) )