forked from CharlesZ-Chen/ReadChecker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first version of build.xml, and also with travis-build scripts
- Loading branch information
1 parent
3e7d0e2
commit 607efbf
Showing
3 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
ROOT=$TRAVIS_BUILD_DIR/.. | ||
|
||
# Fail the whole script if any command fails | ||
set -e | ||
|
||
export SHELLOPTS | ||
|
||
export JAVA_HOME=${JAVA_HOME:-$(dirname $(dirname $(dirname $(readlink -f $(/usr/bin/which java)))))} | ||
|
||
export JSR308=$ROOT | ||
export AFU=$ROOT/annotation-tools/annotation-file-utilities | ||
export CHECKERFRAMEWORK=$ROOT/checker-framework | ||
|
||
export PATH=$AFU/scripts:$JAVA_HOME/bin:$PATH | ||
|
||
## Build Checker Framework | ||
if [ -d $ROOT/checker-framework ] ; then | ||
# Older versions of git don't support the -C command-line option | ||
(cd $ROOT/checker-framework && git pull) | ||
else | ||
(cd $ROOT && git clone --depth 1 https://github.com/pascaliUWat/checker-framework.git) | ||
fi | ||
|
||
# This also builds annotation-tools and jsr308-langtools | ||
(cd $ROOT/checker-framework/ && ./.travis-build-without-test.sh) | ||
|
||
## Build plume-lib | ||
if [ -d $ROOT/plume-lib ] ; then | ||
# Older versions of git don't support the -C command-line option | ||
(cd $ROOT/plume-lib && git pull) | ||
else | ||
(cd $ROOT && git clone --depth 1 https://github.com/mernst/plume-lib.git) | ||
fi | ||
|
||
(cd $ROOT/plume-lib/ && make) | ||
|
||
#build this checker | ||
ant -f $TRAVIS_BUILD_DIR/build.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
ROOT=$TRAVIS_BUILD_DIR/.. | ||
|
||
# Fail the whole script if any command fails | ||
set -e | ||
|
||
export SHELLOPTS | ||
|
||
. ./.travis-build-without-test.sh | ||
|
||
ant -f $TRAVIS_BUILD_DIR/tests.xml run-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<project name="ReadChecker" basedir="." default="build-checker"> | ||
<property name="checker-framework" value="${basedir}/../checker-framework"/> | ||
<property name="jsr308-langtools" value="${basedir}/../jsr308-langtools"/> | ||
|
||
<property name="checker.bin" value="${basedir}/bin"/> | ||
<property name="checker.src" value="${basedir}/src"/> | ||
<property name="build.deps" value="${basedir}/build-deps"/> | ||
<!-- <symlink link="${dir.top}/foo" resource="${dir.top}/subdir/bar.foo"/> --> | ||
|
||
<target name="prep"> | ||
<mkdir dir="${checker.bin}"/> | ||
<mkdir dir="${build.deps}"/> | ||
|
||
<symlink link="${build.deps}/framework.jar" resource="${checker-framework}/framework/dist/framework.jar" overwrite="true"/> | ||
<symlink link="${build.deps}/javac.jar" resource="${jsr308-langtools}/dist/lib/javac.jar" overwrite="true"/> | ||
</target> | ||
|
||
<target name="build-checker" depends="prep"> | ||
<pathconvert pathsep=":" property="build.classpath"> | ||
<path> | ||
<fileset dir="${build.deps}"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
</path> | ||
</pathconvert> | ||
|
||
<pathconvert pathsep=" " property="src.checker"> | ||
<path> | ||
<fileset dir="${checker.src}"> | ||
<include name="**/*.java"/> | ||
</fileset> | ||
</path> | ||
</pathconvert> | ||
|
||
<java fork="true" | ||
failonerror="true" | ||
classpath="${build.classpath}" | ||
classname="com.sun.tools.javac.Main"> | ||
<jvmarg line="-Xbootclasspath/p:${javac.lib}"/> | ||
<arg value="-g"/> | ||
<!-- To not get a warning about bootstrap classpath --> | ||
<arg value="-Xlint:-options"/> | ||
<arg line="-sourcepath ${checker.src}"/> | ||
<arg line="-d ${checker.bin}"/> | ||
<arg line="${src.checker}"/> | ||
</java> | ||
</target> | ||
|
||
|
||
</project> |