]> granicus.if.org Git - apache/commitdiff
Add ant task to html manual and man page generation:
authorRainer Jung <rjung@apache.org>
Sat, 19 Sep 2009 15:40:42 +0000 (15:40 +0000)
committerRainer Jung <rjung@apache.org>
Sat, 19 Sep 2009 15:40:42 +0000 (15:40 +0000)
- check-man checks for the presence of the "man"
  directory and sets an ant property skip-man in
  case the directory is missing
- all the man age generating tasks first call
  check-man as a dependency, and then only run
  if skip-man is unset.

Thats useful for unbundled modules like mod_ftp
and mod_fcgid, which do not have a man directory.
Building their docs otherwise bombs.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@816938 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/lang-targets.xml
docs/manual/style/xsl/language.xsl

index 058866457a7ff8a9c530be7141bc3975de5f91b9..410f4c017b84787b2048defa820c5d78e18657f8 100644 (file)
@@ -22,6 +22,7 @@
 <!-- ==================================================================== -->
 <project name="lang-targets">
 
+<target name="check-man"><if><not><available type="dir" file="../../man"/></not><then><property value="yes" name="skip-man"/></then></if></target>
 <target description="- builds all HTML files and nroff man pages" name="all" depends="de, en, es, fr, ja, ko, pt-br, ru, tr"/>
 <target description="- builds all zip download packages" name="zip-all" depends="zip-de, zip-en, zip-es, zip-fr, zip-ja, zip-ko, zip-pt-br, zip-ru, zip-tr"/>
 <target description="- builds all war download packages" name="war-all" depends="war-de, war-en, war-es, war-fr, war-ja, war-ko, war-pt-br, war-ru, war-tr"/>
@@ -72,7 +73,7 @@
 <target description="- builds the English CHM file" name="chm-en">
     <chm.generic lang="en"/>
 </target>
-<target description="- builds the English nroff files" name="man-en">
+<target description="- builds the English nroff files" unless="skip-man" depends="check-man" name="man-en">
     <nroff.generic lang="en"/>
 </target>
 <target description="- builds the English latex file" name="latex-en">
 <target description="- builds the Turkish CHM file" name="chm-tr">
     <chm.generic lang="tr"/>
 </target>
-<target description="- builds the Turkish nroff files" name="man-tr">
+<target description="- builds the Turkish nroff files" unless="skip-man" depends="check-man" name="man-tr">
     <nroff.generic lang="tr"/>
 </target>
 
index 8ef0b4a0487fc7a9a999bf62abbec898745fbc8b..946714a29b36bc454d391d4cd8be03b5b871ac09 100644 (file)
 <project name="lang-targets">
     &lf;&lf;
 
+    <!-- Test for existence of man page directory -->
+    <target name="check-man">
+        <if><not><available file="../../man" type="dir" /></not><then>
+            <property name="skip-man" value="yes" />
+        </then></if>
+    </target>
+    &lf;
+
     <!-- build *-all targets -->
     <!-- =================== -->
     <target name="all"
 
             <xsl:if test="$file/man">
                 <target name="man-{.}"
+                        depends="check-man"
+                        unless="skip-man"
                         description="- builds the {$file/name} nroff files">&lf;
                     <xsl:text>    </xsl:text>
                     <nroff.generic lang="{.}" />&lf;