texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5498] gendocs.sh: new options to omit output formats


From: karl
Subject: [5498] gendocs.sh: new options to omit output formats
Date: Thu, 01 May 2014 17:13:10 +0000

Revision: 5498
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5498
Author:   karl
Date:     2014-05-01 17:13:09 +0000 (Thu, 01 May 2014)
Log Message:
-----------
gendocs.sh: new options to omit output formats

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/util/gendocs.sh

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-04-30 22:16:55 UTC (rev 5497)
+++ trunk/ChangeLog     2014-05-01 17:13:09 UTC (rev 5498)
@@ -1,3 +1,7 @@
+2014-05-01  Karl Berry  <address@hidden>
+
+       * util/gendocs.sh (--no-html, --no-info, --no-tex): new options.
+
 2014-04-29  Gavin Smith  <address@hidden>
 
        * info/indices.c (info_indices_of_file_buffer, index_entry_exists):

Modified: trunk/util/gendocs.sh
===================================================================
--- trunk/util/gendocs.sh       2014-04-30 22:16:55 UTC (rev 5497)
+++ trunk/util/gendocs.sh       2014-05-01 17:13:09 UTC (rev 5498)
@@ -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=2013-10-10.09
+scriptversion=2014-05-01.10
 
 # Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
 # Free Software Foundation, Inc.
@@ -78,6 +78,9 @@
   --html ARG   pass ARG to makeinfo or texi2html for HTML targets.
   --info ARG   pass ARG to makeinfo for Info, instead of --no-split.
   --no-ascii   skip generating the plain text output.
+  --no-html    skip generating the html output.
+  --no-info    skip generating the info output.
+  --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.
 
@@ -143,6 +146,9 @@
 htmlarg=
 infoarg=--no-split
 generate_ascii=true
+generate_html=true
+generate_info=true
+generate_tex=true
 outdir=manual
 source_extra=
 split=node
@@ -159,6 +165,9 @@
     --html)      shift; htmlarg=$1;;
     --info)      shift; infoarg=$1;;
     --no-ascii)  generate_ascii=false;;
+    --no-html)   generate_ascii=false;;
+    --no-info)   generate_info=false;;
+    --no-tex)    generate_tex=false;;
     --source)    shift; source_extra=$1;;
     --split)     shift; split=$1;;
     --texi2html) use_texi2html=1;;
@@ -270,32 +279,39 @@
 echo " in `pwd`"
 mkdir -p "$outdir/"
 
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
-echo "Generating info... ($cmd)"
-rm -f $PACKAGE.info* # get rid of any strays
-eval "$cmd"
-tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
-ls -l "$outdir/$PACKAGE.info.tar.gz"
-info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
-# do not mv the info files, there's no point in having them available
-# separately on the web.
+# 
+if $generate_info; then
+  cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+  echo "Generating info... ($cmd)"
+  rm -f $PACKAGE.info* # get rid of any strays
+  eval "$cmd"
+  tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
+  ls -l "$outdir/$PACKAGE.info.tar.gz"
+  info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
+  # do not mv the info files, there's no point in having them available
+  # separately on the web.
+fi  # end info
 
-cmd="$SETLANG $TEXI2DVI $dirargs \"$srcfile\""
-printf "\nGenerating dvi... ($cmd)\n"
-eval "$cmd"
-# compress/finish dvi:
-gzip -f -9 $PACKAGE.dvi
-dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
-mv $PACKAGE.dvi.gz "$outdir/"
-ls -l "$outdir/$PACKAGE.dvi.gz"
+# 
+if $generate_tex; then
+  cmd="$SETLANG $TEXI2DVI $dirargs \"$srcfile\""
+  printf "\nGenerating dvi... ($cmd)\n"
+  eval "$cmd"
+  # compress/finish dvi:
+  gzip -f -9 $PACKAGE.dvi
+  dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
+  mv $PACKAGE.dvi.gz "$outdir/"
+  ls -l "$outdir/$PACKAGE.dvi.gz"
 
-cmd="$SETLANG $TEXI2DVI --pdf $dirargs \"$srcfile\""
-printf "\nGenerating pdf... ($cmd)\n"
-eval "$cmd"
-pdf_size=`calcsize $PACKAGE.pdf`
-mv $PACKAGE.pdf "$outdir/"
-ls -l "$outdir/$PACKAGE.pdf"
+  cmd="$SETLANG $TEXI2DVI --pdf $dirargs \"$srcfile\""
+  printf "\nGenerating pdf... ($cmd)\n"
+  eval "$cmd"
+  pdf_size=`calcsize $PACKAGE.pdf`
+  mv $PACKAGE.pdf "$outdir/"
+  ls -l "$outdir/$PACKAGE.pdf"
+fi # end tex (dvi + pdf)
 
+# 
 if $generate_ascii; then
   opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
   cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
@@ -308,6 +324,9 @@
   ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
 fi
 
+# 
+
+if $generate_html; then
 # Split HTML at level $1.  Used for texi2html.
 html_split()
 {
@@ -382,7 +401,9 @@
   html_split chapter
   html_split section
 fi
+fi # end html
 
+# 
 printf "\nMaking .tar.gz for sources...\n"
 d=`dirname $srcfile`
 (
@@ -393,6 +414,8 @@
 )
 texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
 
+# 
+# Do everything again through docbook.
 if test -n "$docbook"; then
   opt="-o - --docbook $commonarg"
   cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
@@ -431,7 +454,8 @@
   mv $PACKAGE-db.pdf "$outdir/"
 fi
 
-printf "\nMaking index file...\n"
+# 
+printf "\nMaking index.html for $PACKAGE...\n"
 if test -z "$use_texi2html"; then
   CONDS="/%%IF  *HTML_SECTION%%/,/%%ENDIF  *HTML_SECTION%%/d;\
          /%%IF  *HTML_CHAPTER%%/,/%%ENDIF  *HTML_CHAPTER%%/d"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]