source: java/build.xml @ 3ed053d

abac0-leakabac0-meimei-idtvf-new-xml
Last change on this file since 3ed053d was 66ae396, checked in by Mei <mei@…>, 12 years ago

1) fix that missing LD flag for python
2) add some missing file into Makefile.am so make dist can pick them up

  • Property mode set to 100644
File size: 4.0 KB
RevLine 
[edf9e1d]1<!--
2  Project file for ant to build java ABAC library and test cases. 
3  Requires Jung and bouncycastle.
4
5  Targets:
[4ab0561]6    all: clean then compile and make docs
[edf9e1d]7    compile: build the library and test programs
[66ae396]8    regression-test: run a set of regression test programs
[edf9e1d]9    jar: build jabac.jar in build/jar/jabac.jar
10    doc: greate API javadocs in ./doc
11    dev-doc: create developer API javadocs in ./dev-doc (includes
12            package/private/protected functions)
13    clean: remove created files (includes .der and .pem in this directory)
14-->
15
[20d3d3c]16<project name="jabac" default="all">
[edf9e1d]17
[2750153]18  <property name="src.dir" value="."/>
19  <property name="lib.dir" value="jar"/>
20  <property name="build.dir" value="build"/>
21  <property name="classes.dir" value="${build.dir}/classes"/>
[008dc25]22  <property name="example.dir" value="${src.dir}/example"/>
[fe71561]23  <property name="regression.dir" value="${src.dir}/regression"/>
[2750153]24  <property name="jar.dir" value="${build.dir}/jar"/>
[e36ea1d]25  <property name="doc.dir" value="./doc"/>
[1b88de8]26  <property name="devdoc.dir" value="./dev-doc"/>
[7ad0076]27  <property name="main.class" value="GraphTest"/>
[ea3bddc]28  <property name="dump.class" value="Dumper"/>
[7f16578]29  <property name="read.class" value="Reader"/>
[797bebe]30  <property name="write.class" value="Writer"/>
[8375d4f]31  <property name="regression.class" value="Regression"/>
[6b31de6]32  <property name="example.class" value="CreateExample"/>
[4560b65]33  <property name="version" value="1.4"/>
[2750153]34
[edf9e1d]35  <path id="compile.classpath">
36    <fileset dir="${lib.dir}" includes="**/*.jar"/>
37  </path>
38
[4ab0561]39  <target name="all" depends="clean, compile, jar, doc, dev-doc"
40    description="Clean then build" />
[edf9e1d]41
[2750153]42  <target name="clean">
43    <delete dir="${build.dir}"/>
[e36ea1d]44    <delete dir="${doc.dir}"/>
[1b88de8]45    <delete dir="${devdoc.dir}"/>
[008dc25]46    <delete dir="${example.dir}"/>
[9f3f3e4]47    <delete dir="${src.dir}/scratch"/>
[2750153]48  </target>
49
50
51  <target name="compile" description="Compile the source">
52    <mkdir dir="${classes.dir}" />
53    <javac srcdir="${src.dir}" destdir="${classes.dir}" 
[20d3d3c]54      classpathref="compile.classpath" includeAntRuntime="no"/>
[2750153]55  </target>
56
[1a7e6d3]57  <target name="jar" depends="compile" description="Make a jar">
58    <mkdir dir="${jar.dir}"/>
[4ab0561]59    <jar destfile="${jar.dir}/jabac-${version}.jar" basedir="${classes.dir}"
[8375d4f]60      excludes="**/GraphTest.class **/Dumper.class net/deterlab/abac/regression/*">
[1a7e6d3]61      <manifest>
62        <attribute name="Class-Path" value="${classpath}" />
63      </manifest>
64    </jar>
65  </target>
66
[e36ea1d]67  <target name="doc" description="Generate API documentation">
68    <mkdir dir="${doc.dir}"/>
69    <javadoc sourcepath="${src.dir}" destdir="${doc.dir}"
70      classpathref="compile.classpath" access="public"
[98a9afb]71      excludepackagenames="net.deterlab/abac.regression"
[e36ea1d]72      noqualifier="java.lang:java.io:java.util:java.security:java.security.cert"/>
73  </target>
74
[1b88de8]75  <target name="dev-doc" description="Generate developer API documentation">
76    <mkdir dir="${doc.dir}"/>
77    <javadoc sourcepath="${src.dir}" destdir="${devdoc.dir}" access="private"
78      classpathref="compile.classpath" 
[98a9afb]79      excludepackagenames="net.deterlab/abac.regression"
[1b88de8]80      noqualifier="java.lang:java.io:java.util:java.security:java.security.cert"/>
81  </target>
82
[008dc25]83  <target name="run-dump" depends="compile" description="run dumper">
84    <java classname="${dump.class}" fork="true" >
[797bebe]85      <classpath>
86        <path refid="compile.classpath"/>
87        <pathelement path="${classes.dir}"/>
88      </classpath>
[008dc25]89      <arg file="attr0.der"/>
[797bebe]90    </java>
91  </target>
[3612811]92
[8375d4f]93  <target name="create-scratch" depends="compile" description="Create scratch directory">
94    <delete dir="${src.dir}/scratch"/>
95    <mkdir dir="${src.dir}/scratch"/>
96  </target>
97
[fd92625]98  <target name="run-regression" depends="compile" description="Run the regression test program">
[8375d4f]99    <java classname="${regression.class}" fork="true" >
100      <classpath>
101        <path refid="compile.classpath"/>
102        <pathelement path="${classes.dir}"/>
103      </classpath>
104      <arg file="${src.dir}/regression"/>
105      <arg file="${src.dir}/scratch"/>
106    </java>
107  </target>
108
109  <target name="regression-test" depends="create-scratch,run-regression" description="Run the regression test "/>
[2750153]110</project>
Note: See TracBrowser for help on using the repository browser.