Tweak configure.sh script to pick up newest version of configure classes.
[jnode:svn-mirror.git] / all / build-jop.xml
1 <project name="JNode-jop" default="all" basedir=".">
2
3         <property name="my-build.dir" value="${build.dir}/jop" />
4         <property name="my-lib.dir" value="${basedir}/lib/jop" />
5         <property name="my-conf.dir" value="${basedir}/conf/jop" />
6
7         <property name="build.netboot.dir" value="${my-build.dir}/netboot" />
8
9         <!-- Properties for building the boot files for Spartan-3/JOP -->
10         <property name="bin-jop.dir" value="${basedir}\bin-jop" />
11         <property name="conf-jop.dir" value="${basedir}\conf\jop" />
12         <property name="lib-jop.dir" value="${basedir}\lib\jop" />
13         <!-- end of Properties for building the boot files for Spartan-3/JOP -->
14
15         <path id="cp-jop">
16                 <pathelement location="${jnode-mmtk.jar}" />
17                 <pathelement location="${jnode-builder.jar}" />
18                 <pathelement location="${jnode-core.jar}" />
19                 <pathelement location="${jnode-fs.jar}" />
20                 <pathelement location="${jnode-shell.jar}" />
21                 <pathelement location="${jnode-net.jar}" />
22                 <pathelement location="${jnode-gui.jar}" />
23                 <path refid="cp" />
24                 <pathelement location="${my-conf.dir}" />
25                 <pathelement location="${grub.dir}" />
26                 <pathelement location="${descriptors.dir}" />
27                 <pathelement location="${dom4j.jar}" />
28                 <pathelement location="${mmtk.jar}" />
29         </path>
30
31         <target name="test-properties">
32                 <condition property="jop-properties.exists">
33                         <available file="build-jop.properties" />
34                 </condition>
35         </target>
36         <target name="load-properties" if="jop-properties.exists">
37                 <property file="build-jop.properties" />
38         </target>
39         <target name="default-properties" unless="jop-properties.exists">
40                 <property name="jnodedrive.dir" value="${my-build.dir}" />
41         </target>
42
43         <target name="prepare-props" depends="test-properties,load-properties,default-properties">
44                 <property name="jnode.kernel.dir" value="${jnodedrive.dir}" />
45                 <property name="jnode.kernel" value="${jnode.kernel.dir}/jnodejop.gz" />
46                 <property name="jnode.compiler" value="default" />
47
48                 <property name="build.bootimage.dir" value="${my-build.dir}/bootimage" />
49         </target>
50
51         <!-- Initialize all project directories -->
52         <target name="prepare-dirs" depends="prepare-props">
53                 <mkdir dir="${build.bootimage.dir}" />
54                 <mkdir dir="${build.netboot.dir}" />
55         </target>
56
57         <!-- Initialize all project properties -->
58         <target name="prepare" depends="prepare-dirs">
59         </target>
60
61         <!-- Build the java object file  -->
62         <target name="java-image" depends="prepare">
63         </target>
64
65         <macrodef name="create-cdrom">
66                 <attribute name="dir" />
67                 <attribute name="destfile" />
68                 <sequential>
69                         <mkdir dir="@{dir}/boot/grub" />
70                         <copy todir="@{dir}">
71                                 <fileset dir="${jnode.kernel.dir}" includes="jnode*.gz"/>
72                         </copy>
73                         <copy todir="@{dir}">
74                                 <fileset dir="${initjars.dir}" />
75                         </copy>
76                         <copy file="${my-lib.dir}/stage2_eltorito" todir="@{dir}/boot/grub" />
77                         <copy file="${grub.menu.cdrom}" tofile="@{dir}/boot/grub/menu.lst" />
78                         <exec executable="mkisofs">
79                                 <arg line="-o @{destfile} -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table @{dir}" />
80                         </exec>
81                 </sequential>
82         </macrodef>
83
84         <!-- Create a full distributable bootable CDROM image -->
85         <target name="cdrom" depends="prepare">
86                 <copy file="${sources.dist.tar.gz}" todir="${my-build.dir}/cdrom-full" />
87                 <create-cdrom destfile="${jnode-jop.iso}" dir="${my-build.dir}/cdrom-full" />
88         </target>
89
90         <!-- Create a bootable CDROM image -->
91         <target name="cdrom-lite" depends="prepare">
92                 <create-cdrom destfile="${jnode-jop-lite.iso}" dir="${my-build.dir}/cdrom-lite" />
93         </target>
94
95         <!-- Prepare for netboot -->
96         <target name="netboot" depends="java-image" unless="no.netboot">
97                 <copy file="${jnode.kernel}" todir="${build.netboot.dir}" />
98                 <copy todir="${build.netboot.dir}">
99                         <fileset dir="${initjars.dir}" />
100                 </copy>
101                 <copy todir="${build.netboot.dir}">
102                         <fileset dir="${my-lib.dir}">
103                                 <include name="nbgrub-*" />
104                                 <include name="pxegrub-*" />
105                         </fileset>
106                         <fileset dir="${my-conf.dir}">
107                                 <include name="menu-nb.lst" />
108                                 <include name="menu-pxe.lst*" />
109                         </fileset>
110                 </copy>
111                 <mkdir dir="${build.netboot.dir}/plugins" />
112                 <copy todir="${build.netboot.dir}/plugins">
113                         <fileset dir="${plugins.dir}" />
114                 </copy>
115         </target>
116
117         <!-- Run all required targets -->
118         <target name="all" depends="java-image">
119         </target>
120
121 </project>
122
123