[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: texi2html: problems with srcdir != builddir
From: |
Ralf Wildenhues |
Subject: |
Re: texi2html: problems with srcdir != builddir |
Date: |
Fri, 19 Dec 2008 17:03:56 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hello Werner,
Werner LEMBERG <wl <at> gnu.org> writes:
>
> If srcdir != builddir, the file `texi2html.info' is erroneously
> created in srcdir. IMHO, this shouldn't happen even if building from
> the CVS.
Not a bug, but a (long-discussed long ago, changed over time) feature.
For reference, below I quote a longer comment that is part of the
'automake' script.
Hope that helps. Please Cc: me on replies.
Cheers,
Ralf
Until Automake 1.6.3, .info files were built in the
source tree. This was an obstacle to the support of
non-distributed .info files, and non-distributed .texi
files.
* Non-distributed .texi files is important in some packages
where .texi files are built at make time, probably using
other binaries built in the package itself, maybe using
tools or information found on the build host. Because
these files are not distributed they are always rebuilt
at make time; they should therefore not lie in the source
directory. One plan was to support this using
nodist_info_TEXINFOS or something similar. (Doing this
requires some sanity checks. For instance Automake should
not allow:
dist_info_TEXINFOS = foo.texi
nodist_foo_TEXINFOS = included.texi
because a distributed file should never depend on a
non-distributed file.)
* If .texi files are not distributed, then .info files should
not be distributed either. There are also cases where one
wants to distribute .texi files, but does not want to
distribute the .info files. For instance the Texinfo package
distributes the tool used to build these files; it would
be a waste of space to distribute them. It's not clear
which syntax we should use to indicate that .info files should
not be distributed. Akim Demaille suggested that eventually
we switch to a new syntax:
| Maybe we should take some inspiration from what's already
| done in the rest of Automake. Maybe there is too much
| syntactic sugar here, and you want
| nodist_INFO = bar.info
| dist_bar_info_SOURCES = bar.texi
| bar_texi_DEPENDENCIES = foo.texi
| with a bit of magic to have bar.info represent the whole
| bar*info set. That's a lot more verbose that the current
| situation, but it is # not new, hence the user has less
| to learn.
|
| But there is still too much room for meaningless specs:
| nodist_INFO = bar.info
| dist_bar_info_SOURCES = bar.texi
| dist_PS = bar.ps something-written-by-hand.ps
| nodist_bar_ps_SOURCES = bar.texi
| bar_texi_DEPENDENCIES = foo.texi
| here bar.texi is dist_ in line 2, and nodist_ in 4.
Back to the point, it should be clear that in order to support
non-distributed .info files, we need to build them in the
build tree, not in the source tree (non-distributed .texi
files are less of a problem, because we do not output build
rules for them). In Automake 1.7 .info build rules have been
largely cleaned up so that .info files get always build in the
build tree, even when distributed. The idea was that
(1) if during a VPATH build the .info file was found to be
absent or out-of-date (in the source tree or in the
build tree), Make would rebuild it in the build tree.
If an up-to-date source-tree of the .info file existed,
make would not rebuild it in the build tree.
(2) having two copies of .info files, one in the source tree
and one (newer) in the build tree is not a problem
because `make dist' always pick files in the build tree
first.
However it turned out the be a bad idea for several reasons:
* Tru64, OpenBSD, and FreeBSD (not NetBSD) Make do not behave
like GNU Make on point (1) above. These implementations
of Make would always rebuild .info files in the build
tree, even if such files were up to date in the source
tree. Consequently, it was impossible to perform a VPATH
build of a package containing Texinfo files using these
Make implementations.
(Refer to the Autoconf Manual, section "Limitation of
Make", paragraph "VPATH", item "target lookup", for
an account of the differences between these
implementations.)
* The GNU Coding Standards require these files to be built
in the source-tree (when they are distributed, that is).
* Keeping a fresher copy of distributed files in the
build tree can be annoying during development because
- if the files is kept under CVS, you really want it
to be updated in the source tree
- it is confusing that `make distclean' does not erase
all files in the build tree.
Consequently, starting with Automake 1.8, .info files are
built in the source tree again. Because we still plan to
support non-distributed .info files at some point, we
have a single variable ($INSRC) that controls whether
the current .info file must be built in the source tree
or in the build tree. Actually this variable is switched
off for .info files that appear to be cleaned; this is
for backward compatibility with package such as Texinfo,
which do things like
info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
DISTCLEANFILES = texinfo texinfo-* info*.info*
# Do not create info files for distribution.
dist-info:
in order not to distribute .info files.