[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-963-
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-963-geae5429 |
Date: |
Thu, 08 Sep 2011 15:48:53 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=eae542988e2cf151abd296864ee12dfee9c74c6d
The branch, master has been updated
via eae542988e2cf151abd296864ee12dfee9c74c6d (commit)
via 30f99cbd07736c96603d15346fc8ad9097a0dddd (commit)
from e1177186ff44b11d6c14d74637bb2564b84151d0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eae542988e2cf151abd296864ee12dfee9c74c6d
Merge: e117718 30f99cb
Author: Stefano Lattarini <address@hidden>
Date: Thu Sep 8 17:12:38 2011 +0200
Merge branch 'maint'
* maint:
aclocal: more granularity in acdir overriding
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 39 +++++++++
NEWS | 8 ++
aclocal.in | 74 ++++++++--------
bootstrap | 4 +-
doc/automake.texi | 58 +++++++------
m4/Makefile.am | 12 ++-
m4/Makefile.in | 84 ++++++++++++------
m4/{ => acdir}/dirlist | 0
tests/Makefile.am | 2 +
tests/Makefile.in | 2 +
tests/aclocal-acdir.test | 91 ++++++++++++++++++++
...s_environment.test => aclocal-print-acdir.test} | 30 ++-----
tests/aclocal.in | 6 +-
tests/aclocal.test | 6 +-
14 files changed, 290 insertions(+), 126 deletions(-)
rename m4/{ => acdir}/dirlist (100%)
create mode 100755 tests/aclocal-acdir.test
copy tests/{check-tests_environment.test => aclocal-print-acdir.test} (60%)
diff --git a/ChangeLog b/ChangeLog
index 54d7554..0152bfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,44 @@
2011-09-06 Stefano Lattarini <address@hidden>
+ 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 <address@hidden>
+
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
diff --git a/NEWS b/NEWS
index 9e391c9..60b89d5 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,14 @@ New in 1.11a:
- 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.
diff --git a/aclocal.in b/aclocal.in
index 394aeae..02963ee 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -54,9 +54,11 @@ $perl_threads = 0;
# Include paths for searching macros. We search macros in this order:
# user-supplied directories first, then the directory containing the
# automake macros, and finally the system-wide directories for
-# third-party macro. @user_includes can be augmented with -I.
-# @system_includes can be augmented with the `dirlist' file. Also
-# --acdir will reset both @automake_includes and @system_includes.
+# third-party macros.
+# @user_includes can be augmented with -I.
+# @automake_includes can be reset with the `--automake-acdir' option.
+# @system_includes can be augmented with the `dirlist' file, and reset
+# with the `--system-acdir' option.
my @user_includes = ();
my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
my @system_includes = ('@datadir@/aclocal');
@@ -876,7 +878,8 @@ 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)
--dry-run pretend to, but do not actually update any file
@@ -885,7 +888,8 @@ Options:
-I DIR add directory to search list for .m4 files
--install copy third-party files to the first -I directory
--output=FILE put output in FILE (default aclocal.m4)
- --print-ac-dir print name of directory holding m4 files, then exit
+ --print-ac-dir print name of directory holding system-wide
+ third-party m4 files, then exit
--verbose don't be silent
--version print version number, then exit
-W, --warnings=CATEGORY report the warnings falling in CATEGORY
@@ -922,6 +926,15 @@ EOF
exit 0;
}
+# Using --acdir overrides both the automake (versioned) directory and
+# the public (unversioned) system directory. This usage is obsolete.
+sub handle_acdir_option ($$)
+{
+ msg 'obsolete', '', "`--acdir' is deprecated\n";
+ @system_includes = ($_[1]);
+ @automake_includes = ();
+}
+
# Parse command line.
sub parse_arguments ()
{
@@ -930,12 +943,9 @@ sub parse_arguments ()
my %cli_options =
(
- 'acdir=s' => sub # Setting --acdir overrides both the
- { # automake (versioned) directory and the
- # public (unversioned) system directory.
- @automake_includes = ();
- @system_includes = ($_[1])
- },
+ 'acdir=s' => \&handle_acdir_option,
+ 'system-acdir=s' => sub { shift; @system_includes = @_; },
+ 'automake-acdir=s' => sub { shift; @automake_includes = @_; },
'diff:s' => \$diff_command,
'dry-run' => \$dry_run,
'force' => \$force_output,
@@ -1016,34 +1026,22 @@ sub parse_arguments ()
. "\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 --git a/bootstrap b/bootstrap
index 41f1f4e..3a6b9aa 100755
--- a/bootstrap
+++ b/bootstrap
@@ -110,7 +110,9 @@ $BOOTSTRAP_SHELL ./instspc-tests.sh --generate-makefile >
instspc-tests.am
cd ..
# Run the autotools.
-$PERL ./aclocal.tmp -I m4
+# Use `-I' here so that our own *.m4 files in m4/ gets included,
+# not copied, in aclocal.m4.
+$PERL ./aclocal.tmp -I m4 --automake-acdir m4 --system-acdir m4/acdir
$AUTOCONF
$PERL ./automake.tmp
diff --git a/doc/automake.texi b/doc/automake.texi
index ec7d409..2f81c10 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -3189,10 +3189,21 @@ overridden using the @env{AUTOM4TE} environment
variable.
@command{aclocal} accepts the following options:
@table @code
address@hidden address@hidden
address@hidden --automake-acdir
+Look for the automake-provided macro files in @var{dir} instead of
+in the installation directory. This is typically used for debugging.
+
address@hidden address@hidden
address@hidden --system-acdir
+Look for the system-wide third-party macro files (and the special
address@hidden file) in @var{dir} instead of in the installation
+directory. This is typically used for debugging.
+
@item address@hidden
@opindex --acdir
-Look for the macro files in @var{dir} instead of the installation
-directory. This is typically used for debugging.
address@hidden shorthand for address@hidden@var{dir}
address@hidden''. Will be removed in future aclocal versions.
@item address@hidden
@opindex --diff
@@ -3297,7 +3308,7 @@ directories, in this order:
@item @var{acdir-APIVERSION}
This is where the @file{.m4} macros distributed with Automake itself
are stored. @var{APIVERSION} depends on the Automake release used;
-for Automake 1.6.x, @var{APIVERSION} = @code{1.6}.
+for example, for Automake 1.11.x, @var{APIVERSION} = @code{1.11}.
@item @var{acdir}
This directory is intended for third party @file{.m4} files, and is
@@ -3308,31 +3319,24 @@ value of @var{acdir}, use the @option{--print-ac-dir}
option
(@pxref{aclocal Options}).
@end table
-As an example, suppose that @command{automake-1.6.2} was configured with
+As an example, suppose that @command{automake-1.11.2} was configured with
@address@hidden/usr/local}. Then, the search path would be:
@enumerate
address@hidden @file{/usr/local/share/aclocal-1.6/}
address@hidden @file{/usr/local/share/aclocal-1.11.2/}
@item @file{/usr/local/share/aclocal/}
@end enumerate
+The paths for the @var{acdir} and @var{acdir-APIVERSION} directories can
+be changed respectively through aclocal options @option{--system-acdir}
+and @option{--automake-acdir} (@pxref{aclocal Options}). Note however
+that these options are only intended for use by the internal Automake
+test suite, or for debugging under highly unusual situations; they are
+not ordinarily needed by end-users.
+
As explained in (@pxref{aclocal Options}), there are several options that
can be used to change or extend this search path.
address@hidden Modifying the Macro Search Path: @option{--acdir}
-
-The most erroneous option to modify the search path is
address@hidden@var{dir}}, which changes default directory and
-drops the @var{APIVERSION} directory. For example, if one specifies
address@hidden/opt/private/}, then the search path becomes:
-
address@hidden
address@hidden @file{/opt/private/}
address@hidden enumerate
-
-This option, @option{--acdir}, is intended for use by the internal
-Automake test suite only; it is not ordinarily needed by end-users.
-
@subsubheading Modifying the Macro Search Path: @samp{-I @var{dir}}
Any extra directories specified using @option{-I} options
@@ -3382,21 +3386,19 @@ Then, the search path would be
@noindent
and all directories with path names starting with @code{/test3}.
-If the @address@hidden option is used, then @command{aclocal}
-will search for the @file{dirlist} file in @var{dir}. In the
address@hidden/opt/private/} example above, @command{aclocal} would look
-for @file{/opt/private/dirlist}. Again, however, the @option{--acdir}
-option is intended for use by the internal Automake test suite only;
address@hidden is not ordinarily needed by end-users.
+If the @address@hidden option is used, then
address@hidden will search for the @file{dirlist} file in
address@hidden; but remember the warnings above against the use of
address@hidden
@file{dirlist} is useful in the following situation: suppose that
address@hidden version @code{1.6.2} is installed with
address@hidden version @code{1.11.2} is installed with
@samp{--prefix=/usr} by the system vendor. Thus, the default search
directories are
@c @code looks better than @file here
@enumerate
address@hidden @code{/usr/share/aclocal-1.6/}
address@hidden @code{/usr/share/aclocal-1.11/}
@item @code{/usr/share/aclocal/}
@end enumerate
@@ -3417,7 +3419,7 @@ Now, the ``default'' search path on the affected system is
@c @code looks better than @file here
@enumerate
address@hidden @code{/usr/share/aclocal-1.6/}
address@hidden @code{/usr/share/aclocal-1.11/}
@item @code{/usr/share/aclocal/}
@item @code{/usr/local/share/aclocal/}
@end enumerate
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 0cf074b..143df71 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -3,7 +3,7 @@
## Makefile for Automake m4.
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 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
@@ -18,9 +18,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-m4datadir = $(datadir)/aclocal-$(APIVERSION)
+automake_acdir = $(datadir)/aclocal-$(APIVERSION)
+system_acdir = $(datadir)/aclocal
-dist_m4data_DATA = \
+dist_automake_ac_DATA = \
$(top_srcdir)/m4/amversion.m4 \
as.m4 \
auxdir.m4 \
@@ -59,7 +60,10 @@ tar.m4 \
upc.m4 \
vala.m4
-EXTRA_DIST = dirlist amversion.in
+# So that $(system_acdir) will be created by "make install".
+dist_system_ac_DATA =
+
+EXTRA_DIST = acdir/dirlist amversion.in
# We build amversion.m4 here, instead of from config.status,
# because config.status is rerun each time one of configure's
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 679930b..2afbd73 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -16,7 +16,7 @@
@SET_MAKE@
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 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
@@ -50,8 +50,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
subdir = m4
-DIST_COMMON = $(dist_m4data_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(dist_automake_ac_DATA) $(dist_system_ac_DATA) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -95,8 +95,9 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(m4datadir)"
-DATA = $(dist_m4data_DATA)
+am__installdirs = "$(DESTDIR)$(automake_acdir)" \
+ "$(DESTDIR)$(system_acdir)"
+DATA = $(dist_automake_ac_DATA) $(dist_system_ac_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -192,8 +193,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-m4datadir = $(datadir)/aclocal-$(APIVERSION)
-dist_m4data_DATA = \
+automake_acdir = $(datadir)/aclocal-$(APIVERSION)
+system_acdir = $(datadir)/aclocal
+dist_automake_ac_DATA = \
$(top_srcdir)/m4/amversion.m4 \
as.m4 \
auxdir.m4 \
@@ -232,7 +234,10 @@ tar.m4 \
upc.m4 \
vala.m4
-EXTRA_DIST = dirlist amversion.in
+
+# So that $(system_acdir) will be created by "make install".
+dist_system_ac_DATA =
+EXTRA_DIST = acdir/dirlist amversion.in
all: all-am
.SUFFIXES:
@@ -266,26 +271,46 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-install-dist_m4dataDATA: $(dist_m4data_DATA)
+install-dist_automake_acDATA: $(dist_automake_ac_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(automake_acdir)" || $(MKDIR_P) "$(DESTDIR)$(automake_acdir)"
+ @list='$(dist_automake_ac_DATA)'; test -n "$(automake_acdir)" || list=;
\
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(automake_acdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(automake_acdir)" || exit $$?; \
+ done
+
+uninstall-dist_automake_acDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_automake_ac_DATA)'; test -n "$(automake_acdir)" || list=;
\
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(automake_acdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(automake_acdir)" && rm -f $$files
+install-dist_system_acDATA: $(dist_system_ac_DATA)
@$(NORMAL_INSTALL)
- test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
- @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+ test -z "$(system_acdir)" || $(MKDIR_P) "$(DESTDIR)$(system_acdir)"
+ @list='$(dist_system_ac_DATA)'; test -n "$(system_acdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(system_acdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(system_acdir)" || exit $$?; \
done
-uninstall-dist_m4dataDATA:
+uninstall-dist_system_acDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+ @list='$(dist_system_ac_DATA)'; test -n "$(system_acdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(m4datadir)" && rm -f $$files
+ echo " ( cd '$(DESTDIR)$(system_acdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(system_acdir)" && rm -f $$files
tags: TAGS
TAGS:
@@ -329,7 +354,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(m4datadir)"; do \
+ for dir in "$(DESTDIR)$(automake_acdir)" "$(DESTDIR)$(system_acdir)";
do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -382,7 +407,8 @@ info: info-am
info-am:
-install-data-am: install-dist_m4dataDATA
+install-data-am: install-dist_automake_acDATA \
+ install-dist_system_acDATA
install-dvi: install-dvi-am
@@ -426,21 +452,23 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-dist_m4dataDATA
+uninstall-am: uninstall-dist_automake_acDATA \
+ uninstall-dist_system_acDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
- install-dist_m4dataDATA install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am uninstall uninstall-am \
- uninstall-dist_m4dataDATA
+ install-dist_automake_acDATA install-dist_system_acDATA \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+ uninstall-am uninstall-dist_automake_acDATA \
+ uninstall-dist_system_acDATA
# We build amversion.m4 here, instead of from config.status,
diff --git a/m4/dirlist b/m4/acdir/dirlist
similarity index 100%
rename from m4/dirlist
rename to m4/acdir/dirlist
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c3ea49a..1814e43 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -131,6 +131,8 @@ acloca20.test \
acloca21.test \
acloca22.test \
acloca23.test \
+aclocal-acdir.test \
+aclocal-print-acdir.test \
acoutnoq.test \
acoutpt.test \
acoutpt2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d08323e..98bdb5a 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -403,6 +403,8 @@ acloca20.test \
acloca21.test \
acloca22.test \
acloca23.test \
+aclocal-acdir.test \
+aclocal-print-acdir.test \
acoutnoq.test \
acoutpt.test \
acoutpt2.test \
diff --git a/tests/aclocal-acdir.test b/tests/aclocal-acdir.test
new file mode 100755
index 0000000..c5cc992
--- /dev/null
+++ b/tests/aclocal-acdir.test
@@ -0,0 +1,91 @@
+#! /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 aclocal's `--acdir', `--automake-acdir' and `--system-acdir'
+# options. Also check that stuff in the automake acdir takes precedence
+# over stuff in the system acdir.
+
+. ./defs || Exit 1
+
+set -e
+
+mkdir am sys
+
+cat >> configure.in <<'END'
+MY_MACRO
+END
+
+cat > am/foo.m4 <<'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [fake--init--automake])
+END
+
+cat > sys/foo.m4 <<'END'
+AC_DEFUN([MY_MACRO], [my--macro])
+END
+
+$ACLOCAL --automake-acdir am
+$AUTOCONF
+$FGREP 'fake--init--automake' configure
+$FGREP 'MY_MACRO' configure
+
+rm -rf autom4te*.cache
+
+$ACLOCAL --system-acdir sys
+$AUTOCONF
+$FGREP 'am__api_version' configure
+$FGREP 'my--macro' configure
+
+rm -rf autom4te*.cache
+
+$ACLOCAL --automake-acdir am --system-acdir sys
+$AUTOCONF
+$FGREP 'fake--init--automake' configure
+$FGREP 'my--macro' configure
+
+rm -rf autom4te*.cache
+
+$ACLOCAL --system-acdir sys --automake-acdir am
+$AUTOCONF
+$FGREP 'fake--init--automake' configure
+$FGREP 'my--macro' configure
+
+rm -rf autom4te*.cache
+
+# Stuff in automake acdir takes precedence over stuff in system acdir.
+cat > am/bar.m4 <<'END'
+AC_DEFUN([MY_MACRO], [am--macro])
+END
+$ACLOCAL --automake-acdir am --system-acdir sys
+$AUTOCONF
+$FGREP 'fake--init--automake' configure
+$FGREP 'am--macro' configure
+$FGREP 'my--macro' configure && Exit 1 # Just to be sure.
+
+# Obsolescent `--acdir' option.
+$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '.*--acdir.*deprecated' stderr
+
+$ACLOCAL -Wno-obsolete --acdir am
+$AUTOCONF
+$FGREP 'fake--init--automake' configure
+$FGREP 'am--macro' configure
+
+$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'macro .*AM_INIT_AUTOMAKE.* not found' stderr
+
+:
diff --git a/tests/check-tests_environment.test b/tests/aclocal-print-acdir.test
similarity index 60%
copy from tests/check-tests_environment.test
copy to tests/aclocal-print-acdir.test
index e3dc76a..add1f64 100755
--- a/tests/check-tests_environment.test
+++ b/tests/aclocal-print-acdir.test
@@ -14,32 +14,22 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
+# Test on aclocal's `--print-ac-dir' option.
. ./defs || Exit 1
-cat >> configure.in << 'END'
-AC_OUTPUT
-END
+set -e
-cat > Makefile.am << 'END'
-TESTS = foo.test
-EXTRA_DIST = $(TESTS)
-END
+$ACLOCAL --print-ac-dir
+test "`$ACLOCAL --print-ac-dir`" = "$top_testsrcdir/m4"
-cat > foo.test << 'END'
-#! /bin/sh
-test x"$FOO" = x"ok"
-END
-chmod a+x foo.test
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir
+test "`$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir`" = foo
-./configure
+$ACLOCAL --system-acdir /bar --print-ac-dir
+test "`$ACLOCAL --system-acdir /bar --print-ac-dir`" = /bar
-FOO=bad TESTS_ENVIRONMENT='FOO=ok' $MAKE check
-FOO=ok TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
+$ACLOCAL --automake-acdir /bar --print-ac-dir
+test "`$ACLOCAL --automake-acdir /bar --print-ac-dir`" = "$top_testsrcdir/m4"
:
diff --git a/tests/aclocal.in b/tests/aclocal.in
index f8aa1a7..5326ad0 100644
--- a/tests/aclocal.in
+++ b/tests/aclocal.in
@@ -12,6 +12,6 @@ fi
perllibdir="@abs_top_builddir@/address@hidden@@abs_top_srcdir@/lib"
export perllibdir
-# Most of the files are in $srcdir/../m4. However amversion.m4 is
-# generated in ../m4, so we include that directory in the search path too.
-exec "@abs_top_builddir@/aclocal" "address@hidden@/m4" ${1+"$@"}
+
+exec "@abs_top_builddir@/aclocal" "address@hidden@/m4" \
+ "address@hidden@/m4/acdir" ${1+"$@"}
diff --git a/tests/aclocal.test b/tests/aclocal.test
index 64b72e1..47c7dfa 100755
--- a/tests/aclocal.test
+++ b/tests/aclocal.test
@@ -15,8 +15,8 @@
# 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
$ACLOCAL --output=fred
@@ -39,6 +39,4 @@ grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --versi
-test x"`$ACLOCAL --print-ac-dir`" = x"$top_testsrcdir/m4"
-
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-963-geae5429,
Stefano Lattarini <=