[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Automake,cygiwn: installing automake outside of "normal" location
From: |
Charles Wilson |
Subject: |
Automake,cygiwn: installing automake outside of "normal" location |
Date: |
Fri, 03 May 2002 01:25:09 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 |
The following patch allows site-wide configuration, so that a specific
set of directories can always be searched by aclocal for m4 files --
rather than just its own $acdir, and without requiring -I flags.
For instance, on cygwin, we have:
/usr/autotool/devel/[bin,lib,share,include]
(contains autoconf-2.53, automake-1.6, libtoolCVS)
/usr/autotool/stable/[bin,lib,share,include]
(contains autoconf-2.13, automake-1.4p5, libtool-1.4.2)
In /usr/bin, we have wrapper scripts to intelligently select which
"tree" to use. However, unless you pass '-I/usr/share/aclocal' EVERY
time you call aclocal, you'll miss the .m4 scripts that are installed by
other packages into the "standard location" of /usr/share/aclocal/.
The following patch allows a distribution packager or site manager to
add a 'dirlist' file into automake's $acdir. That dirlist file contains
a list of directories, one per line. So, in our case:
/usr/autotool/devel/share/aclocal-1.6/dirlist
contains simply
/usr/share/aclocal/
which is where gettext and pkgconfig etc put their m4 files. This way,
the "development" aclocal will look in both
/usr/autotool/devel/share/aclocal-1.6/ and /usr/share/aclocal for .m4
files -- without requiring an explicit -I at every invocation.
If the dirlist file does not exist or is empty, behavior is unchanged
from the present.
Naturally, we use a similar patch for our automake-1.4p5 installation in
/usr/autotool/stable/* However, I believe this patch could be
beneficial in other environments, as well.
--Chuck
2002-05-03 Charles Wilson <address@hidden>
* aclocal.in: specify a list of directories to search
with a configuration file in $acdir-$APIVERSION.
diff -urN -x .build -x .inst -x .sinst automake-1.6.1-orig/aclocal.in
automake-1.6.1/aclocal.in
--- automake-1.6.1-orig/aclocal.in Fri Feb 1 15:40:48 2002
+++ automake-1.6.1/aclocal.in Thu May 2 02:25:23 2002
@@ -46,6 +46,10 @@
# Note also that the versioned directory is handled later.
$acdir = "@datadir@/aclocal";
$default_acdir = $acdir;
+# contains a list of directories, one per line, to be added
+# to the dirlist in addition to $acdir, as if -I had been
+# added to the command line.
+$default_dirlist = "$acdir-$APIVERSION/dirlist";
# Some globals.
@@ -213,6 +217,23 @@
{
print $acdir, "\n";
exit 0;
+ }
+
+ if( open (DEFAULT_DIRLIST, $default_dirlist) )
+ {
+ while(<DEFAULT_DIRLIST>)
+ {
+ # Ignore '#' lines.
+ next if /^#/;
+ # strip off newlines and end-of-line comments
+ s/\s*\#.*$//;
+ chomp($contents=$_);
+ if ( -d $contents )
+ {
+ push (@dirlist, $contents);
+ }
+ }
+ close (DEFAULT_DIRLIST);
}
# Search the versioned directory near the end, and then the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Automake,cygiwn: installing automake outside of "normal" location,
Charles Wilson <=