diff options
Diffstat (limited to 'tools/build')
-rwxr-xr-x | tools/build | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/build b/tools/build new file mode 100755 index 0000000..944d230 --- /dev/null +++ b/tools/build | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # environment variables: | ||
4 | # $JFLAGS: additional flags passed to the java compiler | ||
5 | |||
6 | BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. | ||
7 | |||
8 | |||
9 | source $BASEDIR/extcfg.sh | ||
10 | |||
11 | |||
12 | # collect all source files | ||
13 | SOURCES=`find "$BASEDIR/src/" "$BASEDIR/test/" -name "*.java"` | ||
14 | |||
15 | mkdir -p $BASEDIR/build | ||
16 | |||
17 | javac $JFLAGS -cp "$BASEDIR/build/:$BASEDIR/lib/*:$GNUNET_JAVA_CLASSPATH:$GNUNET_JAVA_DEPS" -d $BASEDIR/build/ $SOURCES | ||
18 | |||
19 | cd "$BASEDIR/src/" | ||
20 | |||
21 | # collect resources from src/ and copy to build/ | ||
22 | find "." \( -name "*.txt" -o -name "*.properties" \) \ | ||
23 | -exec cp --parents '{}' "../build" \; | ||