New upstream version 1.10
[debian/gzip] / build-aux / gendocs.sh
index 33277d3ac1a6c8520de171cf3e175d6cdb8f54e2..91c058dc76d0b5b9c7a3b467e892c2abc9b8938c 100755 (executable)
@@ -2,7 +2,7 @@
 # gendocs.sh -- generate a GNU manual in many formats.  This script is
 #   mentioned in maintain.texi.  See the help message below for usage details.
 
-scriptversion=2018-01-01.00
+scriptversion=2018-03-06.19
 
 # Copyright 2003-2018 Free Software Foundation, Inc.
 #
@@ -59,6 +59,7 @@ commonarg= # passed to all makeinfo/texi2html invcations.
 dirargs=   # passed to all tools (-I dir).
 dirs=      # -I directories.
 htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
+default_htmlarg=true
 infoarg=--no-split
 generate_ascii=true
 generate_html=true
@@ -163,7 +164,7 @@ while test $# -gt 0; do
     --common)    shift; commonarg=$1;;
     --docbook)   docbook=yes;;
     --email)     shift; EMAIL=$1;;
-    --html)      shift; htmlarg=$1;;
+    --html)      shift; default_htmlarg=false; htmlarg=$1;;
     --info)      shift; infoarg=$1;;
     --no-ascii)  generate_ascii=false;;
     --no-html)   generate_ascii=false;;
@@ -199,6 +200,11 @@ commonarg=" $dirargs $commonarg"
 # For most of the following, the base name is just $PACKAGE
 base=$PACKAGE
 
+if $default_htmlarg && test -n "$use_texi2html"; then
+  # The legacy texi2html doesn't support TOP_NODE_UP_URL
+  htmlarg="--css-ref=/software/gnulib/manual.css"
+fi
+
 if test -n "$srcfile"; then
   # but here, we use the basename of $srcfile
   base=`basename "$srcfile"`
@@ -497,7 +503,7 @@ $GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
 echo "Done, see $outdir/ subdirectory for new files."
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-end: "$"