| <?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"/> |
| |
| <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}"/> |
| <jar jarfile="${drlvm.bin.dir}/@{component}.jar" manifest="@{manifest}"> |
| <fileset dir="${drlvm.semi.dir}/@{component}/classes"/> |
| </jar> |
| <jar jarfile="${drlvm.bin.dir}/@{component}-src.jar" manifest="@{manifest}"> |
| <fileset dir="@{src}" includes="**/*.java"/> |
| </jar> |
| </sequential> |
| </macrodef> |
| </project> |