This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: autoheader not installed breaks build
- To: binutils at sourceware dot cygnus dot com
- Subject: PATCH: autoheader not installed breaks build
- From: Carlo Wood <carlo at alinoe dot com>
- Date: Sun, 13 Aug 2000 14:21:08 +0200
- Cc: Stefan Pettersson <stefan at kanard dot se>
- References: <XFMail.000812234340.stefan@kanard.se> <20000812163757.A1024@lucon.org>
> On Sat, Aug 12, 2000 at 11:43:40PM +0200, Stefan Pettersson wrote:
> > Then:
> > $make
> > make[1]: Entering directory `/usr/src/binutils-2.10.0.18/libiberty'
> > if [ x"" != x ] && [ ! -d pic ]; then \
> > mkdir pic; \
> > else true; fi
> > touch stamp-picdir
> > cd . && autoheader
> > /bin/sh: autoheader: command not found
> > make[1]: *** [cstamp-h.in] Error 127
> > make[1]: Leaving directory `/usr/src/binutils-2.10.0.18/libiberty'
> > make: *** [all-libiberty] Error 2
> > $locate autoheader
> > -none-
> >
> > Why is autoheader needed, it isn't needed when I compile any other program.
Dependency `configure.in' is newer than dependent `cstamp-h.in'.
Dependency `acconfig.h' is older than dependent `cstamp-h.in'.
Must remake target `cstamp-h.in'.
cd . && autoheader
configure.in is newer than cstamp-h.in simply because the tar is build
from a CVS checkout without running 'make all' or 'make cstamp-h.in'
prior to making the tar: the modification times are the modification
or check-in times times of the CVS repository.
In order to fix this, cstamp-h.in should be checked into the repository
every time configure.in (or acconfig.h) is checked in, even when it
isn't actually changed (it was only touched). Or, cstamp-h.in could
be touched just prior to making the tar; that is less safe, but when
it breaks something then the tar is broken anyway: it should be possible
to build everything without having autoheader installed anyway.
This is an issue for all files
1) whose modification time is used by `make' to decide
whether or not to build a target.
2) for which building the corresponding target requires
special tools (like autoheader)
3) for which building the corresponding target isn't really
required when the file wasn't really changed (but only touched, see 1)).
If we restrict ourselfs to the special tools
aclocal, autoheader, autoconf and automake
then using a brute force search I find in all of
binutils-2.10.0.18.tar.gz exactly ONE target that matches
these constrains:
libiberty/Makefile.in:
$(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
cd $(srcdir) && autoheader
@rm -f $(srcdir)/cstamp-h.in
echo timestamp > $(srcdir)/cstamp-h.in
Because libiberty is included in more release tar balls than
only binutils, it might not be clean to add a `touch' to the
Makefile in the base directory;
Instead, I suggest to simply stop the build from breaking
when `autoheader' doesn't exist.
The following patch does that.
-------------------------------------------
diff -ur binutils-2.10.0.18/libiberty/Makefile.in binutils-2.10.0.18.run/libiberty/Makefile.in
--- binutils-2.10.0.18/libiberty/Makefile.in Fri Jun 16 03:33:31 2000
+++ binutils-2.10.0.18.run/libiberty/Makefile.in Sun Aug 13 14:08:02 2000
@@ -242,7 +242,7 @@
$(srcdir)/config.in: $(srcdir)/cstamp-h.in
$(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
- cd $(srcdir) && autoheader
+ (cd $(srcdir) && autoheader || exit 0)
@rm -f $(srcdir)/cstamp-h.in
echo timestamp > $(srcdir)/cstamp-h.in
-------------------------------------------
Regards,
--
Carlo Wood <carlo@alinoe.com> -=- Jesus Loves you -=-