bug-automake
[Top][All Lists]
Advanced

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

FYI: AM_MAKEINFOHTMLFLAGS (Was: Re: HTML target)


From: Alexandre Duret-Lutz
Subject: FYI: AM_MAKEINFOHTMLFLAGS (Was: Re: HTML target)
Date: Tue, 11 Nov 2003 01:06:55 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

>>> "Simon" == Simon Josefsson <address@hidden> writes:

[...]

 Simon> But the automake rule seem to output the HTML into a sub-directory
 Simon> foo.html/.  Any thoughts on making the automake HTML support a bit
 Simon> more flexible?  E.g., allowing single-file outputs (--no-split).
 Simon> Defaulting to the --no-split mode of operation would make the HTML
 Simon> target similar to PS, PDF and INFO targets, FWIW.  But I guess
 Simon> automake ideally should support both --no-split and generating many
 Simon> files in a sub-directory too.  In that case, there is a problem with
 Simon> calling the sub-directory 'foo.html' since it prevents a file
 Simon> 'foo.html'. Rename the directory to 'foo-html'?

The plan was definitely to support both, but not simultaneously
(I confess I can't see why someone would want both output).  The
fact that the output has the same name whether --no-split was
used or not actually simplify the rules.

[...]

 Simon> Is it possible to use '--no-split for HTML but not for Info?

Here you go.  I'm checking in the following patch for this.

For the records, the introduction of MAKEINFOHTML (in addition
to AM_MAKEINFOHTMLFLAGS) is related to this discussion:
http://mail.gnu.org/archive/html/automake-patches/2003-02/msg00065.html

 Simon> Btw, the manual still contains a small section with:

 Simon> For instance, until HTML support is part of Automake,
 Simon> you could use this to install raw HTML documentation:

Thanks for noticing that.

2003-11-11  Alexandre Duret-Lutz  <address@hidden>

        * doc/automake.texi (Texinfo): Define MAKEINFO, MAKEINFOHTML,
        MAKEINFOFLAGS, AM_MAKEINFOFLAGS, AM_MAKEINFOHTMLFLAGS, TEXI2DVI,
        TEXI2PDF, DVIPS, and TEXINFO_TEX in a table.
        (Uniform): Do not speak of missing HTML support, this is
        confusing.
        * lib/Automake/Variable.pm (_silent_variable_override): Add
        AM_MAKEINFOHTMLFLAGS.
        * lib/am/texibuild.am (%SOURCE_SUFFIX%.html): Use MAKEINFOHTML and
        AM_MAKEINFOHTMLFLAGS instead of MAKEINFO and AM_MAKEINFOFLAGS.
        * lib/am/texinfos.am (MAKEINFOHTML, AM_MAKEINFOHTMLFLAGS): Define.
        * tests/txinfo21.test: Add a test with AM_MAKEINFOHTMLFLAGS.

Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.8
diff -u -r1.8 automake.texi
--- doc/automake.texi   10 Nov 2003 20:55:31 -0000      1.8
+++ doc/automake.texi   11 Nov 2003 00:02:17 -0000
@@ -420,10 +420,10 @@
 directories.  A given prefix (e.g. @samp{zar}) is valid if a variable of
 the same name with @samp{dir} appended is defined (e.g. @code{zardir}).
 
address@hidden HTML support, example
address@hidden HTML installation, example
 
-For instance, until HTML support is part of Automake, you could use this
-to install raw HTML documentation:
+For instance, installation of HTML files is part of Automake, you could
+use this to install raw HTML documentation:
 
 @example
 htmldir = $(prefix)/html
@@ -4611,6 +4611,10 @@
 @cindex _TEXINFOS primary, defined
 @cindex TEXINFOS primary, defined
 @cindex Primary variable, TEXINFOS
address@hidden HTML output using Texinfo
address@hidden PDF output using Texinfo
address@hidden PS output using Texinfo
address@hidden DVI output using Texinfo
 
 If the current directory contains Texinfo source, you must declare it
 with the @samp{TEXINFOS} primary.  Generally Texinfo files are converted
@@ -4670,18 +4674,6 @@
 Texinfo file that matches @samp{vers*.texi} just as an automatically
 generated version file.
 
-When an info file is rebuilt, the program named by the @code{MAKEINFO}
-variable is used to invoke it.  If the @code{makeinfo} program is found
-on the system then it will be used by default; otherwise @code{missing}
-will be used instead.  The flags in the variables @code{MAKEINFOFLAGS}
-and @code{AM_MAKEINFOFLAGS} will be passed to the @code{makeinfo}
-invocation; the first of these is intended for use by the user
-(@pxref{User Variables}) and the second by the @file{Makefile.am}
-writer.
address@hidden MAKEINFO
address@hidden MAKEINFOFLAGS
address@hidden AM_MAKEINFOFLAGS
-
 Sometimes an info file actually depends on more than one @file{.texi}
 file.  For instance, in GNU Hello, @file{hello.texi} includes the file
 @file{gpl.texi}.  You can tell Automake about these dependencies using
@@ -4697,24 +4689,13 @@
 @cindex texinfo.tex
 
 By default, Automake requires the file @file{texinfo.tex} to appear in
-the same directory as the Texinfo source.  However, if you used
+the same directory as the Texinfo source (this can be changed using the
address@hidden variable, see below).  However, if you used
 @code{AC_CONFIG_AUX_DIR} in @file{configure.ac} (@pxref{Input, , Finding
 `configure' Input, autoconf, The Autoconf Manual}), then
 @file{texinfo.tex} is looked for there.  Automake supplies
 @file{texinfo.tex} if @samp{--add-missing} is given.
 
address@hidden TEXINFO_TEX
-
-If your package has Texinfo files in many directories, you can use the
-variable @code{TEXINFO_TEX} to tell Automake where to find the canonical
address@hidden for your package.  The value of this variable should
-be the relative path from the current @file{Makefile.am} to
address@hidden:
-
address@hidden
-TEXINFO_TEX = ../doc/texinfo.tex
address@hidden example
-
 @opindex no-texinfo.tex
 
 The option @samp{no-texinfo.tex} can be used to eliminate the
@@ -4734,6 +4715,71 @@
 use this.  By default, info pages are installed by @samp{make install}.
 This can be prevented via the @code{no-installinfo} option.
 
+The following variables are used by the Texinfo build rules.
+
address@hidden @code
address@hidden MAKEINFO
+The name of the program invoked to build @file{.info} files.  This
+variable is defined by Automake.  If the @code{makeinfo} program is
+found on the system then it will be used by default; otherwise
address@hidden will be used instead.
+
address@hidden MAKEINFOHTML
+The command invoked to build @file{.html} files.  Automake
+defines this to @code{$(MAKEINFO) --html}.
+
address@hidden MAKEINFOFLAGS
+User flags passed to each invocation of @code{$(MAKEINFO)} and
address@hidden(MAKEINFOHTML)}.  This user variable (@pxref{User Variables}) is
+not expected to be defined in any @file{Makefile}; it can be used by
+users to pass extra flags to suit their needs.
+
address@hidden AM_MAKEINFOFLAGS
address@hidden AM_MAKEINFOHTMLFLAGS
+Maintainer flags passed to each @code{makeinfo} invocation.  These
+are maintainer variables that can be overridden in @file{Makefile.am}.
address@hidden(AM_MAKEINFOFLAGS)} is passed to @code{makeinfo} when building
address@hidden files; and @code{$(AM_MAKEINFOHTMLFLAGS)} is used when
+building @file{.html} files.
+
+For instance the following setting can be used to obtain one single
address@hidden file per manual, without node separators.
address@hidden
+AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
address@hidden example
+
+By default, @code{$(AM_MAKEINFOHTMLFLAGS)} is set to
address@hidden(AM_MAKEINFOFLAGS)}.  This means that defining
address@hidden(AM_MAKEINFOFLAGS)} without defining
address@hidden(AM_MAKEINFOHTMLFLAGS)} will impact builds of both @file{.info}
+and @file{.html} files.
+
address@hidden TEXI2DVI
+The name of the command that converts a @file{.texi} file into a
address@hidden file.  This defaults to @code{texi2dvi}, a script that ships
+with the Texinfo package.
+
address@hidden TEXI2PDF
+The name of the command that translates a @file{.texi} file into a
address@hidden file.  This defaults to @code{$(TEXI2DVI) --pdf --batch}.
+
address@hidden DVIPS
+The name of the command that build a @file{.ps} file out of a
address@hidden file.  This defaults to @code{dvips}.
+
address@hidden TEXINFO_TEX
+
+If your package has Texinfo files in many directories, you can use the
+variable @code{TEXINFO_TEX} to tell Automake where to find the canonical
address@hidden for your package.  The value of this variable should
+be the relative path from the current @file{Makefile.am} to
address@hidden:
+
address@hidden
+TEXINFO_TEX = ../doc/texinfo.tex
address@hidden example
address@hidden vtable
+
 
 @node Man pages
 @section Man pages
@@ -6699,7 +6745,7 @@
 @c  LocalWords:  DISTCLEANFILES MAINTAINERCLEANFILES gzip'd GZIP gzip shar exp
 @c  LocalWords:  distdir distcheck distcleancheck listfiles distuninstallcheck
 @c  LocalWords:  VPATH tarfile stdout XFAIL DejaGnu dejagnu DEJATOOL runtest ln
address@hidden  LocalWords:  RUNTESTDEFAULTFLAGS toolchain RUNTESTFLAGS asis 
readme
address@hidden  LocalWords:  RUNTESTDEFAULTFLAGS toolchain RUNTESTFLAGS asis 
readme DVIPS
 @c  LocalWords:  installcheck gzipped tarZ std utils etags mkid multilibbing cd
 @c  LocalWords:  ARGS taggable ETAGSFLAGS lang ctags CTAGSFLAGS GTAGS gtags idl
 @c  LocalWords:  foocc doit idlC multilibs ABIs cmindex defmac ARG enableval
@@ -6709,4 +6755,4 @@
 @c  LocalWords:  DSOMEFLAG DVERSION automake Lutz insertcopying versioning FAQ
 @c  LocalWords:  LTLIBOBJ Libtool's libtool's libltdl dlopening itutions libbar
 @c  LocalWords:  WANTEDLIBS libhello sublibraries libtop libsub dlopened Ratfor
address@hidden  LocalWords:  mymodule timestamps timestamp underquoted
address@hidden  LocalWords:  mymodule timestamps timestamp underquoted 
MAKEINFOHTMLFLAGS
Index: lib/Automake/Variable.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Variable.pm,v
retrieving revision 1.21
diff -u -r1.21 Variable.pm
--- lib/Automake/Variable.pm    7 Sep 2003 09:55:36 -0000       1.21
+++ lib/Automake/Variable.pm    11 Nov 2003 00:02:18 -0000
@@ -184,7 +184,8 @@
 
 # Variables that can be overriden without complaint from -Woverride
 my %_silent_variable_override =
-  (AR => 1,
+  (AM_MAKEINFOHTMLFLAGS => 1,
+   AR => 1,
    ARFLAGS => 1,
    DEJATOOL => 1,
    JAVAC => 1);
Index: lib/am/texibuild.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texibuild.am,v
retrieving revision 1.18
diff -u -r1.18 texibuild.am
--- lib/am/texibuild.am 8 Nov 2003 13:01:13 -0000       1.18
+++ lib/am/texibuild.am 11 Nov 2003 00:02:18 -0000
@@ -85,7 +85,7 @@
 
 ?GENERIC?%SOURCE_SUFFIX%.html:
 ?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
-       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --html %MAKEINFOFLAGS% 
\
+       $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) 
%MAKEINFOFLAGS% \
 ?GENERIC?       -o $@ %SOURCE%
 ?!GENERIC?      -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.108
diff -u -r1.108 texinfos.am
--- lib/am/texinfos.am  10 Nov 2003 20:55:32 -0000      1.108
+++ lib/am/texinfos.am  11 Nov 2003 00:02:19 -0000
@@ -44,6 +44,8 @@
 endif %?CYGNUS%
 
 TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
 endif %?LOCAL-TEXIS%
 
 
Index: tests/txinfo21.test
===================================================================
RCS file: /cvs/automake/automake/tests/txinfo21.test,v
retrieving revision 1.1
diff -u -r1.1 txinfo21.test
--- tests/txinfo21.test 14 Apr 2003 19:59:30 -0000      1.1
+++ tests/txinfo21.test 11 Nov 2003 00:02:19 -0000
@@ -80,3 +80,19 @@
 test ! -f main.html
 test ! -f sub/main.html
 test ! -f rec/main.html
+
+# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
+cat >>Makefile.am <<\EOF
+AM_MAKEINFOHTMLFLAGS=--no-split
+AM_MAKEINFOFLAGS=--unsupported-option
+EOF
+$AUTOMAKE
+./configure
+$MAKE html
+test -f main.html
+test -f sub/main.html
+test -d rec/main.html
+$MAKE clean
+test ! -f main.html
+test ! -f sub/main.html
+test ! -d rec/main.html

-- 
Alexandre Duret-Lutz





reply via email to

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