added --print-ac-dir to aclocal
authorTom Tromey <tromey@redhat.com>
Mon, 23 Mar 1998 16:14:25 +0000 (16:14 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 23 Mar 1998 16:14:25 +0000 (16:14 +0000)
ChangeLog
aclocal.in
automake.texi
stamp-vti
version.texi

index 325ffca..ca61199 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 Mon Mar 23 07:55:04 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * aclocal.in (usage): Document --print-ac-dir.
+       (parse_arguments): Added --print-ac-dir.
+
        * ansi2knr.c, ansi2knr.1: New versions from ghostscript.
        (main): Reapplied "-" change from Harlan Stenn.
 
index aeda622..a53fb69 100644 (file)
@@ -122,6 +122,7 @@ sub usage
   --help                print this help, then exit
   -I DIR                add directory to search list for .m4 files
   --output=FILE         put output in FILE (default aclocal.m4)
+  --print-ac-dir        print name of directory holding m4 files
   --verbose             don't be silent
   --version             print version number, then exit
 
@@ -135,6 +136,7 @@ sub parse_arguments
 {
     local (@arglist) = @_;
     local (@dirlist);
+    local ($print_and_exit) = 0;
 
     while (@arglist)
     {
@@ -151,6 +153,10 @@ sub parse_arguments
            shift (@arglist);
            push (@dirlist, $arglist[0]);
        }
+       elsif ($arglist[0] eq '--print-ac-dir')
+       {
+           $print_and_exit = 1;
+       }
        elsif ($arglist[0] eq '--verbose')
        {
            ++$verbosity;
@@ -176,6 +182,12 @@ sub parse_arguments
        shift (@arglist);
     }
 
+    if ($print_and_exit)
+    {
+       print $acdir, "\n";
+       exit 0;
+    }
+
     return @dirlist;
 }
 
index 30d1e18..3c91ee8 100644 (file)
@@ -1064,6 +1064,12 @@ Add the directory @var{dir} to the list of directories searched for
 @item --output=@var{file}
 Cause the output to be put into @var{file} instead of @file{aclocal.m4}.
 
+@item --print-ac-dir
+Prints the name of the directory which @code{aclocal} will search to
+find the @samp{m4} files.  When this option is given, normal processing
+is suppressed.  This option can be used by a package to determine where
+to install a macro file.
+
 @item --verbose
 Print the names of the files it examines.
 
index e93b213..5422d2c 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,3 +1,3 @@
-@set UPDATED 20 March 1998
+@set UPDATED 23 March 1998
 @set EDITION 1.2g
 @set VERSION 1.2g
index e93b213..5422d2c 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 20 March 1998
+@set UPDATED 23 March 1998
 @set EDITION 1.2g
 @set VERSION 1.2g