click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r749698 - in /incubator/click/trunk/tools/docbook: ./ build-docbook.xml build.xml project.properties src/styles/html/custom.xsl src/styles/pdf/custom.xsl
Date Tue, 03 Mar 2009 18:59:59 GMT
Author: sabob
Date: Tue Mar  3 18:59:58 2009
New Revision: 749698

URL: http://svn.apache.org/viewvc?rev=749698&view=rev
Log:
cleanup

Added:
    incubator/click/trunk/tools/docbook/build-docbook.xml
Modified:
    incubator/click/trunk/tools/docbook/   (props changed)
    incubator/click/trunk/tools/docbook/build.xml
    incubator/click/trunk/tools/docbook/project.properties
    incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl
    incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl

Propchange: incubator/click/trunk/tools/docbook/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Mar  3 18:59:58 2009
@@ -1 +1,3 @@
+dbf-click.zip
 target
+dbf-click

Added: incubator/click/trunk/tools/docbook/build-docbook.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/build-docbook.xml?rev=749698&view=auto
==============================================================================
--- incubator/click/trunk/tools/docbook/build-docbook.xml (added)
+++ incubator/click/trunk/tools/docbook/build-docbook.xml Tue Mar  3 18:59:58 2009
@@ -0,0 +1,133 @@
+<?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.
+-->
+
+<!--
+NOTE: This build file depends on the Velocity Docbook Framework and won't
+work unless that framework is installed. Set the property 'dbf.basedir' in
+project.properties to refer to the installation directory before using this
+script.
+-->
+<project name="build-docbook" default="all" basedir=".">
+
+    <!-- Load the properties -->
+    <!--<property file="project.properties"/>-->
+
+    <import file="${dbf.basedir}/build-docbook.xml"/>
+
+    <property name="docbook.dir" value="click"/>
+    <property name="docbook.file" value="click-book"/>
+
+  <!-- ======================================================================== -->
+  <!-- ==                                                                    == -->
+  <!-- == Build all the Velocity Docbook Documentation                       == -->
+  <!-- ==                                                                    == -->
+  <!-- ======================================================================== -->
+    <target name="all" description="--> Build all documentation">
+
+        <!-- Build the Users Guide -->
+        <antcall target="html"/>
+        <antcall target="htmlsingle"/>
+        <antcall target="pdf"/>
+
+        <delete quiet="true" dir="${target.dir}/${docbook.dir}/tmp"/>
+
+    <!--<fixcrlf srcdir="target/click" includes="**/*.html" eol="crlf" /> -->
+    </target>
+
+  <!-- ======================================================================== -->
+  <!-- ==                                                                    == -->
+  <!-- == Create the PDF documentation                                       == -->
+  <!-- ==                                                                    == -->
+  <!-- ======================================================================== -->
+
+    <taskdef name="fop"
+         classname="org.apache.fop.tools.anttasks.Fop">
+        <classpath>
+            <fileset dir="${fop.basedir}/build">
+                <include name="*.jar"/>
+            </fileset>
+        </classpath>
+    </taskdef>
+
+    <target name="pdf" description="Generates a single PDF file" depends="prepare">
+
+        <transform type="pdf" target="tmp" title="pdf" xsl="fo" dir="${docbook.dir}" file="${docbook.file}"/>
+
+        <mkdir dir="target/${docbook.dir}/pdf"/>
+
+        <fop format="application/pdf"
+            basedir="${src.dir}"
+            fofile="${pdf.target.file}.xml"
+            outfile="target/${docbook.dir}/pdf/${docbook.file}.pdf" />
+
+        <!-- Copy artifacts to Click user-guide folder -->
+        <delete dir="${click.basedir}/documentation/docs/user-guide/pdf/"/>
+        <copy todir="${click.basedir}/documentation/docs/user-guide/pdf/">
+            <fileset dir="target/${docbook.dir}/pdf/"/>
+        </copy>
+
+    </target>
+
+    <target name="html"
+            description="--> Generate HTML docs in multiple files">
+
+        <ant antfile="${dbf.basedir}/build-docbook.xml" target="html">
+            <property name="docbook.dir" value="${docbook.dir}"/>
+            <property name="docbook.file" value="${docbook.file}"/>
+        </ant>
+
+        <!-- Copy artifacts to Click user-guide folder -->
+        <delete dir="${click.basedir}/documentation/docs/user-guide/html/"/>
+        <copy todir="${click.basedir}/documentation/docs/user-guide/html/">
+            <fileset dir="target/${docbook.dir}/html/">
+                <exclude name="**/*.zip"/>
+            </fileset>
+        </copy>
+
+    </target>
+
+    <target name="htmlsingle"
+            description="--> Generate HTML docs in a single, big file">
+
+        <ant antfile="${dbf.basedir}/build-docbook.xml" target="htmlsingle">
+            <property name="docbook.dir" value="${docbook.dir}"/>
+            <property name="docbook.file" value="${docbook.file}"/>
+        </ant>
+
+        <!-- Copy artifacts to Click user-guide folder -->
+        <delete dir="${click.basedir}/documentation/docs/user-guide/htmlsingle/"/>
+        <copy todir="${click.basedir}/documentation/docs/user-guide/htmlsingle/">
+            <fileset dir="target/${docbook.dir}/htmlsingle/">
+                <exclude name="**/*.zip"/>
+            </fileset>
+        </copy>
+    </target>
+
+  <!-- ======================================================================== -->
+  <!-- ==                                                                    == -->
+  <!-- == Clean up the target directory                                      == -->
+  <!-- ==                                                                    == -->
+  <!-- ======================================================================== -->
+    <target name="clean"
+          description="--> Delete temporary and distribution directories for docs">
+        <ant antfile="${dbf.basedir}/build-docbook.xml" target="clean"/>
+    </target>
+</project>

Modified: incubator/click/trunk/tools/docbook/build.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/build.xml?rev=749698&r1=749697&r2=749698&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/build.xml (original)
+++ incubator/click/trunk/tools/docbook/build.xml Tue Mar  3 18:59:58 2009
@@ -1,221 +1,59 @@
-<?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.
--->
-
-<!--
-NOTE: This build file depends on the Velocity Docbook Framework and won't
-work unless that framework is installed. Set the property 'dbf.basedir' in
-project.properties to refer to the installation directory before using this
-script.
--->
-<project name="click-docbook" default="all" basedir=".">
-
-    <!-- Load our properties -->
-    <property file="project.properties"/>
-
-    <!-- Some sanity checks to ensure docbook is setup correctly -->
-    <available file="${dbf.basedir}" property="isDBFAvail"/>
-    <fail message="The Docbook framework is not installed correctly. The specified
-Docbook installation refers to the folder, '${dbf.basedir}', which does not exist.
-Set the property 'dbf.basedir' in project.properties to the correct Docbook installation
folder.">
-        <condition>
-            <or>
-                <isfalse value="${isDBFAvail}"/>
-            </or>
-        </condition>
-    </fail>
-
-    <available file="${fop.basedir}" property="isFopAvail"/>
-    <fail message="The FOP framework is not installed correctly. The specified
-FOP installation refers to the folder, '${fop.basedir}', which does not exist.
-Set the property 'fop.basedir' in project.properties to the correct FOP installation folder.">
-        <condition>
-            <or>
-                <isfalse value="${isFopAvail}"/>
-            </or>
-        </condition>
-    </fail>
-
-    <import file="${dbf.basedir}/build-docbook.xml"/>
-
-    <property name="docbook.dir" value="click"/>
-    <property name="docbook.file" value="click-book"/>
-
-    <target name="init">
-        <!-- Hack Alert!!!
-            We need to set the property "highlight.xslthl.config" of
-            src/styles/html/custom.xsl and src/styles/pdf/custom.xsl
-            to the location of xslthl-config.xml file.
-        -->
-
-        <!-- Make backup of custom.xsl files -->
-        <available file="${styles.src.dir}/html/custom.xsl.tmp" property="html.config.present"/>
-        <available file="${styles.src.dir}/pdf/custom.xsl.tmp" property="pdf.config.present"/>
-        <antcall target="make-html-backup"/>
-        <antcall target="make-pdf-backup"/>
-
-    </target>
-
-    <target name="make-html-backup" unless="html.config.present">
-        <echo>Making backup of ${styles.src.dir}/html/custom.xsl and</echo>
-        <copy file="${styles.src.dir}/html/custom.xsl"
-            tofile="${styles.src.dir}/html/custom.xsl.tmp"/>
-        <replace file="${styles.src.dir}/html/custom.xsl" token="&gt;PATH_TO_XSLTHL_CONFIG&lt;"
value="&gt;file:///${dbf.xsl.dir}/highlighting/xslthl-config.xml&lt;"/>
-    </target>
-
-     <target name="make-pdf-backup" unless="html.config.present">
-        <echo>Making backup of ${styles.src.dir}/pdf/custom.xsl</echo>
-        <copy file="${styles.src.dir}/pdf/custom.xsl"
-            tofile="${styles.src.dir}/pdf/custom.xsl.tmp"/>
-        <replace file="${styles.src.dir}/pdf/custom.xsl" token="&gt;PATH_TO_XSLTHL_CONFIG&lt;"
value="&gt;file:///${dbf.xsl.dir}/highlighting/xslthl-config.xml&lt;"/>
-    </target>
-
-  <!-- ======================================================================== -->
-  <!-- ==                                                                    == -->
-  <!-- == Build all the Velocity Docbook Documentation                       == -->
-  <!-- ==                                                                    == -->
-  <!-- ======================================================================== -->
-    <target name="all" description="--> Build all documentation" depends="init">
-
-    <!-- Build the Users Guide -->
-    <!--
-        <ant antfile="${dbf.basedir}/build-docbook.xml" target="html">
-            <property name="docbook.dir" value="${docbook.dir}"/>
-            <property name="docbook.file" value="${docbook.file}"/>
-        </ant>
-
-        <ant antfile="${dbf.basedir}/build-docbook.xml" target="htmlsingle">
-            <property name="docbook.dir" value="${docbook.dir}"/>
-            <property name="docbook.file" value="${docbook.file}"/>
-        </ant>-->
-
-        <antcall target="html"/>
-        <antcall target="htmlsingle"/>
-        <antcall target="pdf"/>
-
-        <delete quiet="true" dir="${target.dir}/${docbook.dir}/tmp"/>
-
-    <!--<fixcrlf srcdir="target/click" includes="**/*.html" eol="crlf" /> -->
-    </target>
-
-  <!-- ======================================================================== -->
-  <!-- ==                                                                    == -->
-  <!-- == Create the PDF documentation                                       == -->
-  <!-- ==                                                                    == -->
-  <!-- ======================================================================== -->
-
-    <taskdef name="fop"
-         classname="org.apache.fop.tools.anttasks.Fop">
-        <classpath>
-            <fileset dir="${fop.basedir}/build">
-                <include name="*.jar"/>
-            </fileset>
-            <fileset dir="${fop.basedir}/lib">
-                <include name="*.jar"/>
-            </fileset>
-           
-        </classpath>
-    </taskdef>
-
-    <target name="pdf" description="Generates a single PDF file" depends="init, prepare">
-
-        <transform type="pdf" target="tmp" title="pdf" xsl="fo" dir="${docbook.dir}" file="${docbook.file}"/>
-
-        <mkdir dir="target/${docbook.dir}/pdf"/>
-
-        <fop format="application/pdf"
-            basedir="${src.dir}"
-            fofile="${pdf.target.file}.xml"
-            outfile="target/${docbook.dir}/pdf/${docbook.file}.pdf" />
-
-        <antcall target="postprocess"/>
-
-        <!-- Copy artifacts to Click user-guide folder -->
-        <delete dir="${click.basedir}/documentation/docs/user-guide/pdf/"/>
-        <copy todir="${click.basedir}/documentation/docs/user-guide/pdf/">
-            <fileset dir="target/${docbook.dir}/pdf/"/>
-        </copy>
-
-    </target>
-
-    <target name="html"
-            description="--> Generate HTML docs in multiple files" depends="init">
-
-        <ant antfile="${dbf.basedir}/build-docbook.xml" target="html">
-            <property name="docbook.dir" value="${docbook.dir}"/>
-            <property name="docbook.file" value="${docbook.file}"/>
-        </ant>
-
-        <antcall target="postprocess"/>
-
-        <!-- Copy artifacts to Click user-guide folder -->
-        <delete dir="${click.basedir}/documentation/docs/user-guide/html/"/>
-        <copy todir="${click.basedir}/documentation/docs/user-guide/html/">
-            <fileset dir="target/${docbook.dir}/html/">
-                <exclude name="**/*.zip"/>
-            </fileset>
-        </copy>
-
-    </target>
-
-    <target name="htmlsingle"
-            description="--> Generate HTML docs in a single, big file" depends="init">
-
-        <ant antfile="${dbf.basedir}/build-docbook.xml" target="htmlsingle">
-            <property name="docbook.dir" value="${docbook.dir}"/>
-            <property name="docbook.file" value="${docbook.file}"/>
-        </ant>
-
-        <antcall target="postprocess"/>
-
-        <!-- Copy artifacts to Click user-guide folder -->
-        <delete dir="${click.basedir}/documentation/docs/user-guide/htmlsingle/"/>
-        <copy todir="${click.basedir}/documentation/docs/user-guide/htmlsingle/">
-            <fileset dir="target/${docbook.dir}/htmlsingle/">
-                <exclude name="**/*.zip"/>
-            </fileset>
-        </copy>
-    </target>
-
-    <target name="postprocess">
-        <copy todir="${target.dir}/resources">
-            <fileset dir="${src.dir}/resources/"/>
-        </copy>
-
-        <!-- Hack alert!!! Restore the files that was copied in the "init" target -->
-        <copy file="${styles.src.dir}/html/custom.xsl.tmp"
-            tofile="${styles.src.dir}/html/custom.xsl" overwrite="true"/>
-        <delete file="${styles.src.dir}/html/custom.xsl.tmp"/>
-
-        <copy file="${styles.src.dir}/pdf/custom.xsl.tmp"
-            tofile="${styles.src.dir}/pdf/custom.xsl" overwrite="true"/>
-        <delete file="${styles.src.dir}/pdf/custom.xsl.tmp"/>
-    </target>
-
-  <!-- ======================================================================== -->
-  <!-- ==                                                                    == -->
-  <!-- == Clean up the target directory                                      == -->
-  <!-- ==                                                                    == -->
-  <!-- ======================================================================== -->
-    <target name="clean"
-          description="--> Delete temporary and distribution directories for docs">
-        <ant antfile="${dbf.basedir}/build-docbook.xml" target="clean"/>
-    </target>
-</project>
+<?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.
+-->
+
+<!--
+NOTE: This build file depends on the Velocity Docbook Framework and won't
+work unless that framework is installed. Set the property 'dbf.basedir' in
+project.properties to refer to the installation directory before using this
+script.
+-->
+<project name="click-book" default="all" basedir=".">
+
+    <!-- Load the properties -->
+    <property file="project.properties"/>
+
+    <target name="get-deps">
+
+    </target>
+
+    <target name="do-prepare">
+        <available file="${dbf.zip}" property="dbf.downloaded"/>
+        <echo>${dbf.downloaded} ${dbf.zip}</echo>
+        <fail message="The Velocity Docbook Framework is not available. To resolve this
download the dependencies with 'ant get-deps'.">
+            <condition>
+                <or><isfalse value="${dbf.downloaded}"/></or>
+            </condition>
+        </fail>
+
+        <available file="${dbf.basedir}" property="dbf.extracted"/>
+        <antcall target="extract"/>
+    </target>
+
+    <target name="extract" unless="dbf.extracted">
+        <unzip src="${dbf.zip}" dest="${dbf.basedir}/"/>
+    </target>
+
+    <target name="clean" depends="do-prepare"
+        description="--> Delete temporary and distribution directories for docs">
+        <ant antfile="build-docbook.xml" target="clean"/>
+        <delete dir="${dbf.basedir}"/>
+    </target>
+</project>

Modified: incubator/click/trunk/tools/docbook/project.properties
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/project.properties?rev=749698&r1=749697&r2=749698&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/project.properties (original)
+++ incubator/click/trunk/tools/docbook/project.properties Tue Mar  3 18:59:58 2009
@@ -16,10 +16,10 @@
 # under the License.
 
 # Basedir for the docbook framework
-dbf.basedir = ../dbf
+dbf.basedir = click-docbook
 
-# Basedir for the FOP framework
-fop.basedir = ../fop-0.95
+# DBF zip file name
+dbf.zip = click-docbook-0.1.zip
 
 # Basedir for Click
 click.basedir = ../../click-svn

Modified: incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl?rev=749698&r1=749697&r2=749698&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl (original)
+++ incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl Tue Mar  3 18:59:58 2009
@@ -155,10 +155,10 @@
   <xsl:param name="highlight.default.language">java</xsl:param>
 
   <!--
-  Ant will automatically replace PATH_TO_XSLTHL_CONFIG with the path to
+  Ant will automatically replace @dbf.xsl@ with the path to
   the config at runtime
   -->
-  <xsl:param name="highlight.xslthl.config">file:///C:\dev\os\apache\click\docbook\click/target/docbook-xsl-snapshot/highlighting/xslthl-config.xml</xsl:param>
+  <xsl:param name="highlight.xslthl.config">file:///@dbf.xsl@/highlighting/xslthl-config.xml</xsl:param>
 
   <xsl:template match='xslthl:keyword' mode="xslthl">
     <span class="kwd">

Modified: incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl?rev=749698&r1=749697&r2=749698&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl (original)
+++ incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl Tue Mar  3 18:59:58 2009
@@ -386,10 +386,10 @@
   <xsl:param name="highlight.default.language">java</xsl:param>
 
  <!--
-  Ant will automatically replace PATH_TO_XSLTHL_CONFIG with the path to
+  Ant will automatically replace @dbf.xsl@ with the path to
   the config at runtime
   -->
-  <xsl:param name="highlight.xslthl.config">PATH_TO_XSLTHL_CONFIG</xsl:param>
+  <xsl:param name="highlight.xslthl.config">file:///@dbf.xsl@/highlighting/xslthl-config.xml</xsl:param>
 
   <xsl:template match='xslthl:keyword' mode="xslthl">
     <fo:inline font-weight="bold" color="#7F0055">



Mime
View raw message