This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to aclocal


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 <tromey at redhat dot com>.
> +# Slightly hacked on by Philip Willoughby <pgw99 at doc dot ic dot ac dot uk>.
> 
>  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/ ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]