From: Alan W. I. <ir...@be...> - 2003-01-27 00:24:58
|
On Sun, 26 Jan 2003, Rafael Laboissiere wrote: > This call to autoheader (through the `missing' script) should never, never, > I repeat: _NEVER_ happen when regular users run make. None of the Autotools > should be called during a normal make, since this would defeat the very > purpose of the Autotools. The only tools that are required for > configure/make are a Bourne shell and a regular make (not even GNU make). I agree; that is the whole design philosophy behind autotools. > > Automake, for instance, should only be called from the Makefile when > developpers change one of the autotools source files (like aclocal.m4, > configure.ac, etc). Something is really weird with the 5.2.0 distribution > tarball. > > As I told before, I do not have time to plunge into this problem, but here > is a first try on its diagnosis: Thanks, Rafael, for starting the ball rolling here. You inspired me to find what I think is the correct solution (see end). > > When I run ./configure here on a freshly detarized 5.2.0 distribution, I get > the following rules in include/Makefile: > > $(srcdir)/plConfig.h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) $(top_srcdir)/acconfig.h > cd $(top_srcdir) && $(AUTOHEADER) > touch $(srcdir)/plConfig.h.in > > $(srcdir)/plDevs.h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) $(top_srcdir)/acconfig.h > cd $(top_srcdir) && $(AUTOHEADER) > touch $(srcdir)/plDevs.h.in > > This is a complete non-sense, since there are no src/plConfig.h.in and > src/plDevs.h.in to be built! This is what is triggering the call to > autoheader from make, which should never, I repeat, never occurs for regular > users. Actually, this makes sense. Remember, $(srcdir) is the current directory, i.e., include. So these two rules say run $(AUTOHEADER) if plConfig.h.in or plDevs.h.in in the include directory are out of date relative to $(ACLOCAL_M4) (defined to be $(top_srcdir)/aclocal.m4 in the top-level Makefile) and configure.ac or acconfig.h in the top level directory. So if bootstrap.sh (which invokes autoheader) updates plConfig.h.in and plDevs.h.in, then the above rules will only be run if the user fiddles with configure.ac, acconfig.h, or aclocal.m4 in the top-level directory. However, further investigation reveals bootstrap (and autoheader inside it) did not do its job: tar ztvf ../plplot-5.2.0.tar.gz | grep include |grep '\.in$' -rw-r--r-- software/software 4635 2003-01-19 22:00:30 plplot-5.2.0/include/plConfig.h.in -rw-r--r-- software/software 1056 2002-12-03 00:39:26 plplot-5.2.0/include/plDevs.h.in -rw-r--r-- software/software 15875 2003-01-19 22:00:27 plplot-5.2.0/include/Makefile.in plConfig.h.in and Makefile.in were properly updated, but plDevs.h.in has an old date! It turns out this December 3rd date is older than the relevant top-level files so the $(AUTOHEADER) rule is run (in error), and I believe this is the source of the trouble that Joao found. How to fix it? I think the problem here is that plDevs.h.in is under CVS control (as it should be) so a file exists already and this confuses autoheader. In fact autoheader should *never* be invoked on this file. Thus, I believe the complete solution is simply to do the following changes in configure.ac: AM_CONFIG_HEADER(include/plConfig.h include/plDevs.h) ==> AM_CONFIG_HEADER(include/plConfig.h) src/Makefile include/Makefile ==> src/Makefile include/Makefile include/plDevs.h i.e, Remove the generation of plDevs.h.in from autoheader control and put the generation of plDevs.h under autoconf control. Note on Joao's systems and on the RH 7.3 system available to me the complaints were always about plDevs.h.in, and nothing was said about plConfig.h.in which I think autoheader is handling without any problems (since that file is not under CVS control there is nothing in the exported tree from CVS there before ./bootstrap.sh creates it with autoheader). Maurice and Rafael, do you agree with this analysis? Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the Canadian Centre for Climate Modelling and Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting software package (plplot.org). __________________________ Linux-powered Science __________________________ |