diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2010-06-08 09:01:43 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2010-06-08 09:01:43 +0200 |
commit | d1fa08fdc9cb11dccee76d668ff85df30458c295 (patch) | |
tree | 1d19df6405103577d872902486792e8c23bce711 /infrastructure/bin/comp.sh | |
parent | d7c5ad7d6263fd1baf9bfdbaa4c50b70ef2fbdb2 (diff) | |
parent | 70d1f9d6fcaefe611e778b8dbf3bafea8934aa08 (diff) | |
download | etherpad-d1fa08fdc9cb11dccee76d668ff85df30458c295.tar.gz etherpad-d1fa08fdc9cb11dccee76d668ff85df30458c295.tar.bz2 etherpad-d1fa08fdc9cb11dccee76d668ff85df30458c295.zip |
Merge remote branch 'upstream/master'
Conflicts:
etherpad/src/etherpad/control/pro/admin/pro_admin_control.js
etherpad/src/etherpad/control/pro/pro_main_control.js
etherpad/src/etherpad/control/pro_help_control.js
etherpad/src/etherpad/globals.js
etherpad/src/etherpad/legacy_urls.js
etherpad/src/etherpad/pne/pne_utils.js
etherpad/src/etherpad/pro/pro_utils.js
etherpad/src/main.js
etherpad/src/plugins/fileUpload/templates/fileUpload.ejs
etherpad/src/plugins/testplugin/templates/page.ejs
etherpad/src/static/css/pad2_ejs.css
etherpad/src/static/css/pro-help.css
etherpad/src/static/img/jun09/pad/protop.gif
etherpad/src/static/js/store.js
etherpad/src/themes/default/templates/framed/framedheader-pro.ejs
etherpad/src/themes/default/templates/main/home.ejs
etherpad/src/themes/default/templates/pro-help/main.ejs
etherpad/src/themes/default/templates/pro-help/pro-help-template.ejs
infrastructure/com.etherpad/licensing.scala
trunk/etherpad/src/etherpad/collab/ace/contentcollector.js
trunk/etherpad/src/etherpad/collab/ace/linestylefilter.js
trunk/etherpad/src/static/css/home-opensource.css
trunk/etherpad/src/static/js/ace.js
trunk/etherpad/src/static/js/linestylefilter_client.js
trunk/etherpad/src/templates/email/eepnet_license_info.ejs
trunk/etherpad/src/templates/pad/pad_body2.ejs
trunk/etherpad/src/templates/pad/pad_content.ejs
trunk/etherpad/src/templates/pad/padfull_body.ejs
trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs
Diffstat (limited to 'infrastructure/bin/comp.sh')
-rwxr-xr-x | infrastructure/bin/comp.sh | 199 |
1 files changed, 199 insertions, 0 deletions
diff --git a/infrastructure/bin/comp.sh b/infrastructure/bin/comp.sh new file mode 100755 index 0000000..5f65c2f --- /dev/null +++ b/infrastructure/bin/comp.sh @@ -0,0 +1,199 @@ +#!/bin/bash -e + +# Copyright 2009 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS-IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +source bin/compilecache.sh + +rm -rf build +mkdir build + +if [ "$1" == "clearcache" ]; then + echo "CLEARING BUILD CACHE" + rm -rf buildcache + mkdir -p buildcache + shift; +fi + +if [ -z "$CC" ]; then + CC=fsc +fi +echo compiling with \'$CC\'... + +CP=`bin/classpath.sh` +CP="build/:${CP}" + +if [ -z "$OBFUSC" ]; then + OBFUSC=0 +else + echo obfuscation on... +fi + +#THRIFTFILES=`echo net.appjet.fancypants/{storage/KeyValueStore,DebugLog,LtpLog}.thrift` +#THRIFTFILES=`find gen-java/net/appjet/fancypants -name '*.java'` +#function genthrift { +# echo "generating thrift..." +# rm -rf gen-java +# for a in $THRIFTFILES; do +# thrift -java $a +# done + +# echo "compiling thrift..." +# CP="${CP}:gen-java/" +# javac \ +# -classpath $CP \ +# -target 1.5 \ +# -d $1 \ +# $THRIFTFILES +#} +#cacheonfiles thrift "$THRIFTFILES" genthrift + +ARGS=$@ + +COMMONFILES=`find net.appjet.common -name '*.java'` +COMMONSCALAFILES=`find net.appjet.common -name '*.scala'` +function gencommon { + echo "compiling common..." + javac \ + -cp $CP \ + -d $1 \ + -target 1.5 \ + $COMMONFILES + $CC \ + -classpath $CP \ + -d $1 \ + -target:jvm-1.5 \ + $ARGS \ + $COMMONSCALAFILES +} +cacheonfiles common "$COMMONFILES $COMMONSCALAFILES" gencommon + +SARSFILES=`find net.appjet.common.sars -name '*.scala'` +function gensars { + echo "compiling sars..." + $CC \ + -classpath $CP \ + -d $1 \ + -target:jvm-1.5 \ + $ARGS \ + $SARSFILES +} +cacheonfiles sars "$SARSFILES" gensars + +CLIFILES=`find net.appjet.common.cli -name '*.scala'` +function gencli { + echo "compiling cli..." + $CC \ + -classpath $CP \ + -d $1 \ + -target:jvm-1.5 \ + $ARGS \ + $CLIFILES + echo "done with cli" +} +cacheonfiles cli "$CLIFILES" gencli + +BODYLOCKFILES=`find net.appjet.bodylock -name '*.scala'` +function genbodylock { + echo "compiling rhino abstraction..." + $CC \ + -classpath build:$CP \ + -d $1 \ + -target:jvm-1.5 \ + $ARGS \ + $BODYLOCKFILES +} +cacheonfiles bodylock "$BODYLOCKFILES" genbodylock + +APPSERVERFILES=`find net.appjet.oui -name '*.scala'` +APPSERVERJAVAFILES=`find net.appjet.oui -name '*.java'` +function genappserver { + echo "compiling appserver source..." + javac \ + -cp $CP \ + -d $1 \ + -target 1.5 \ + $APPSERVERJAVAFILES + $CC \ + -classpath $CP \ + -d $1 \ + -target:jvm-1.5 \ + $ARGS \ + $APPSERVERFILES +} +cacheonfiles appserver "$APPSERVERFILES $APPSERVERJAVAFILES" genappserver + +AJSTDLIBFILES=`find net.appjet.ajstdlib -name '*.scala'` +AJSTDLIBJAVAFILES=`find net.appjet.ajstdlib -name '*.java'` +function genajstdlib { + echo "compiling ajstdlib..." + mkdir -p $1 + if [ ! -z "$AJSTDLIBJAVAFILES" ]; then + javac \ + -cp $CP \ + -d $1 \ + -target 1.5 \ + $AJSTDLIBJAVAFILES + fi + $CC \ + -classpath $CP \ + -d $1 \ + -target:jvm-1.5 \ + $ARGS \ + $AJSTDLIBFILES +} +cacheonfiles ajstdlib "$AJSTDLIBFILES $AJSTDLIBJAVAFILES" genajstdlib + +EPFILES=`find com.etherpad -name '*.scala'` +function genetherpad { + echo "compilng etherpad..." + $CC \ + -classpath $CP \ + -d $1 \ + -target:jvm-1.5 \ + $ARGS \ + $EPFILES +} +cacheonfiles etherpad "$EPFILES" genetherpad + +OOSERVICEFILES=`find com.etherpad.openofficeservice -name '*.scala'` +function genooservice { + echo "compiling ooservice..." + $CC \ + -classpath $CP \ + -d $1 \ + -target:jvm-1.5 \ + $ARGS \ + $OOSERVICEFILES +} +cacheonfiles ooservice "$OOSERVICEFILES" genooservice + +echo "copying files..." +cp net.appjet.ajstdlib/streaming-client.js build/net/appjet/ajstdlib/ +if [ $OBFUSC ] ; then + echo obfuscating... + scala -classpath $CP:. net.appjet.bodylock.compressor \ + build/net/appjet/ajstdlib/streaming-client.js +fi + +cp net.appjet.ajstdlib/streaming-iframe.html build/net/appjet/ajstdlib/ +mkdir -p build/net/appjet/ajstdlib/modules + +echo "building javascript classfiles..." +scala -classpath $CP net.appjet.bodylock.Compiler \ + -destination=build/net/appjet/ajstdlib/ \ + -cutPrefix=framework-src \ + `find framework-src -name '*.js'` + +echo "done." |