]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 8 Sep 2011 15:12:38 +0000 (17:12 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 8 Sep 2011 15:14:26 +0000 (17:14 +0200)
* maint:
  aclocal: more granularity in acdir overriding

1  2 
ChangeLog
NEWS
aclocal.in
bootstrap
doc/automake.texi
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/aclocal-print-acdir.test
tests/aclocal.test

diff --cc ChangeLog
index 54d75549b0fc7e69ca1b921d1ebadfeed49c90bb,c25b41ebf937bd32272025bd2a8daf4fbc41084d..0152bfc8c59384b34ce5a005f75e847a005524c4
+++ b/ChangeLog
@@@ -1,14 -1,42 +1,53 @@@
+ 2011-09-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       aclocal: more granularity in acdir overriding
+       Before this change, using the `--acdir' option caused aclocal to
+       redefine both the directory of automake-provided m4 macros and the
+       directory of third-party system-wide m4 macros.  With this change,
+       we deprecate the `--acdir' aclocal option, and introduce two new
+       options `--automake-acdir' and `--system-acdir', to allow for more
+       granularity.
+       * aclocal.in (@automake_includes, @system_includes,
+       @user_includes): Fix and extend comments.
+       (usage): Update.
+       (handle_acdir_option): New function.
+       (parse_arguments): Recognize new options `--system-acdir' and
+       `automake-acdir', and handle `--acdir' using the new function
+       above.  Simplify logic by assuming that the directory of
+       third-party system-wide m4 files always exists.
+       * tests/aclocal.in: Update to use the new options, instead of
+       the deprecated. `--acdir'.
+       * m4/dirlist: Move ...
+       * m4/acdir/dirlist: ... here.
+       * m4/Makefile.am (EXTRA_DIST): Update.
+       (m4datadir): Rename ...
+       (automake_acdir): ... to this.  Accordingly, ...
+       (dist_m4data_DATA): ... rename this ...
+       (dist_automake_ac_DATA): ... to this.
+       (system_acdir): New, directory.
+       (dist_system_ac_DATA): New, defined to an empty value; this will
+       ensure that the $(system_acdir) directory will be created by
+       "make install".
+       * tests/aclocal.test: Remove check about the `--print-ac-dir'
+       option of aclocal, it has been moved into ...
+       * tests/aclocal-print-acdir.test: ... this new test, and quite
+       extended.
+       * tests/aclocal-acdir.test: New test.
+       * tests/Makefile.am (TESTS): Add the new tests.
+       * NEWS, bootstrap: Update.
+       * doc/automake.texi (aclocal Options, Macro Search Path): Update.
 +2011-09-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: fix spurious failures due to ignored signals
 +      * tests/defs (is_blocked_signal): New function.
 +      * tests/parallel-tests-interrupt.test: Do not try to use/trap
 +      signals that are ignored by the parent shell: they will be
 +      ignored by all the child processes too.
 +      * tests/self-check-exit.test: Likewise.
 +      * tests/self-check-cleanup.test: Likewise, and do few minor
 +      improvements and extensions since we are at it.
 +
  2011-09-05  Peter Rosin  <peda@lysator.liu.se>
  
        * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
diff --cc NEWS
index 9e391c970dc0be270f32a408aa1986499a986b0d,776650d3a20f1ea1092bc46b2fdd4e579270a958..60b89d5abee8a05f69cd905ff2b4be23ab5bd08b
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -1,20 -1,20 +1,28 @@@
 -New in 1.11.0a:
 +New in 1.11a:
  
 -* WARNING: Future backward-incompatibilities!
 +* Changes to automake:
  
 -  - The Automake support for automatic de-ANSI-fication will be removed in
 -    the next major Automake release (1.12).
 +  - automake now generates silenced rules for texinfo outputs.
 +
 +  - The deprecated options `--output-dir', `--Werror' and `--Wno-error'
 +    have been removed.
 +
 +* New targets:
 +
 +  - New `cscope' target to build a cscope database for the source tree.
  
+   - The `--acdir' option of aclocal is deprecated, and will probably be
+     removed in the next major Automake release (1.12).
+ * Changes to aclocal:
+   - The `--acdir' option is deprecated.  Now you should use th new options
+     `--automake-acdir' and `--system-acdir' instead.
  * Miscellaneous changes:
  
 +  - The `dist' and `dist-all' targets now can run compressors in parallel.
 +
    - The `lzma' compression scheme and associated automake option `dist-lzma'
      is obsoleted by `xz' and `dist-xz' due to upstream changes.
  
diff --cc aclocal.in
index 394aeaec0fab70bf75a011df8c53a5ed2db0f9dc,8b31bdca448b9859571803889e1d5892035f1c76..02963eec6ad8581e41dd02b4e7b6d45317ea77a4
@@@ -876,9 -879,10 +878,10 @@@ sub usage ($
  Generate `aclocal.m4' by scanning `configure.ac' or `configure.in'
  
  Options:
-       --acdir=DIR           directory holding config files (for debugging)
+       --automake-acdir=DIR  directory holding automake-provided m4 files
+       --system-acdir=DIR    directory holding third-party system-wide files
        --diff[=COMMAND]      run COMMAND [diff -u] on M4 files that would be
 -                              changed (implies --install and --dry-run)
 +                            changed (implies --install and --dry-run)
        --dry-run             pretend to, but do not actually update any file
        --force               always update output file
        --help                print this help, then exit
@@@ -1013,37 -1024,25 +1023,25 @@@ sub parse_arguments (
    if ($install && !@user_includes)
      {
        fatal ("--install should copy macros in the directory indicated by the"
 -           . "\nfirst -I option, but no -I was supplied.");
 +           . "\nfirst -I option, but no -I was supplied");
      }
  
-   if (! -d $system_includes[0])
+   # Finally, adds any directory listed in the `dirlist' file.
+   if (open (DIRLIST, "$system_includes[0]/dirlist"))
      {
-       # By default $(datadir)/aclocal doesn't exist.  We don't want to
-       # get an error in the case where we are searching the default
-       # directory and it hasn't been created.  (We know
-       # @system_includes has its default value if @automake_includes
-       # is not empty, because --acdir is the only way to change this.)
-       @system_includes = () if @automake_includes;
-     }
-   else
-     {
-       # Finally, adds any directory listed in the `dirlist' file.
-       if (open (DIRLIST, "$system_includes[0]/dirlist"))
-       {
-         while (<DIRLIST>)
-           {
-             # Ignore '#' lines.
-             next if /^#/;
-             # strip off newlines and end-of-line comments
-             s/\s*\#.*$//;
-             chomp;
-             foreach my $dir (glob)
-               {
-                 push (@system_includes, $dir) if -d $dir;
-               }
-           }
-         close (DIRLIST);
-       }
+       while (<DIRLIST>)
+         {
+           # Ignore '#' lines.
+           next if /^#/;
+           # strip off newlines and end-of-line comments
+           s/\s*\#.*$//;
+           chomp;
+           foreach my $dir (glob)
+             {
+               push (@system_includes, $dir) if -d $dir;
+             }
+         }
+       close (DIRLIST);
      }
  }
  
diff --cc bootstrap
Simple merge
Simple merge
diff --cc m4/Makefile.in
Simple merge
index c3ea49abb9058b0622d9bae51fc3e3c75a9c4384,f01a6dda1bb6e3f933667898c4a85949bd2ebbd9..1814e43e61296e0634c1d904e8e8375912dc58c7
@@@ -130,7 -71,8 +130,9 @@@ acloca19.test 
  acloca20.test \
  acloca21.test \
  acloca22.test \
 +acloca23.test \
+ aclocal-acdir.test \
+ aclocal-print-acdir.test \
  acoutnoq.test \
  acoutpt.test \
  acoutpt2.test \
index d08323ea794202942e73797b4fad150b93849a44,eed1ef90c1982a06a19a3dc0026e0ce4f68480f7..98bdb5ab5b48f2c1625023170fcb360d489b16b4
@@@ -402,7 -349,8 +402,9 @@@ acloca19.test 
  acloca20.test \
  acloca21.test \
  acloca22.test \
 +acloca23.test \
+ aclocal-acdir.test \
+ aclocal-print-acdir.test \
  acoutnoq.test \
  acoutpt.test \
  acoutpt2.test \
index 0000000000000000000000000000000000000000,368416caf56b6390b91ef021f7d0c4f9eed981de..add1f6409e376f956e8aebd222be04c72bb6d2af
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,35 +1,35 @@@
 -test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir/acdir"
+ #! /bin/sh
+ # Copyright (C) 2011 Free Software Foundation, Inc.
+ #
+ # This program 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.
+ #
+ # This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+ # Test on aclocal's `--print-ac-dir' option.
+ . ./defs || Exit 1
+ set -e
+ $ACLOCAL --print-ac-dir
 -test "`$ACLOCAL --automake-acdir /bar --print-ac-dir`" = "$testaclocaldir/acdir"
++test "`$ACLOCAL --print-ac-dir`" = "$top_testsrcdir/m4"
+ $ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir
+ test "`$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir`" = foo
+ $ACLOCAL --system-acdir /bar --print-ac-dir
+ test "`$ACLOCAL --system-acdir /bar --print-ac-dir`" = /bar
+ $ACLOCAL --automake-acdir /bar --print-ac-dir
++test "`$ACLOCAL --automake-acdir /bar --print-ac-dir`" = "$top_testsrcdir/m4"
+ :
index 64b72e156b8bf8083c6b41ce367d970860d03b4c,439faa95fbf938ec66da91072616839f96fb342c..47c7dfa9f5cc980210b912101434f3e3ed39b16b
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
- # Test to make sure that aclocal --output works.  Report from
- # Alexandre Oliva.
+ # Test on some aclocal options.  Report from Alexandre Oliva.
  . ./defs || Exit 1
  
 -set -e
 -
  $ACLOCAL --output=fred
  test -f fred