| <?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="Samsa Build" default="build" basedir="."> |
| <description>Build for samsa program</description> |
| |
| <property name="hy.component" value="jdktools" /> |
| <property name="hy.module" value="samsa" /> |
| <property name="hy.target" location="${basedir}/../../target" /> |
| <import file="${hy.target}/hdk/build/ant/properties.xml" /> |
| |
| <target name="build" depends="build-native,-test-jar" |
| unless="skip.native.build"/> |
| <target name="clean" depends="clean-native" unless="skip.native.build"/> |
| <target name="test" depends="-test-module" /> |
| <target name="-test-module" depends="run-tests" /> |
| |
| <target name="build-native" unless="skip.native.build" |
| depends="-compile-native,-copy-native-exe,-copy-native-not-select, |
| -copy-native-exe-windows,-copy-native-data" /> |
| |
| <!-- compile universal samsa binary --> |
| <target name="-compile-native" unless="skip.native.build"> |
| <echo message="Compiling ${hy.module} natives" /> |
| <make dir="src/main/native/samsa/${hy.os.family}" /> |
| </target> |
| |
| <!-- copy samsa executable for different tools --> |
| <target name="-copy-native-exe" unless="skip.native.build"> |
| |
| <property name="hy.samsa.exe" |
| location="${hy.hdk}/lib/samsa${exe.suffix}" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/java${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/java${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/javac${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/javac${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/javah${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/javah${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/javadoc${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/javadoc${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/javap${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/javap${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/jarsigner${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/jarsigner${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/keytool${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/keytool${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/unpack200${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/unpack200${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/pack200${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/pack200${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/jar${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/jar${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/jdb${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/jdb${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jre}/bin/keytool${exe.suffix}" /> |
| <chmod file="${hy.jre}/bin/keytool${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jre}/bin/unpack200${exe.suffix}" /> |
| <chmod file="${hy.jre}/bin/unpack200${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jre}/bin/pack200${exe.suffix}" /> |
| <chmod file="${hy.jre}/bin/pack200${exe.suffix}" perm="ugo+x" /> |
| |
| </target> |
| |
| <!-- copy samsa executable for different tools --> |
| <target name="-copy-native-not-select" unless="skip.native.build" |
| if="is.not.select"> |
| |
| <copy file="${hy.samsa.exe}" |
| tofile="${hy.jdk}/bin/appletviewer${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/appletviewer${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/rmic${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/rmic${exe.suffix}" perm="ugo+x" /> |
| <copy file="${hy.samsa.exe}" tofile="${hy.jdk}/bin/rmid${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/rmid${exe.suffix}" perm="ugo+x" /> |
| <copy file="${hy.samsa.exe}" |
| tofile="${hy.jdk}/bin/rmiregistry${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/rmiregistry${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" |
| tofile="${hy.jdk}/bin/serialver${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/serialver${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" |
| tofile="${hy.jre}/bin/policytool${exe.suffix}" /> |
| <chmod file="${hy.jre}/bin/policytool${exe.suffix}" perm="ugo+x" /> |
| |
| <copy file="${hy.samsa.exe}" |
| tofile="${hy.jdk}/bin/policytool${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/policytool${exe.suffix}" perm="ugo+x" /> |
| |
| </target> |
| |
| <!-- copy windows javaw executable --> |
| <target name="-copy-native-exe-windows" unless="skip.native.build" |
| if="is.windows"> |
| <property name="hy.samsaw.exe" |
| location="${hy.hdk}/lib/samsaw${exe.suffix}" /> |
| |
| <copy file="${hy.samsaw.exe}" |
| tofile="${hy.jdk}/bin/javaw${exe.suffix}" /> |
| <chmod file="${hy.jdk}/bin/javaw${exe.suffix}" |
| perm="ugo+x" /> |
| </target> |
| |
| <!-- copy samsa configuration data for different tools --> |
| <target name="-copy-native-data" unless="skip.native.build"> |
| <copy todir="${hy.jdk}/bin/data" overwrite="yes"> |
| <fileset dir="src/main/resources/data/"> |
| <include name="*.dat" /> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="-test-jar" unless="skip.test.build"> |
| <mkdir dir="${tests.hdk.dir}" /> |
| <copy file="make/run-test.xml" tofile="${tests.hdk.dir}/build.xml" /> |
| </target> |
| |
| <target name="run-tests" depends="-test-jar"> |
| <ant dir="${tests.hdk.dir}" target="test-module" /> |
| </target> |
| |
| <!-- Clean natives --> |
| <target name="clean-native" unless="skip.native.build"> |
| <echo message="Cleaning ${hy.module} natives" /> |
| <make dir="src/main/native/samsa/${hy.os.family}" |
| target="clean" /> |
| </target> |
| |
| </project> |