User: user57  
  Date: 01/08/27 21:53:08

  Modified:    .        build.sh build.xml
  Log:
   o docbook files have been moved to thirdparty
   o xalanj1compat.jar does not appear to be needed anymore
   o updated build.sh to set ANT_HOME & support using xerces via JAXP="xerces"
   o added xerces.jar (2.0.0 b2) & batik.jar for fop (still doesn't work)
   o moved stylesheets from src/docs to src/stylesheets
   o setup compile tasks to make use of property filtering
   o changed printable-html to html-printable & html to html-default
  
  Revision  Changes    Path
  1.7       +50 -40    manual/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /cvsroot/jboss/manual/build.sh,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.sh  2001/08/28 00:55:53     1.6
  +++ build.sh  2001/08/28 04:53:08     1.7
  @@ -8,7 +8,7 @@
   ##                                                                          ##
   ### ====================================================================== ###
   
  -# $Id: build.sh,v 1.6 2001/08/28 00:55:53 user57 Exp $
  +# $Id: build.sh,v 1.7 2001/08/28 04:53:08 user57 Exp $
   
   PROGNAME=`basename $0`
   DIRNAME=`dirname $0`
  @@ -28,13 +28,12 @@
   # the default arguments
   ANT_OPTIONS="-find $ANT_BUILD_FILE"
   
  -# don't check versions (too slow)
  -ANT_VERSION=""
  +# the jaxp parser to use
  +if [ "x$JAXP" = "x" ]; then
  +    # Default to crimson
  +    JAXP="crimson"
  +fi
   
  -# specify the jaxp parsers to use
  -JAXP_DOM_FACTORY="org.apache.crimson.jaxp.DocumentBuilderFactoryImpl"
  -JAXP_SAX_FACTORY="org.apache.crimson.jaxp.SAXParserFactoryImpl"
  -
   #
   # Helper to complain.
   #
  @@ -61,7 +60,7 @@
        ANT="$ANT_HOME/bin/ant"
        if [ -x "$ANT" ]; then
            # found one
  -         echo $ANT
  +         echo $ANT_HOME
            break
        fi
       done
  @@ -75,52 +74,63 @@
       maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
   
       # try the search path
  -    ANT=`search $ANT_SEARCH_PATH`
  -    target="build"
  -    _cwd=`pwd`
  -
  -    while [ "x$ANT" = "x" ] && [ "$cwd" != "$ROOT" ]; do
  -     cd ..
  -     cwd=`pwd`
  -     ANT=`search $ANT_SEARCH_PATH`
  -    done
  +    ANT_HOME=`search $ANT_SEARCH_PATH`
   
  -    # make sure we get back
  -    cd $_cwd
  +    # try looking up to root
  +    if [ "x$ANT_HOME" = "x" ]; then
  +     target="build"
  +     _cwd=`pwd`
  +
  +     while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
  +         cd ..
  +         cwd=`pwd`
  +         ANT_HOME=`search $ANT_SEARCH_PATH`
  +     done
   
  -    if [ "$cwd" != "$ROOT" ]; then
  -     found="true"
  -    fi
  +     # make sure we get back
  +     cd $_cwd
  +
  +     if [ "$cwd" != "$ROOT" ]; then
  +         found="true"
  +     fi
   
  -    # complain if we did not find anything
  -    if [ "$found" != "true" ]; then
  -     die "Could not locate Ant; check \$ANT or \$ANT_HOME."
  +     # complain if we did not find anything
  +     if [ "$found" != "true" ]; then
  +         die "Could not locate Ant; check \$ANT or \$ANT_HOME."
  +     fi
       fi
   
       # make sure we have one
  +    ANT=$ANT_HOME/bin/ant
       if [ ! -x "$ANT" ]; then
        die "Ant file is not executable: $ANT"
       fi
   
  -    # perhaps check the version
  -    if [ "x$ANT_VERSION" != "x" ] && [ "x$ANT_VERSION_CHECK" != "x" ]; then
  -     result="`$ANT -version 2>&1 | $GREP $ANT_VERSION`x"
  -     if [ "$result" = "x" ]; then
  -         die "Ant version $ANT_VERSION is required to build."
  -     fi
  +    # specify the jaxp parser impls to use
  +    case "$JAXP" in
  +     crimson)
  +         JAXP_DOM_FACTORY="org.apache.crimson.jaxp.DocumentBuilderFactoryImpl"
  +         JAXP_SAX_FACTORY="org.apache.crimson.jaxp.SAXParserFactoryImpl"
  +         ;;
  +        
  +     xerces)
  +         JAXP_DOM_FACTORY="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"
  +         JAXP_SAX_FACTORY="org.apache.xerces.jaxp.SAXParserFactoryImpl"
  +         ;;
  +    esac
  +
  +    if [ "x$JAXP_DOM_FACTORY" != "x" ]; then
  +     ANT_OPTS="$ANT_OPTS 
-Djavax.xml.parsers.DocumentBuilderFactory=$JAXP_DOM_FACTORY"
  +    fi
  +    if [ "x$JAXP_SAX_FACTORY" != "x" ]; then
  +     ANT_OPTS="$ANT_OPTS -Djavax.xml.parsers.SAXParserFactory=$JAXP_SAX_FACTORY"
       fi
   
  -    # Specify the JAXP parser impls to use
  -    ANT_OPTS="$ANT_OPTS 
-Djavax.xml.parsers.DocumentBuilderFactory=$JAXP_DOM_FACTORY"
  -    ANT_OPTS="$ANT_OPTS -Djavax.xml.parsers.SAXParserFactory=$JAXP_SAX_FACTORY"
  -    export ANT_OPTS
  -
  -    # change to the directory where the script lives so folks do not have
  -    # to be in the same dir to run the build without specifying the build
  -    # file. 
  +    # change to the directory where the script lives so users are not forced
  +    # to be in the same directory as build.xml
       cd $DIRNAME
   
  -    export ANT ANT_HOME
  +    export ANT ANT_HOME ANT_OPTS
       exec $ANT $ANT_OPTIONS "$@"
   }
   
  
  
  
  1.9       +59 -33    manual/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/manual/build.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build.xml 2001/08/27 09:01:36     1.8
  +++ build.xml 2001/08/28 04:53:08     1.9
  @@ -10,7 +10,7 @@
   <!--                                                                        -->
   <!-- ====================================================================== -->
   
  -<!-- $Id: build.xml,v 1.8 2001/08/27 09:01:36 user57 Exp $ -->
  +<!-- $Id: build.xml,v 1.9 2001/08/28 04:53:08 user57 Exp $ -->
   
   <project default="main">
   
  @@ -81,6 +81,10 @@
     <!-- Tool Configuration                                                 -->
     <!-- ================================================================== -->
   
  +  <!-- DocBook -->
  +  <property name="oasis.docbook.xml.root" 
value="${thirdparty.root}/oasis/docbook-xml"/>
  +  <property name="oasis.docbook.xsl.root" 
value="${thirdparty.root}/oasis/docbook-xsl"/>
  +
     <!-- FOP -->
     <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
   
  @@ -140,11 +144,15 @@
     <!-- Where source files live -->
     <property name="source.etc" value="${module.source}/etc"/>
     <property name="source.examples" value="${module.source}/examples"/>
  +  <property name="source.stylesheets" value="${module.source}/stylesheets"/>
     <property name="source.docs" value="${module.source}/docs"/>
   
  +
     <!-- Where build generated files will go -->
  +  <property name="build.docs" value="${module.build}/docs"/>
  +  <property name="build.stylesheets" value="${module.build}/stylesheets"/>
     <property name="build.html" value="${module.build}/html"/>
  -  <property name="build.printable-html" value="${module.build}/printable-html"/>
  +  <property name="build.html-printable" value="${module.build}/html-printable"/>
     <property name="build.pdf" value="${module.build}/pdf"/>
     <property name="build.jars" value="${module.build}/lib"/>
   
  @@ -184,9 +192,29 @@
        |  different type of compile that needs to be performed, short of
        |  documentation compiles.
       -->
  -  <target name="compile" 
  +  <target name="compile" depends="init, compile-stylesheets, compile-docs"
          description="Compile all source files."/>
   
  +  <!-- Compile stylesheets -->
  +  <target name="compile-stylesheets" depends="init">
  +    <mkdir dir="${build.stylesheets}"/>
  +    <copy todir="${build.stylesheets}" filtering="yes">
  +      <fileset dir="${source.stylesheets}">
  +         <include name="**/*"/>
  +      </fileset>
  +    </copy>
  +  </target>
  +
  +  <!-- Compile xml doc sources -->
  +  <target name="compile-docs" depends="init">
  +    <mkdir dir="${build.docs}"/>
  +    <copy todir="${build.docs}" filtering="yes">
  +      <fileset dir="${source.docs}">
  +         <include name="**/*"/>
  +      </fileset>
  +    </copy>
  +  </target>
  +
   
     <!-- ================================================================== -->
     <!-- Build Jars                                                         -->
  @@ -209,12 +237,15 @@
        |  This target should depend on other docs-* targets for each 
        |  different type of docuementation that is to be generated.
       --> <!--removed pdf - it breaks build -->
  -  <target name="docs" depends="html, printable-html"
  +  <target name="docs" depends="html"
          description="Builds all [non pdf until pdf works] documentation."/>
   
  -  <!-- Generate the HTML manual -->
  -  <target name="html" depends="init">
  +  <!-- Generate all HTML manual formats -->
  +  <target name="html" depends="html-default, html-printable"/>
   
  +  <!-- Generate the default HTML manual -->
  +  <target name="html-default" depends="compile">
  +
       <!-- 
          |  Create chunked tutorial 
          |  destdir parameter is ignored due to chunking
  @@ -222,12 +253,11 @@
         -->
   
       <mkdir dir="${build.html}"/>
  -    <echo message="build.html is ${build.html}"/>
  -    <style basedir="${source.docs}"
  -        style="${source.docs}/jboss.xsl"
  +    <style basedir="${build.docs}"
  +        style="${build.stylesheets}/jboss.xsl"
           extension=".html"
  -        destdir="output/html"
  -        includes="jbossdocs.xml">
  +        destdir="output/html">
  +       <include name="jbossdocs.xml"/>
       </style>
   
       <move todir="${build.html}">
  @@ -235,7 +265,7 @@
       </move>
   
       <copy todir="${build.html}">
  -       <fileset dir="${source.docs}">
  +       <fileset dir="${build.docs}">
            <include name="**/*"/>
            <exclude name="*.xml"/>
            <exclude name="*.xsl"/>
  @@ -246,22 +276,18 @@
     </target>
   
     <!-- Generate the printable HTML manual -->
  -  <target name="printable-html" depends="init">
  +  <target name="html-printable" depends="compile">
   
  -    <mkdir dir="${build.printable-html}"/>
  -    <style basedir="${source.docs}"
  -        destdir="${build.printable-html}"
  -        style="${source.docs}/docbook/html/docbook.xsl"
  -        extension=".html"
  -        includes="jbossdocs.xml">
  +    <mkdir dir="${build.html-printable}"/>
  +    <style basedir="${build.docs}"
  +        destdir="${build.html-printable}"
  +        style="${oasis.docbook.xsl.root}/html/docbook.xsl"
  +        extension=".html">
  +       <include name="jbossdocs.xml"/>
       </style>
  -
  -    <!--move todir="${build.printable-html}">
  -      <fileset dir="${module.root}" includes="*.html"/>
  -    </move-->
   
  -    <copy todir="${build.printable-html}">
  -       <fileset dir="${source.docs}">
  +    <copy todir="${build.html-printable}">
  +       <fileset dir="${build.docs}">
            <include name="**/*"/>
            <exclude name="*.xml"/>
            <exclude name="*.xsl"/>
  @@ -272,14 +298,14 @@
     </target>
   
     <!-- Generate the PDF manual -->
  -  <target name="pdf" depends="init">
  +  <target name="pdf" depends="compile">
   
       <mkdir dir="${build.pdf}"/>
  -    <style basedir="${source.docs}"
  +    <style basedir="${build.docs}"
              destdir="${build.pdf}"
  -           style="${source.docs}/docbook/fo/docbook.xsl" 
  -           extension=".fo" 
  -           includes="jbossdocs.xml">
  +           style="${oasis.docbook.xsl.root}/fo/docbook.xsl" 
  +           extension=".fo">
  +       <include name="jbossdocs.xml"/>
       </style>
   
       <fop basedir="${build.pdf}"
  @@ -300,7 +326,7 @@
       <copy todir="${release.manual}" filtering="no">
         <fileset dir="${module.build}">
            <include name="html/**/*"/>
  -         <include name="printable-html/**/*"/>
  +         <include name="html-printable/**/*"/>
            <include name="pdf/**/*.pdf"/>
         </fileset>
       </copy>
  @@ -377,10 +403,10 @@
     <target name="main" depends="most"
          description="Executes the default target (most)."/>
       
  -  <target name="all" depends="jars, docs"
  +  <target name="all" depends="docs"
          description="Builds everything."/>
   
  -  <target name="most" depends="html, printable-html"
  +  <target name="most" depends="docs"
          description="Builds html and printable html"/>
   
     <target name="min" depends="compile"
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to