[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gendoc.sh: Add "-s" option for specifying an alternate source file.
From: |
Ben Pfaff |
Subject: |
gendoc.sh: Add "-s" option for specifying an alternate source file. |
Date: |
Sat, 13 Feb 2010 21:39:17 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
GNU PSPP has a Texinfo manual in a "doc" subdirectory that is built
from its top-level Makefile.am. Currently "gendocs.sh doc/pspp" fails
from the root of the PSPP distribution, because it tries to create
"manual/doc/pspp.info" and so on. But so does "gendocs.sh pspp" from
the "doc" directory, because doc/pspp.texinfo has @include directives
of the form "@include doc/<file>.texinfo".
This patch fixes the problem, allowing "gendocs.sh -s doc/pspp.texinfo
pspp" to work.
2010-02-13 Ben Pfaff <address@hidden>
* util/gendocs.sh: Add "-s" option for specifying an alternate
Texinfo source file name.
---
util/gendocs.sh | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
Index: util/gendocs.sh
===================================================================
--- util/gendocs.sh.orig
+++ util/gendocs.sh
@@ -56,6 +56,7 @@ See the GNU Maintainers document for a m
http://www.gnu.org/prep/maintain_toc.html
Options:
+ -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
-o OUTDIR write files into OUTDIR, instead of manual/.
--email ADR use ADR as contact in generated web pages.
--docbook convert to DocBook too (xml, txt, html, pdf and ps).
@@ -119,12 +120,14 @@ PACKAGE=
address@hidden # please override with --email
htmlarg=
outdir=manual
+srcfile=
while test $# -gt 0; do
case $1 in
--email) shift; EMAIL=$1;;
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
+ -s) shift; srcfile=$1;;
-o) shift; outdir=$1;;
--docbook) docbook=yes;;
--html) shift; htmlarg=$1;;
@@ -146,7 +149,9 @@ while test $# -gt 0; do
shift
done
-if test -s "$srcdir/$PACKAGE.texinfo"; then
+if test -n "$srcfile"; then
+ :
+elif test -s "$srcdir/$PACKAGE.texinfo"; then
srcfile=$srcdir/$PACKAGE.texinfo
elif test -s "$srcdir/$PACKAGE.texi"; then
srcfile=$srcdir/$PACKAGE.texi
@@ -268,7 +273,8 @@ else
fi
echo Making .tar.gz for sources...
-srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true
+d=`dirname $srcfile`
+srcfiles=`ls $d/*.texinfo $d/*.texi $d/*.txi $d/*.eps 2>/dev/null` || true
tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles
texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz`
--
Only wimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)
-- Linus Torvalds
- gendoc.sh: Add "-s" option for specifying an alternate source file.,
Ben Pfaff <=