[r815644] Change hythread API to use 'const char*' for constant strings rather than
[drlvm.git] / make / build-java.xml
blob0257adb8367e4c7a2a0703f920634c47d8cd74ee
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3     Licensed to the Apache Software Foundation (ASF) under one or more
4     contributor license agreements.  See the NOTICE file distributed with
5     this work for additional information regarding copyright ownership.
6     The ASF licenses this file to You under the Apache License, Version 2.0
7     (the "License"); you may not use this file except in compliance with
8     the License.  You may obtain a copy of the License at
9   
10        http://www.apache.org/licenses/LICENSE-2.0
11   
12     Unless required by applicable law or agreed to in writing, software
13     distributed under the License is distributed on an "AS IS" BASIS,
14     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15     See the License for the specific language governing permissions and
16     limitations under the License.
17 -->
18 <project name="build-java">
20     <dirname property="bj.imported.basedir" file="${ant.file.build-java}"/>
21     <import file="${bj.imported.basedir}/properties.xml"/>
23     <!-- During packaging, these files must be copied into the meta-inf dir -->
24     <fileset id="hy.required.metainf-files" dir="${hy.hdk}">
25         <include name="NOTICE" />
26         <include name="LICENSE" />
27     </fileset>
28     
29     <macrodef name="compile-java">
30         <attribute name="src"/>
31         <attribute name="dest"/>
32         <element name="javac-elements" implicit="yes" optional="yes"/>
33         <sequential>
34             <ensure-javac/>
35             <mkdir dir="@{dest}" />
36             <hy.javac srcdir="@{src}" destdir="@{dest}" >
37                 <include name="**/*.java"/>
38                 <javac-elements/>
39             </hy.javac>
40         </sequential>
41     </macrodef>
43     <macrodef name="make-java">
44         <attribute name="component" default="${component}"/>
45         <attribute name="src"/>
46         <attribute name="manifest"/>
47         <element name="javac-elements" implicit="yes" optional="yes"/>
48         <sequential>
49             <compile-java dest="${drlvm.semi.dir}/@{component}/classes" src="@{src}">
50                 <javac-elements/>
51             </compile-java>
52             <mkdir dir="${drlvm.bin.dir}"/>
53             <jar jarfile="${drlvm.bin.dir}/@{component}.jar" manifest="@{manifest}">
54                 <fileset dir="${drlvm.semi.dir}/@{component}/classes"/>
55                 <metainf refid="hy.required.metainf-files"/>
56             </jar>
57             <jar jarfile="${drlvm.bin.dir}/@{component}-src.jar" manifest="@{manifest}">
58                 <fileset dir="@{src}" includes="**/*.java"/>
59                 <metainf refid="hy.required.metainf-files"/>
60             </jar>
61         </sequential>
62     </macrodef>
63 </project>