[Top][All Lists]

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

autoreconf 2.52e failure if aclocal need not be run...

From: Ezra Peisach
Subject: autoreconf 2.52e failure if aclocal need not be run...
Date: Tue, 23 Oct 2001 18:28:19 -0400 (EDT)

Two problems:

a) If Makefile.am does not exist in the directory, then the variable
aclocal_flags is never set. In the xsystem call of aclocal perl
complains about an unset variable.

b) If aclocal.m4 exists in the directory, but was not created by
aclocal, then the xsystem call to aclocal does not produce a file
(aclocal.m4t). update_file() is then called, in which case aclocal.m4
is nuked.

My solution to (b) is not to try and update aclocal.m4 if aclocal.m4t
does not exist. A logical question though - if Makefile.am does not exist,
could one still be using "aclocal"? If so, my test is correct, if not,
then if Makefile.am does not exist, one should not invoke aclocal.

Another possibility: If aclocal.m4 exists, but does not contain a line
"generated automatically by aclocal" as the first line - do not run
aclocal.  This of course could be prone to errors as well - but would
give a performance boost.

Your call... My fixes are the minimal needed...


*** /RN/usr/people/epeisach/autoreconf  Tue Oct 23 18:35:11 2001
--- autoreconf.in       Mon Oct 22 18:38:02 2001
*** 284,290 ****
    # If there are flags for aclocal in Makefile.am, use them.
    my $aclocal_flags;
-   $aclocal_flags="";
    if (-f 'Makefile.am')
        my $aclocal_m4 = new Autom4te::XFile 'Makefile.am';
--- 284,289 ----
*** 299,307 ****
    xsystem ("$aclocal $aclocal_flags --output=aclocal.m4t");
!   if (-f 'aclocal.m4t') {
!       update_file ('aclocal.m4t', 'aclocal.m4');
!   }
    # ------------------ #
    # Running automake.  #
--- 298,304 ----
    xsystem ("$aclocal $aclocal_flags --output=aclocal.m4t");
!   update_file ('aclocal.m4t', 'aclocal.m4');
    # ------------------ #
    # Running automake.  #

reply via email to

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