|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. |
| 4 | + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 5 | +
|
| 6 | + This code is free software; you can redistribute it and/or modify it |
| 7 | + under the terms of the GNU General Public License version 2 only, as |
| 8 | + published by the Free Software Foundation. Sun designates this |
| 9 | + particular file as subject to the "Classpath" exception as provided |
| 10 | + by Sun in the LICENSE file that accompanied this code. |
| 11 | +
|
| 12 | + This code is distributed in the hope that it will be useful, but WITHOUT |
| 13 | + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 14 | + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 15 | + version 2 for more details (a copy is included in the LICENSE file that |
| 16 | + accompanied this code). |
| 17 | +
|
| 18 | + You should have received a copy of the GNU General Public License version |
| 19 | + 2 along with this work; if not, write to the Free Software Foundation, |
| 20 | + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 21 | +
|
| 22 | + Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 23 | + CA 95054 USA or visit www.sun.com if you need additional information or |
| 24 | + have any questions. |
| 25 | +--> |
| 26 | + |
| 27 | +<!-- |
| 28 | + This is the main build file for the complete langtools workspace. |
| 29 | + It is used both when working on the tools in NetBeans, and when building |
| 30 | + JDK itself, in which case it is invoked from the wrapper Makefile. |
| 31 | + --> |
| 32 | + |
| 33 | +<project name="drjava-hj" default="drjava-hj" basedir="."> |
| 34 | + <property name="build.dir" location="build"/> |
| 35 | + |
| 36 | + <property name="input1" location="input/hj.jar"/> |
| 37 | + <property name="input2" location="input/hjc.jar"/> |
| 38 | + <property name="input3" location="input/hj-ant-task.jar"/> |
| 39 | + <property name="input4" location="input/jasminclasses-2.3.0.jar"/> |
| 40 | + <property name="input5" location="input/java_cup.jar"/> |
| 41 | + <property name="input6" location="input/lpg.jar"/> |
| 42 | + <property name="input7" location="input/polyglot.jar"/> |
| 43 | + <property name="input8" location="input/sootclasses-2.3.0.jar"/> |
| 44 | + |
| 45 | + <target name="clean" description="Delete all generated files"> |
| 46 | + <delete dir="${build.dir}"/> |
| 47 | + <delete file="drjava-hj.jar"/> |
| 48 | + </target> |
| 49 | + |
| 50 | + <target name="drjava-hj" |
| 51 | + description="Create a combined DrJava/HJ jar file"> |
| 52 | + <available property="drjava-exists" file="drjava.jar"/> |
| 53 | + <available property="input1-exists" file="${input1}"/> |
| 54 | + <available property="input2-exists" file="${input2}"/> |
| 55 | + <available property="input3-exists" file="${input3}"/> |
| 56 | + <available property="input4-exists" file="${input4}"/> |
| 57 | + <available property="input5-exists" file="${input5}"/> |
| 58 | + <available property="input6-exists" file="${input6}"/> |
| 59 | + <available property="input7-exists" file="${input7}"/> |
| 60 | + <available property="input8-exists" file="${input8}"/> |
| 61 | + |
| 62 | + <fail message="Can't find file drjava.jar" unless="drjava-exists" /> |
| 63 | + <fail message="Can't find file ${input1}" unless="input1-exists" /> |
| 64 | + <fail message="Can't find file ${input2}" unless="input2-exists" /> |
| 65 | + <fail message="Can't find file ${input3}" unless="input3-exists" /> |
| 66 | + <fail message="Can't find file ${input4}" unless="input4-exists" /> |
| 67 | + <fail message="Can't find file ${input5}" unless="input5-exists" /> |
| 68 | + <fail message="Can't find file ${input6}" unless="input6-exists" /> |
| 69 | + <fail message="Can't find file ${input7}" unless="input7-exists" /> |
| 70 | + <fail message="Can't find file ${input8}" unless="input8-exists" /> |
| 71 | + |
| 72 | + <tempfile property="combine.jars.temp.dir" destDir="${build.dir}"/> |
| 73 | + <echo message="temp.dir = ${combine.jars.temp.dir}" /> |
| 74 | + <delete dir="${combine.jars.temp.dir}" failonerror="false"/> |
| 75 | + <mkdir dir="${combine.jars.temp.dir}"/> |
| 76 | + <unzip src="${input1}" dest="${combine.jars.temp.dir}"/> |
| 77 | + <unzip src="${input2}" dest="${combine.jars.temp.dir}"/> |
| 78 | + <unzip src="${input3}" dest="${combine.jars.temp.dir}"/> |
| 79 | + <unzip src="${input4}" dest="${combine.jars.temp.dir}"/> |
| 80 | + <unzip src="${input5}" dest="${combine.jars.temp.dir}"/> |
| 81 | + <unzip src="${input6}" dest="${combine.jars.temp.dir}"/> |
| 82 | + <unzip src="${input7}" dest="${combine.jars.temp.dir}"/> |
| 83 | + <unzip src="${input8}" dest="${combine.jars.temp.dir}"/> |
| 84 | + <unzip src="drjava.jar" dest="${combine.jars.temp.dir}" overwrite="true"/> |
| 85 | + <unzip src="misc/drjava-hj-splash.zip" |
| 86 | + dest="${combine.jars.temp.dir}" overwrite="true"/> |
| 87 | + |
| 88 | + <java classname="DrJavaHJPropertyFile" |
| 89 | + classpath="drjavaHJPropertyFile" |
| 90 | + fork="true" |
| 91 | + dir="." |
| 92 | + failonerror="true"> |
| 93 | + <arg value="${combine.jars.temp.dir}/edu/rice/cs/drjava/config/options.properties"/> |
| 94 | + </java> |
| 95 | + |
| 96 | + <manifest file="${combine.jars.temp.dir}/META-INF/MANIFEST.MF" mode="update"> |
| 97 | + <attribute name="Created-By" value="1.5.0-drjavahj"/> |
| 98 | + </manifest> |
| 99 | + |
| 100 | + <jar destfile="drjava-hj.jar" basedir="${combine.jars.temp.dir}" |
| 101 | + manifest="${combine.jars.temp.dir}/META-INF/MANIFEST.MF"/> |
| 102 | + <delete dir="${combine.jars.temp.dir}" failonerror="false"/> |
| 103 | + </target> |
| 104 | + |
| 105 | +</project> |
| 106 | + |
0 commit comments