Bug 1244187 - Add Makefile to build xpi. rs=me (npotb)
authorFelipe Gomes <felipc@gmail.com>
Thu, 11 Feb 2016 19:56:04 -0200
changeset 76 3ac53e8441223f530fd05b002bf393c43561e3af
parent 75 455cd6114b968cfbcfc1b15fa79a86097c602168
child 77 80c7c3ba66d5c0cbd655c5fc9c576c790a54202f
push id57
push userfelipc@gmail.com
push dateThu, 11 Feb 2016 23:14:52 +0000
reviewersme
bugs1244187
Bug 1244187 - Add Makefile to build xpi. rs=me (npotb)
experiments/e10s-beta45-withoutaddons/code/Makefile
copy from experiments/searchtest-turkey-release35/code/Makefile
copy to experiments/e10s-beta45-withoutaddons/code/Makefile
--- a/experiments/searchtest-turkey-release35/code/Makefile
+++ b/experiments/e10s-beta45-withoutaddons/code/Makefile
@@ -15,40 +15,44 @@ help:
 define_as_addon:
 	$(eval VERSION=addon)
 	$(eval XPI=addon.xpi)
 
 define_as_experiment:
 	$(eval VERSION=experiment)
 	$(eval XPI=experiment.xpi)
 
-addon: | define_as_addon copy_files build_xpi
+addon: | define_as_addon copy_files installrdf_foraddon build_xpi
 
-experiment: | define_as_experiment copy_files edit_installrdf build_xpi
+experiment: | define_as_experiment copy_files installrdf_forexperiment build_xpi
 
 copy_files: | $(VERSION)
 	@echo "\n-- Generating folder structure for $(VERSION) in '$(BUILD_DIR)/$(VERSION)'"
 
 	mkdir -p "$(BUILD_DIR)/$(VERSION)"
 	rsync -am --include='*.js' --include='*.css' --include='*.xul' --include='*.png' --include='*.manifest' --include='*.rdf' --include='*.xml' --exclude='build/*' -f 'hide,! */' . "$(BUILD_DIR)/$(VERSION)"
 
 # 	Clean up unwanted files
 	find "$(BUILD_DIR)/$(VERSION)" -depth -name '*~' -exec rm -rf "{}" \;
 	find "$(BUILD_DIR)/$(VERSION)" -depth -name '#*' -exec rm -rf "{}" \;
 	find "$(BUILD_DIR)/$(VERSION)" -depth -name '.DS_Store' -exec rm "{}" \;
 	find "$(BUILD_DIR)/$(VERSION)" -depth -name 'Thumbs.db' -exec rm "{}" \;
 	find "$(BUILD_DIR)/$(VERSION)" -depth -name 'filter.js' -exec rm "{}" \;
 
-edit_installrdf:
-	@echo "\n-- Setting experiment type to 128"
+installrdf_foraddon:
+	@echo "\n-- Setting add-on type to 2 (extension)"
+	sed -i "" "s/<em:type>128<\/em:type>/<em:type>2<\/em:type>/" "$(BUILD_DIR)/$(VERSION)/install.rdf"
+
+installrdf_forexperiment:
+	@echo "\n-- Setting add-on type to 128 (experiment)"
 	sed -i "" "s/<em:type>2<\/em:type>/<em:type>128<\/em:type>/" "$(BUILD_DIR)/$(VERSION)/install.rdf"
 
 build_xpi:
 	@echo "\n-- Packaging files as $(XPI)"
 # 	Create the XPI
 	rm -f "$(BUILD_DIR)/$(XPI)"
 	cd $(BUILD_DIR)/$(VERSION) && zip -qr9XD "../$(XPI)" * && cd ../..
 	@echo "\n--Done: $(BUILD_DIR)/$(XPI)"
 
 clean:
 	rm -rf "$(BUILD_DIR)/"
 
-.PHONY: help define_as_addon define_as_experiment addon experiment copy_files edit_installrdf build_xpi clean
+.PHONY: help define_as_addon define_as_experiment addon experiment copy_files installrdf_foraddon installrdf_forexperiment build_xpi clean