aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2015-04-23 18:25:11 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2015-04-23 18:25:17 +0300
commit8388e2dced146e17e63b0166f2df684b4a2c70a3 (patch)
tree557fe1e48fcc146dfdb66adf9d5de6fc15fbfcd4
parent5832c38c6eab98260d032ab4ceb27140e012b3a2 (diff)
downloaddico-8388e2dced146e17e63b0166f2df684b4a2c70a3.tar.gz
dico-8388e2dced146e17e63b0166f2df684b4a2c70a3.tar.bz2
Fix doc generation.
Default Config file applied to all output formats, which is wrong. Use a dedicated configuration file for html output formats, and defaults for the rest. * doc/Makefile.am (GENDOCS): Add html-specific configuration file. * doc/Config: Rename to doc/html.init (with changes). * doc/gendocs.sh: New option --no-copy-images
-rw-r--r--doc/Makefile.am7
-rwxr-xr-xdoc/gendocs.sh15
-rw-r--r--doc/html.init (renamed from doc/Config)10
3 files changed, 17 insertions, 15 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 0e02104..084bba9 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Dico
-# Copyright (C) 2008, 2010, 2012, 2014 Sergey Poznyakoff
+# Copyright (C) 2008-2015 Sergey Poznyakoff
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -76,10 +76,9 @@ master-menu: imprimatur-master-menu
untabify: imprimatur-untabify
final: imprimatur-final
-GENDOCS=gendocs.sh
+GENDOCS=$(srcdir)/gendocs.sh --no-copy-images --html '--init-file=$(abs_srcdir)/html.init'
-#FIXME: -E
-TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -I $(top_srcdir)/imprimatur
+TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
.PHONY: manual man-tar
# Make sure you set TEXINPUTS.
diff --git a/doc/gendocs.sh b/doc/gendocs.sh
index cd130d0..8ac3a06 100755
--- a/doc/gendocs.sh
+++ b/doc/gendocs.sh
@@ -78,6 +78,8 @@ Options:
--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-copy-images
+ don't try to copy images referenced by img HTML tags,
--source ARG include ARG in tar archive of sources.
--split HOW make split HTML by node, section, chapter; default node.
@@ -147,6 +149,7 @@ outdir=manual
source_extra=
split=default
srcfile=
+no_copy_images=
while test $# -gt 0; do
case $1 in
@@ -162,7 +165,7 @@ while test $# -gt 0; do
--source) shift; source_extra=$1;;
--split) shift; split=$1;;
--texi2html) use_texi2html=1;;
-
+ --no-copy-images) no_copy_images=1;;
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
-*)
@@ -225,6 +228,7 @@ calcsize()
# for them in the -I directories.
copy_images()
{
+ test -n "$no_copy_images" && return
local odir
odir=$1
shift
@@ -343,19 +347,18 @@ if test -z "$use_texi2html"; then
html_mono_size=`calcsize $PACKAGE.html`
gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
-## FIXME
-# copy_images "$outdir/" $PACKAGE.html
+ copy_images "$outdir/" $PACKAGE.html
mv $PACKAGE.html "$outdir/"
ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
- # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
- # it just always split by node. So if we're splitting by node anyway,
- # leave it out.
version=`makeinfo --version|sed -n '1s/.* \([0-9][0-9]*\)\.[0-9.]*/\1/p'`
case $version in
[0-9]*) ;;
*) version=4;;
esac
+ # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
+ # it just always split by node. So if we're splitting by node anyway,
+ # leave it out.
if test $version -lt 5 -o "x$split" != xdefault; then
split_arg=--split=$split
opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
diff --git a/doc/Config b/doc/html.init
index 8ee754b..d312e6a 100644
--- a/doc/Config
+++ b/doc/html.init
@@ -85,12 +85,10 @@ set_from_init_file('PROGRAM_NAME_IN_FOOTER',1);
set_from_init_file('DEFAULT_RULE', '');
set_from_init_file('BIG_RULE', '');
-# Turn off footer buttons in section split
-set_from_init_file('SECTION_FOOTER_BUTTONS', undef);
-#set_from_init_file('SECTION_BUTTONS', undef);
-# Turn off navigation bars at the bottom of each section in chapter split mode
+# Turn off navigation bars at the bottom of each section in chapter split mode,
+# or subsection in section split mode.
set_from_init_file('HEADERS', undef)
- if (get_conf('SPLIT') and (get_conf('SPLIT') eq 'chapter'));
+ if ((get_conf('SPLIT') eq 'chapter') or (get_conf('SPLIT') eq 'section'));
# Use navigation icons
set_from_init_file('ICONS', 1);
@@ -159,9 +157,11 @@ my @gray_buttons = (\&gray_document_title, ' ',
'FastBack', ' ', 'Up', ' ', 'FastForward', ' ',
'Contents', 'Index' );
+set_from_init_file('TOP_BUTTONS', undef);
set_from_init_file('SECTION_BUTTONS', \@gray_buttons);
set_from_init_file('CHAPTER_BUTTONS', \@gray_buttons);
set_from_init_file('NODE_FOOTER_BUTTONS', \@gray_buttons);
+set_from_init_file('SECTION_FOOTER_BUTTONS', \@gray_buttons);
set_from_init_file('MISC_BUTTONS',
[\&gray_document_title,
'Contents',

Return to:

Send suggestions and report system problems to the System administrator.