2010-02-06 04:36:35 +01:00
|
|
|
NAME=svg-edit
|
|
|
|
VERSION=2.5
|
|
|
|
PACKAGE=$(NAME)-$(VERSION)
|
2010-04-02 06:56:21 +02:00
|
|
|
MAKEDOCS=naturaldocs/NaturalDocs
|
|
|
|
CLOSURE=build/tools/closure-compiler.jar
|
|
|
|
YUICOMPRESS=build/tools/yuicompressor.jar
|
2010-02-06 04:36:35 +01:00
|
|
|
ZIP=zip
|
|
|
|
|
|
|
|
all: release firefox opera
|
|
|
|
|
|
|
|
build/$(PACKAGE):
|
|
|
|
rm -rf config
|
|
|
|
mkdir config
|
2010-04-02 06:56:21 +02:00
|
|
|
if [ -x $(MAKEDOCS) ] ; then $(MAKEDOCS) -i editor/ -o html docs/ -p config/ -oft -r ; fi
|
2010-02-06 04:36:35 +01:00
|
|
|
mkdir -p build/$(PACKAGE)
|
|
|
|
cp -r editor/* build/$(PACKAGE)
|
|
|
|
-find build/$(PACKAGE) -name .svn -type d -exec rm -rf {} \;
|
|
|
|
# minify spin button
|
2010-04-02 06:56:21 +02:00
|
|
|
java -jar $(YUICOMPRESS) build/$(PACKAGE)/spinbtn/JQuerySpinBtn.js > build/$(PACKAGE)/spinbtn/JQuerySpinBtn.min.js
|
|
|
|
java -jar $(CLOSURE) --js build/$(PACKAGE)/spinbtn/JQuerySpinBtn.js --js_output_file build/$(PACKAGE)/spinbtn/JQuerySpinBtn.min-closure.js
|
2010-02-06 04:36:35 +01:00
|
|
|
# minify SVG-edit files
|
2010-04-02 06:56:21 +02:00
|
|
|
java -jar $(YUICOMPRESS) build/$(PACKAGE)/svg-editor.js > build/$(PACKAGE)/svg-editor.min.js
|
|
|
|
java -jar $(CLOSURE) --js build/$(PACKAGE)/svg-editor.js --js_output_file build/$(PACKAGE)/svg-editor.min-closure.js
|
|
|
|
java -jar $(YUICOMPRESS) build/$(PACKAGE)/svgcanvas.js > build/$(PACKAGE)/svgcanvas.min.js
|
|
|
|
java -jar $(CLOSURE) --js build/$(PACKAGE)/svgcanvas.js --js_output_file build/$(PACKAGE)/svgcanvas.min-closure.js
|
2010-02-06 04:36:35 +01:00
|
|
|
# CSS files do not work remotely
|
2010-04-02 06:56:21 +02:00
|
|
|
# java -jar $(YUICOMPRESS) build/$(PACKAGE)/spinbtn/JQuerySpinBtn.css > build/$(PACKAGE)/spinbtn/JQuerySpinBtn.min.css
|
|
|
|
# java -jar $(YUICOMPRESS) build/$(PACKAGE)/svg-editor.css > build/$(PACKAGE)/svg-editor.min.css
|
2010-02-06 04:36:35 +01:00
|
|
|
|
|
|
|
release: build/$(PACKAGE)
|
|
|
|
cd build ; $(ZIP) $(PACKAGE).zip -r $(PACKAGE) ; cd ..
|
|
|
|
|
|
|
|
firefox: build/$(PACKAGE)
|
|
|
|
mkdir -p build/firefox/content/editor
|
|
|
|
cp -r firefox-extension/* build/firefox
|
|
|
|
rm -rf build/firefox/content/.svn
|
|
|
|
cp -r build/$(PACKAGE)/* build/firefox/content/editor
|
|
|
|
cd build/firefox ; $(ZIP) ../$(PACKAGE).xpi -r * ; cd ../..
|
|
|
|
|
|
|
|
opera: build/$(PACKAGE)
|
|
|
|
mkdir -p build/opera/editor
|
|
|
|
cp opera-widget/* build/opera
|
|
|
|
cp -r build/$(PACKAGE)/* build/opera/editor
|
|
|
|
cd build/opera ; $(ZIP) ../$(PACKAGE).wgt -r * ; cd ../..
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf config
|
|
|
|
rm -rf build/$(PACKAGE)
|
|
|
|
rm -rf build/firefox
|
|
|
|
rm -rf build/opera
|