nicolaken    2002/09/12 08:20:04

  Modified:    gump     build.xml
  Log:
  Nuw this Gump works.
  Launch "ant" and it will generate the scripts.
  It calls the shrimpfactory antfile that does the merge; this in turn calls
  the jenny antfile to compile Jenny.
  Still need to bring it up2par with the original scripts and make the
  generated scripts go in ./bin
  
  Revision  Changes    Path
  1.2       +72 -75    jakarta-alexandria/gump/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-alexandria/gump/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml 2 Sep 2002 16:22:34 -0000       1.1
  +++ build.xml 12 Sep 2002 15:20:04 -0000      1.2
  @@ -1,3 +1,4 @@
  +<?xml version="1.0"?>
   <!--
   
     Build the scripts and/or site for http://jakarta.apache.org/gump/
  @@ -10,122 +11,118 @@
       all     - generate both the scripts and the site
   
   -->
  +<project default="gump.scripts" name="gump">
   
  -<project name="gump" default="scripts" basedir=".">
  +  
  +  <!-- ******************************************************* -->
  +  <!--                Global properties                        -->
  +  <!-- ******************************************************* -->
  +  
  +  <property name="gump.dir" value="."/> 
  +  
  +  <property name="gump.work.dir" value="${gump.dir}/work"/> 
  +  <property name="gump.docs.dir" value="${gump.work.dir}/gumpdocs"/> 
  +  <property name="gump.site.dir" value="${gump.work.dir}/site"/>   
  +
  +  <property name="gump.shrimpfactory.dir" value="../shrimpfactory"/>   
  +  <property name="gump.merge"     
value="${gump.shrimpfactory.dir}/work/merge.xml"/>     
  +  
  +  <property name="gump.webstyle"  value="${gump.dir}/stylesheet/jakarta.xsl"/>   
  +  
  +  <property name="gump.extension"  value="sh"/>   
  +  <property name="gump.target"     value="bash"/>   
  +     
  +  
  +  <!-- ******************************************************* -->
  +  <!--                    Initialization                       -->
  +  <!-- ******************************************************* -->     
   
     <!-- Build the code used to generate the merged xml scripts -->
  -  <target name="compile">
  -    <mkdir dir="classes"/>
  -    <mkdir dir="work"/>
  -    <javac srcdir="java" destdir="classes"/>
  -    <jar destfile="jenny.jar" basedir="classes"/>
  -
  -    <uptodate property="uptodate" targetfile="work/merge.xml">
  -      <srcfiles dir="." includes=".timestamp"/>
  -      <srcfiles dir="." includes="jenny.jar"/>
  -      <srcfiles dir="." includes="${workspace}"/>
  -      <srcfiles dir="profile" includes="*.xml"/>
  -      <srcfiles dir="project" includes="*.xml"/>
  -      <srcfiles dir="repository" includes="*.xml"/>
  -      <srcfiles dir="server" includes="*.xml"/>
  -    </uptodate>
  -
  -    <uptodate property="javadocs.uptodate" targetfile="javadocs/index.html">
  -      <srcfiles dir="java" includes="*.java"/>
  -    </uptodate>
  +  <target name="gump.init">
  +    <mkdir dir="${gump.work.dir}"/>   
  +    <mkdir dir="${gump.docs.dir}"/>   
  +    <mkdir dir="${gump.site.dir}"/>   
     </target>
  -
  +     
     <!-- Merge the xml sources, resolving references -->
  -  <target name="gen" depends="compile" unless="uptodate">
  -    <java classname="Jenny" fork="yes" failonerror="true">
  -      <arg value="${workspace}"/>
  -    </java>
  +  <target name="gump.merge" depends="gump.init" unless="gump.uptodate">
  +    <ant antfile="${gump.shrimpfactory.dir}/build.xml"
  +         dir="${gump.shrimpfactory.dir}"/>
     </target>
  +  
  +  <!-- ******************************************************* -->
  +  <!--                Generate the scripts                     -->
  +  <!-- ******************************************************* -->
   
     <!-- Extract the info necessary to produce the update script -->
  -  <target name="update" depends="gen">
  -    <style in="work/merge.xml" out="work/update.def" 
  -           style="stylesheet/update.xsl"/>
  +  <target name="gump.update" depends="gump.merge">
  +    <xslt in="${gump.merge}" out="${gump.work.dir}/update.def" 
  +           style="${gump.dir}/stylesheet/update.xsl"/>
     </target>
   
     <!-- Extract the info necessary to produce the build script -->
  -  <target name="build" depends="gen">
  -    <style in="work/merge.xml" out="work/build.def" 
  -           style="stylesheet/build.xsl"/>
  +  <target name="gump.build" depends="gump.merge">  
  +    <xslt in="${gump.merge}" out="${gump.work.dir}/build.def" 
  +           style="${gump.dir}/stylesheet/build.xsl"/>
     </target>
   
     <!-- Extract the info necessary to produce the xref script -->
  -  <target name="xref" depends="gen">
  -    <style in="work/merge.xml" out="work/xref.def" 
  -           style="stylesheet/xref.xsl"/>
  +  <target name="gump.xref" depends="gump.merge">
  +    <xslt in="${gump.merge}" out="${gump.work.dir}/xref.def" 
  +           style="${gump.dir}/stylesheet/xref.xsl"/>
     </target>
   
     <!-- Extract the info necessary to produce the publish script -->
  -  <target name="publish" depends="gen">
  -    <copy file="work/merge.xml" tofile="work/puball.site"/>
  -    <style in="work/merge.xml" out="work/publish.def" 
  -           style="stylesheet/publish.xsl"/>
  -    <style in="work/merge.xml" out="work/map.pl" 
  -           style="stylesheet/sedmap.xsl"/>
  +  <target name="gump.publish" depends="gump.merge">
  +    <copy file="${gump.merge}" tofile="${gump.work.dir}/puball.site"/>
  +    <xslt in="${gump.merge}" out="${gump.work.dir}/publish.def" 
  +           style="${gump.dir}/stylesheet/publish.xsl"/>
  +    <xslt in="${gump.merge}" out="${gump.work.dir}/map.pl" 
  +           style="${gump.dir}/stylesheet/sedmap.xsl"/>
     </target>
   
     <!-- Extract the info necessary to produce the deliver script -->
  -  <target name="deliver" depends="gen">
  -    <style in="work/merge.xml" out="work/deliver-local.sh" 
  -           style="stylesheet/deliver-local.xsl"/>
  +  <target name="gump.deliver" depends="gump.merge">
  +    <xslt in="${gump.merge}" out="${gump.work.dir}/deliver-local.sh" 
  +           style="${gump.dir}/stylesheet/deliver-local.xsl"/>
     </target>
   
     <!-- Extract the info necessary to produce the naglist -->
  -  <target name="naglist" depends="gen">
  -    <style in="work/merge.xml" out="work/naglist" 
  -           style="stylesheet/nag.xsl"/>
  +  <target name="gump.naglist" depends="gump.merge">
  +    <xslt in="${gump.merge}" out="${gump.work.dir}/naglist" 
  +           style="${gump.dir}/stylesheet/nag.xsl"/>
     </target>
   
     <!-- Add in the website information -->
  -  <target name="website" depends="build,update,publish,xref,deliver,naglist">
  -    <style basedir="work" destdir="work" includes="*.def" extension=".site"
  -           style="${webstyle}"/>
  +  <target name="gump.website" 
depends="gump.build,gump.update,gump.publish,gump.xref,gump.deliver,gump.naglist">
  +    <xslt basedir="${gump.work.dir}" destdir="${gump.work.dir}" includes="*.def" 
extension=".site"
  +           style="${gump.webstyle}"/>
     </target>
   
     <!-- Generate the scripts -->
  -  <target name="scripts" depends="website">
  -    <style basedir="work" destdir="work" includes="*.site"
  -           extension=".${extension}" style="stylesheet/${target}.xsl"/>
  +  <target name="gump.scripts" depends="gump.website">
  +    <xslt basedir="${gump.work.dir}" destdir="${ant.home}/bin" includes="*.site"
  +           extension=".${gump.extension}" 
style="${gump.dir}/stylesheet/${gump.target}.xsl"/>
     </target>
    
  -  <!-- Generate javadocs -->
  -  <target name="javadocs" depends="compile" unless="javadocs.uptodate">
  -    <mkdir dir="javadocs"/>
  -    <javadoc sourcepath="java" destdir="javadocs" classpath="jenny.jar">
  -      <source file="java/Jenny.java"/>
  -      <source file="java/Module.java"/>
  -      <source file="java/Project.java"/>
  -      <source file="java/Repository.java"/>
  -      <source file="java/Server.java"/>
  -      <source file="java/Workspace.java"/>
  -    </javadoc>
  -  </target>
  -
     <!-- Generate publish instructions for the javadocs -->
  -  <target name="pubdocs" depends="gen">
  -    <style in="work/merge.xml" out="work/pubdoc.pl" 
  -           style="stylesheet/pubdocs.xsl"/>
  +  <target name="gump.pubdocs" depends="gump.merge">
  +    <xslt in="${gump.merge}" out="${gump.work.dir}/pubdoc.pl" 
  +           style="${gump.dir}/stylesheet/pubdocs.xsl"/>
     </target>
   
     <!-- Produce the gump web site -->
  -  <target name="site">
  -    <ant dir="site"/>
  +  <target name="gump.site">
  +    <ant dir="${gump.dir}/site"/>
     </target>
   
     <!-- Do everything -->
  -  <target name="all" depends="scripts,javadocs,pubdocs,site"/>
  +  <target name="gump.all" depends="gump.scripts,gump.pubdocs,gump.site"/>
   
     <!-- Remove all outputs and intermediate results -->
  -  <target name="clean">
  +  <target name="gump.clean">
       <delete file=".timestamp"/>
  -    <delete file="jenny.jar"/>
  -    <delete dir="classes"/>
       <delete dir="work"/>
  -    <ant dir="site" target="clean"/>
     </target>
  +    
   </project>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to