automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch to aclocal


From: Richard Dawe
Subject: Re: Patch to aclocal
Date: Wed, 05 Mar 2003 13:41:56 +0000

Hello.

Philip Willoughby wrote:
[snip]
> I've built a script to set up the user's environment to include the latest
> versions of the packages they want, it modifies CPATH, PATH,
> LD_LIBRARY_PATH, MANPATH, INFOPATH and PKG_CONFIG_PATH to make sure
> everything works.  Unfortunately I couldn't find an env var to modify the
> search path for aclocal, so I patched it myself to add the support I
> wanted.
> 
> Here's the patch - I added 4 lines, 2 of which are comments, one of which
> is entirely self-serving ;-).  Can it be in 1.7.4?
> 
> diff -r -b -u -U 3 1.7.3/bin/aclocal 1.7.3-phil1/bin/aclocal
> --- 1.7.3/bin/aclocal   Thu Feb 20 19:55:32 2003
> +++ 1.7.3-phil1/bin/aclocal     Wed Mar  5 13:01:19 2003
> @@ -26,6 +26,7 @@
>  # 02111-1307, USA.
> 
>  # Written by Tom Tromey <address@hidden>.
> +# Slightly hacked on by Philip Willoughby <address@hidden>.
> 
>  BEGIN
>  {
> @@ -218,6 +219,9 @@
>         close (DEFAULT_DIRLIST);
>      }
> 
> +    # Allow the ACLOCALPATH environment variable to influence the search
> paths
> +    push (@dirlist, split (/:/, "$ENV{ACLOCALPATH}"))
> +       if defined ($ENV{ACLOCALPATH});
> 
>      return @dirlist;
>  }

Unfortunately this is not portable to DOS. If the patch in incorporated into
automake, it should be aware of the path separator. Maybe aclocal could have
something like this near the start:

$PATH_SEPARATOR = @PATH_SEPARATOR@;

Then modify bootstrap & Makefile.am to substitute @PATH_SEPARATOR@ like
@PACKAGE@, @SHELL@, etc. Then you could use:

    push (@dirlist, split (/$PATH_SEPARTOR/, $ENV{ACLOCALPATH}));

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]