diff options
author | Trevor Elliott <trevor@galois.com> | 2013-05-16 16:24:59 -0700 |
---|---|---|
committer | Trevor Elliott <trevor@galois.com> | 2013-05-16 16:24:59 -0700 |
commit | 25b014cdf44ed378413a7cb945b8c112ee9b9915 (patch) | |
tree | de442bc7015c2218dbe50e173aa1a8e0f5467981 /contexts | |
parent | 710d23f24d5ad3c1b57ef8f2069615301aaedc8c (diff) |
Build a likely broken fiveui.xpi
Diffstat (limited to 'contexts')
-rw-r--r-- | contexts/build.mk | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/contexts/build.mk b/contexts/build.mk index e259371..6b3e632 100644 --- a/contexts/build.mk +++ b/contexts/build.mk @@ -95,6 +95,9 @@ chrome-dir := $(path)/chrome all: $(topdir)/fiveui.crx +clean:: + $(RM) $(topdir)/fiveui.crx + $(topdir)/fiveui.crx: $(build-dir)/fiveui.crx $(call cmd,cp) @@ -107,8 +110,7 @@ $(build-dir)/fiveui.crx: $(target-dir)/chrome-background.js \ | $(stage-dir)/data/fiveui/images $(call label,MAKECRX $(call drop-prefix,$@)) ( cd $(build-dir) \ && $(topdir)/tools/bin/makecrx stage \ - $(topdir)/contexts/chrome/fiveui.pem \ - fiveui \ + $(topdir)/contexts/chrome/fiveui.pem fiveui \ $(redir) ) @@ -130,3 +132,46 @@ $(target-dir)/chrome-options.js: $(options-deps) \ $(chrome-src)/chrome-options.js \ | $(target-dir) $(call cmd,compilejs) + + +# Firefox Compilation ########################################################## + +addon-sdk := $(topdir)/tools/addon-sdk + +all: $(topdir)/fiveui.xpi + +clean:: + $(RM) $(topdir)/fiveui.xpi + +$(topdir)/fiveui.xpi: $(build-dir)/fiveui.xpi + $(call cmd,cp) + + +# wrapper for setting up the environment for the running the cfx command +cfx = ( cd $(addon-sdk) $(redir) && \ + . bin/activate $(redir) && \ + cd $(build-dir) $(redir) && \ + cfx $1 $(redir) ) + +# build the actual extension +$(build-dir)/fiveui.xpi: \ + $(stage-dir)/package.json \ + $(target-dir)/firefox-main.js \ + | $(topdir)/profiles/firefox + $(call label,XPI $(call drop-prefix,$@))\ + $(call cfx,xpi -p $(topdir)/profiles/firefox \ + --pkgdir=$(stage-dir) ) + +# stage the package description +$(stage-dir)/package.json: $(path)/package.json | $(stage-dir) + $(call cmd,cp) + +# build the main script +$(target-dir)/firefox-main.js: \ + $(fiveui-dir)/settings.js \ + $(fiveui-dir)/messenger.js \ + $(fiveui-dir)/rules.js \ + $(fiveui-dir)/background.js \ + $(fiveui-dir)/utils.js \ + | $(target-dir) + $(call cmd,compilejs) |