automake-patches
[Top][All Lists]
Advanced

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

Re: acinclude.m4 required everywhere


From: Alexandre Duret-Lutz
Subject: Re: acinclude.m4 required everywhere
Date: Sun, 27 Apr 2003 20:12:45 +0200
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux)

>>> "Raja" == Raja R Harinath <address@hidden> writes:

[...]

 Raja> if (-f 'acinclude.m4')
 Raja> {
 Raja>     $regen_aclocal = 1;
 Raja> -   push @ac_deps, 'acinclude.m4';
 Raja> +   push @ac_deps, '$(top_srcdir)/acinclude.m4';
 Raja> }

 Raja> (Actually, you can remove that line completely too.)

We can even remove all mentions of `acinclude.m4' from Automake.
That's great!

I'm installing the following patch.  

Note that I can think of one (weird) scenario that was handled
by the previous code, but which will not work anymore:

Consider a project where
  - aclocal.m4 exists but acinclude.m4 doesn't
  - the source tree has been configured and compiled
now
  - create acinclude.m4
  - touch all Makefile.ams
  - run (GNU) make

This will cause automake to be rerun in all directories.  Before
this patch, automake would have hardcoded acinclude.m4 as a
dependency of aclocal.m4, hence aclocal.m4 would then have been
rebuilt and autoconf and automake run again.  With this patch
aclocal.m4 will not be rerun to take acinclude.m4 into account
unless you run it yourself or touch any configure dependency.

I'm not really concerned by this, because creating acinclude.m4
without touching any configure dependency is very unlikely, and
not dealing in automake with aclocal details such as
acinclude.m4 really seems a win.

2003-04-27  Alexandre Duret-Lutz  <address@hidden>

        * automake.in (@common_files): Remove acinclude.m4 since
        it will be m4_included by aclocal.m4 and files are always
        distributed.
        (scan_aclocal_m4): Do not bother about acinclude.m4 anymore.
        We will get this dependency when tracing m4_includes.
        * tests/aclocal6.test: Make sure acinclude.m4 is distributed
        when used.
        * tests/acinclude.test: Delete.
        * tests/Makefile.am (TESTS): Remove acinclude.test.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1455
diff -u -r1.1455 automake.in
--- automake.in 25 Apr 2003 20:46:20 -0000      1.1455
+++ automake.in 27 Apr 2003 17:51:12 -0000
@@ -221,7 +221,7 @@
 # DISTFILES.
 my @common_files =
     (qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
-       COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO acinclude.m4
+       COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
        ansi2knr.1 ansi2knr.c compile config.guess config.rpath config.sub
        configure configure.ac configure.in depcomp elisp-comp
        install-sh libversion.in mdate-sh missing mkinstalldirs
@@ -4311,12 +4311,6 @@
     }
 
     my @ac_deps = ();
-
-    if (-f 'acinclude.m4')
-    {
-       $regen_aclocal = 1;
-       push @ac_deps, 'acinclude.m4';
-    }
 
     if (variable_defined ('ACLOCAL_M4_SOURCES'))
     {
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.489
diff -u -r1.489 Makefile.am
--- tests/Makefile.am   25 Apr 2003 18:39:21 -0000      1.489
+++ tests/Makefile.am   27 Apr 2003 17:51:14 -0000
@@ -3,7 +3,6 @@
 XFAIL_TESTS = auxdir2.test cond17.test txinfo5.test
 
 TESTS =        \
-acinclude.test \
 aclibobj.test \
 aclocal.test \
 aclocal3.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.629
diff -u -r1.629 Makefile.in
--- tests/Makefile.in   25 Apr 2003 20:46:21 -0000      1.629
+++ tests/Makefile.in   27 Apr 2003 17:51:14 -0000
@@ -114,7 +114,6 @@
 target_alias = @target_alias@
 XFAIL_TESTS = auxdir2.test cond17.test txinfo5.test
 TESTS = \
-acinclude.test \
 aclibobj.test \
 aclocal.test \
 aclocal3.test \
Index: tests/acinclude.test
===================================================================
RCS file: tests/acinclude.test
diff -N tests/acinclude.test
--- tests/acinclude.test        24 Apr 2003 18:48:06 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 2002, 2003  Free Software Foundation, Inc.
-#
-# This file is part of GNU Automake.
-#
-# GNU Automake is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# GNU Automake is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with autoconf; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Test to make sure acinclude is actually included.
-# Report from Jim Meyering.
-
-. ./defs || exit 1
-
-set -e
-: > acinclude.m4
-
-$ACLOCAL
-grep 'm4_include.*acinclude\.m4' aclocal.m4
Index: tests/aclocal6.test
===================================================================
RCS file: /cvs/automake/automake/tests/aclocal6.test,v
retrieving revision 1.1
diff -u -r1.1 aclocal6.test
--- tests/aclocal6.test 25 Apr 2003 18:39:21 -0000      1.1
+++ tests/aclocal6.test 27 Apr 2003 17:51:14 -0000
@@ -19,7 +19,7 @@
 # Boston, MA 02111-1307, USA.
 
 # Make sure aclocal.m4 is rebuilt whenever a configure
-# dependency changes.  Test for VPATH too.
+# dependency changes.  Test for acinclude.m4 and VPATH too.
 
 required='GNUmake'
 . ./defs || exit 1
@@ -57,13 +57,21 @@
 # Update an aclocal.m4 dependency, then make sure all Makefiles
 # are updated, even from a sub-directory.
 echo 'AC_DEFUN([SOME_DEFS], [MORE_DEFS])' > ../m4/somedefs.m4
+# Because aclocal will run again, it should also pick up acinclude.m4.
+echo 'AC_SUBST([METOO])' > ../acinclude.m4
+
 cd sub
 $MAKE
 cd ..
 grep GREPME Makefile
 grep GREPME sub/Makefile
+grep GREPME sub/Makefile
+grep METOO Makefile
+grep METOO sub/Makefile
+grep METOO sub/Makefile
 
 # Make sure configure dependencies are distributed.
 $MAKE distdir
 test -f aclocal6-1.0/m4/moredefs.m4
 test -f aclocal6-1.0/m4/somedefs.m4
+test -f aclocal6-1.0/acinclude.m4

-- 
Alexandre Duret-Lutz





reply via email to

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