automake
[Top][All Lists]
Advanced

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

Re: Automake violations of the gnu coding conventions


From: Ralf Wildenhues
Subject: Re: Automake violations of the gnu coding conventions
Date: Tue, 19 Jun 2007 22:20:35 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

* K. Richard Pixley wrote on Tue, Jun 19, 2007 at 09:46:10PM CEST:
> 
> Pick a package that uses automake.  Download the tarball.  Unpack.  
> Remove automake from your system.
> 
> At this point we need to scramble the file time stamps.  You can do this 
> in any number of ways.  The easiest, albeit artificial method, is to 
> simply touch Makefile.am.  However, you can accomplish the same thing by 
> storing the code into cvs, or subversion, or perforce, or any of a 
> number of other source code control systems.  You can also do it by 
> moving the unpacked code, perhaps using rsync, or scp, or http, or even 
> the venerable old insecure ftp.
> 
> Then configure and attempt to build the package as usual.

Here we go.  This is what I did, you can cut and paste it except near
the end (where the `#' comment is) to see for yourself and report
differences:

cd /tmp
mkdir sample
cd sample
cat >configure.ac <<\EOF
AC_INIT([pkg], [1], [bug-address])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF
cat >Makefile.am <<\EOF
dist_bin_SCRIPTS = foo
EOF
: >foo
autoreconf -vi
./configure
make dist

cd /tmp
mkdir foo
cd foo
gzip -dc ../sample/pkg-1.tar.gz | tar xf -
touch pkg-1/Makefile.am
mkdir build
cd build
../pkg-1/configure

# now remove automake-1.10 from $PATH
make; echo $?

This is the output from the last line on my system:

|  cd ../pkg-1 && /bin/sh /tmp/foo/pkg-1/missing --run automake-1.10 --foreign  
Makefile
| /tmp/foo/pkg-1/missing: line 54: automake-1.10: command not found
| WARNING: `automake-1.10' is missing on your system.  You should only need it 
if
|          you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
|          You might want to install the `Automake' and `Perl' packages.
|          Grab them from any GNU archive site.
|  cd . && /bin/sh ./config.status Makefile
| config.status: creating Makefile
| make: Nothing to be done for `all'.
| 0

Now, the build has completed successfully.  

If I instead touch configure.ac, the output on my system will be:

| cd ../pkg-1 && /bin/sh /tmp/foo/pkg-1/missing --run aclocal-1.10
| /tmp/foo/pkg-1/missing: line 54: aclocal-1.10: command not found
| WARNING: `aclocal-1.10' is missing on your system.  You should only need it if
|          you modified `acinclude.m4' or `configure.ac'.  You might want
|          to install the `Automake' and `Perl' packages.  Grab them from
|          any GNU archive site.
|  cd ../pkg-1 && /bin/sh /tmp/foo/pkg-1/missing --run automake-1.10 --foreign
| /tmp/foo/pkg-1/missing: line 54: automake-1.10: command not found
| WARNING: `automake-1.10' is missing on your system.  You should only need it 
if
|          you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
|          You might want to install the `Automake' and `Perl' packages.
|          Grab them from any GNU archive site.
| cd ../pkg-1 && /bin/sh /tmp/foo/pkg-1/missing --run autoconf
| aclocal.m4:14: error: this file was generated for autoconf 2.61.
| You have another version of autoconf.  If you want to use that,
| you should regenerate the build system entirely.
| aclocal.m4:14: the top level
| autom4te: /usr/bin/m4 failed with exit status: 63
| WARNING: `autoconf' is probably too old.  You should only need it if
|          you modified `configure.ac'.  You might want to install the
|          `Autoconf' and `GNU m4' packages.  Grab them from any GNU
|          archive site.
| /bin/sh ./config.status --recheck
| running CONFIG_SHELL=/bin/sh /bin/sh ../pkg-1/configure --no-create 
--no-recursion
| checking for a BSD-compatible install... /usr/bin/install -c
| checking whether build environment is sane... yes
| checking for a thread-safe mkdir -p... /bin/mkdir -p
| checking for gawk... gawk
| checking whether make sets $(MAKE)... yes
| checking for gcc... gcc
| checking for C compiler default output file name... a.out
| checking whether the C compiler works... yes
| checking whether we are cross compiling... no
| checking for suffix of executables...
| checking for suffix of object files... o
| checking whether we are using the GNU C compiler... yes
| checking whether gcc accepts -g... yes
| checking for gcc option to accept ISO C89... none needed
| checking for style of include used by make... GNU
| checking dependency style of gcc... none
| configure: creating ./config.status
|  /bin/sh ./config.status
| config.status: creating Makefile
| config.status: executing depfiles commands
| make: Nothing to be done for `all'.
| 0

Still, the build succeeds.  (The error about autoconf being the wrong
version is that I did not remove all autoconf programs from the PATH,
just the right one.)

What was your point again with respect to missing autotools?
Can you now finally be bothered to bring forward a specific setup that
goes wrong?

(Note! that I specifically addressed messed-up time stamps with absense
of autotools here.  Presense of autotools but read-only source tree is
another matter entirely here.)

> >>What I'm saying is that a conditional that takes place at that time 
> >>isn't useful to a typical builder who does not have version X.Y of 
> >>automake handy.  He can't use that conditional.
> >>    
> >What?  The conversion from Makefile.in to Makefile is typically part of
> >the configure process (config.status to be precise), so user's choice.
> You've lost me here.  A conditional that takes place at automake time 
> isn't useful to a typical builder who doesn't have access to (the right 
> version of) automake.

Read what I wrote.  The conditional is decided at configure time, not at
automake run time.

> And makefile conditionals in v7 make aren't 
> trivial, tending to require an extra level of recursion.

Yes, sure.

> What level of conditional are you talking about?

The thing implemened by the AM_CONDITIONAL macro.
You can read about it in the Automake manual:
<http://sources.redhat.com/automake/automake.html#Conditionals>

HTH,
Ralf




reply via email to

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