summaryrefslogtreecommitdiff
path: root/android/run-javac.sh
blob: 5cda96fe05675e491e559b0785b66f72929cd9d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh -e

JAVAC=$1
CLASSPATH=$2
JAVA_PKG_PATH=$3
ZIP=$4
JARFILE=`realpath "$5"`
shift 5

D=`dirname "$JARFILE"`
GENSRC="$D/src"
GENCLASS="$D/classes"
GENINCLUDE="$D/include"

mkdir -p "$GENSRC/$JAVA_PKG_PATH"
"$JAVAC" -source 1.6 -target 1.6 -Xlint:-options \
	 -cp "$CLASSPATH" \
	 -h "$GENINCLUDE" \
	 -d "$GENCLASS" \
	 "$@"
cd "$GENCLASS"
zip -q -r "$JARFILE" .