summaryrefslogtreecommitdiff
path: root/aclocal.in
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-09-08 17:12:38 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-09-08 17:14:26 +0200
commiteae542988e2cf151abd296864ee12dfee9c74c6d (patch)
tree8efed982d1468d9dcf00c48eca3c5d1ea135505b /aclocal.in
parente1177186ff44b11d6c14d74637bb2564b84151d0 (diff)
parent30f99cbd07736c96603d15346fc8ad9097a0dddd (diff)
downloadautomake-eae542988e2cf151abd296864ee12dfee9c74c6d.tar.gz
Merge branch 'maint'
* maint: aclocal: more granularity in acdir overriding
Diffstat (limited to 'aclocal.in')
-rw-r--r--aclocal.in74
1 files changed, 36 insertions, 38 deletions
diff --git a/aclocal.in b/aclocal.in
index 394aeaec0..02963eec6 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);
}
}