Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding Makefile and .gitignore

  • Loading branch information...
commit 5d71ea55ad1b4b7af7b42b4cc13861795b7e1559 1 parent b961c26
@normanr authored
Showing with 35 additions and 0 deletions.
  1. +3 −0  .gitignore
  2. +32 −0 Makefile
View
3  .gitignore
@@ -0,0 +1,3 @@
+.*.swp
+/Minimeter-fx.xpi
+/dist
View
32 Makefile
@@ -0,0 +1,32 @@
+.DEFAULT: dist
+.PHONY: dist distclean
+
+dist: Minimeter-fx.xpi
+
+clean:
+ rm -rf dist
+
+distclean: clean
+ rm -f Minimeter-fx.xpi
+
+chrome_files = $(shell cd chrome && find * -type f -not -name .*.swp)
+other_files = install.js install.rdf license.txt $(shell find defaults -type f)
+
+Minimeter-fx.xpi: dist/chrome/minimeter.jar dist/chrome.manifest $(addprefix dist/,$(other_files))
+ @echo zip -qr9 $@ dist
+ @cd dist && zip -qr9 ../$@ *
+
+dist/%: %
+ @-mkdir -p $(@D)
+ cp -a $< $@
+
+dist/chrome.manifest:
+ sed 's#\bchrome/#jar:chrome/minimeter.jar!/#' chrome.manifest > dist/chrome.manifest
+
+dist/chrome:
+ mkdir -p $@
+
+dist/chrome/minimeter.jar: dist/chrome $(addprefix chrome/,$(chrome_files))
+ @echo zip -qr0 $@ chrome
+ @cd chrome && zip -q0 ../$@ $(chrome_files)
+
Please sign in to comment.
Something went wrong with that request. Please try again.