blob: f5e1420c070d00c12815b71bd3b25bf6a41cb9ca [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="build-java">
<dirname property="bj.imported.basedir" file="${ant.file.build-java}"/>
<import file="${bj.imported.basedir}/properties.xml"/>
<!-- During packaging, these files must be copied into the meta-inf dir -->
<fileset id="hy.required.metainf-files" dir="${hy.hdk}">
<include name="NOTICE" />
<include name="LICENSE" />
</fileset>
<macrodef name="compile-java">
<attribute name="src"/>
<attribute name="dest"/>
<element name="javac-elements" implicit="yes" optional="yes"/>
<sequential>
<ensure-javac/>
<mkdir dir="@{dest}" />
<hy.javac srcdir="@{src}" destdir="@{dest}" >
<include name="**/*.java"/>
<javac-elements/>
</hy.javac>
</sequential>
</macrodef>
<macrodef name="make-java">
<attribute name="component" default="${component}"/>
<attribute name="src"/>
<attribute name="manifest"/>
<element name="javac-elements" implicit="yes" optional="yes"/>
<sequential>
<compile-java dest="${drlvm.semi.dir}/@{component}/classes" src="@{src}">
<javac-elements/>
</compile-java>
<mkdir dir="${drlvm.bin.dir}"/>
<hy.jar.bin jarfile="${drlvm.bin.dir}/@{component}.jar"
manifest="@{manifest}">
<fileset dir="${drlvm.semi.dir}/@{component}/classes"/>
</hy.jar.bin>
<hy.jar.src jarfile="${drlvm.bin.dir}/@{component}-src.jar"
manifest="@{manifest}">
<fileset dir="@{src}" includes="**/*.java"/>
</hy.jar.src>
</sequential>
</macrodef>
</project>