]> Savannah Git Hosting - gnulib.git/commitdiff
gendocs: new option --tex for texi2dvi options
authorKarl Berry <karl@freefriends.org>
Tue, 7 Apr 2015 21:50:26 +0000 (14:50 -0700)
committerKarl Berry <karl@freefriends.org>
Tue, 7 Apr 2015 21:50:26 +0000 (14:50 -0700)
ChangeLog
build-aux/gendocs.sh

index be92f08a4db7a453a476ec8d2ec449442e32f734..a6db1c69e50d957f3161d2be2d6a5aeaf8f038e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-04-07  Karl Berry  <karl@gnu.org>
+
+       gendocs: new option --tex for passing args to texi2dvi.
+       * build-aux/gendocs.sh: new option --tex, default -t @finalout.
+       (TEXI2DVI): cut to just command name.
+       (usage): mention new option, and update copyright.
+       <generate_tex>: use it.
+
 2015-04-07  Karl Berry  <karl@gnu.org>
 
        * config/srclistvars.sh (GETTEXT): new definition.
index 46faaafb8935c166220baad274c4560bc529e05c..a5fa0d6e32f625d961b905f81e2b417cdc77f3f5 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=2015-01-02.22
+scriptversion=2015-04-04.08
 
 # Copyright 2003-2015 Free Software Foundation, Inc.
 #
@@ -29,7 +29,7 @@ scriptversion=2015-01-02.22
 # http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template
 
 # TODO:
-# - image importation was only implemented for HTML generated by
+# - image importing was only implemented for HTML generated by
 #   makeinfo.  But it should be simple enough to adjust.
 # - images are not imported in the source tarball.  All the needed
 #   formats (PDF, PNG, etc.) should be included.
@@ -42,7 +42,7 @@ templateurl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_templ
 
 : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
 : ${MAKEINFO="makeinfo"}
-: ${TEXI2DVI="texi2dvi -t @finalout"}
+: ${TEXI2DVI="texi2dvi"}
 : ${DOCBOOK2HTML="docbook2html"}
 : ${DOCBOOK2PDF="docbook2pdf"}
 : ${DOCBOOK2TXT="docbook2txt"}
@@ -54,7 +54,7 @@ unset use_texi2html
 
 version="gendocs.sh $scriptversion
 
-Copyright 2013 Free Software Foundation, Inc.
+Copyright 2015 Free Software Foundation, Inc.
 There is NO warranty.  You may redistribute this software
 under the terms of the GNU General Public License.
 For more information about these matters, see the files named COPYING."
@@ -81,6 +81,7 @@ Options:
   --no-tex     skip generating the dvi and pdf output.
   --source ARG include ARG in tar archive of sources.
   --split HOW  make split HTML by node, section, chapter; default node.
+  --tex ARG    pass ARG to texi2dvi for DVI and PDF, instead of -t @finalout.
 
   --texi2html  use texi2html to make HTML target, with all split versions.
   --docbook    convert through DocBook too (xml, txt, html, pdf).
@@ -151,6 +152,7 @@ outdir=manual
 source_extra=
 split=node
 srcfile=
+texarg="-t @finalout"
 
 while test $# -gt 0; do
   case $1 in
@@ -168,6 +170,7 @@ while test $# -gt 0; do
     --no-tex)    generate_tex=false;;
     --source)    shift; source_extra=$1;;
     --split)     shift; split=$1;;
+    --tex)       shift; texarg=$1;;
     --texi2html) use_texi2html=1;;
 
     --help)      echo "$usage"; exit 0;;
@@ -293,7 +296,7 @@ fi  # end info
 
 # \f
 if $generate_tex; then
-  cmd="$SETLANG $TEXI2DVI $dirargs \"$srcfile\""
+  cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
   printf "\nGenerating dvi... ($cmd)\n"
   eval "$cmd"
   # compress/finish dvi:
@@ -302,7 +305,7 @@ if $generate_tex; then
   mv $PACKAGE.dvi.gz "$outdir/"
   ls -l "$outdir/$PACKAGE.dvi.gz"
 
-  cmd="$SETLANG $TEXI2DVI --pdf $dirargs \"$srcfile\""
+  cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
   printf "\nGenerating pdf... ($cmd)\n"
   eval "$cmd"
   pdf_size=`calcsize $PACKAGE.pdf`