|
From: | Paolo Bonzini |
Subject: | Re: [PATCH] aclocal: handle ACLOCAL_PATH environment variable |
Date: | Wed, 03 Nov 2010 16:46:20 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6 |
On 11/03/2010 04:24 PM, Stefano Lattarini wrote:
+ # Add any directory listed in the `ACLOCAL_PATH' environment + # variable. + if (defined $ENV{"ACLOCAL_PATH"}) + { + foreach my $dir (split /:/, $ENV{"ACLOCAL_PATH"})Shouldn't we use address@hidden@' here instead of `:', for better portability to windows?
Yes, I think so.
+ { + push (@system_includes, $dir) if $dir ne ''&& -d $dir;Hmmm... IMHO the right place where to add directories from `ACLOCAL_PATH' is address@hidden', not address@hidden'. Also, the testcase should verify that extra directories from `-I' command line options take precedence over the ones from `ACLOCAL_PATH', and that these latter ones take precedence over the extra directories from system includes.
This is true (and, I think, handled by pushing at the end of @system_includes).
On the other hand, I considered @user_includes as "per-package includes" and @system_includes as "installation-wide includes" (albeit per account), which means ACLOCAL_PATH would count as a system include directory.
I've attached two tentative testcases checking for the behaviour I'd like to see from ACLOCAL_PATH. But as an afterthought, I see that installing third party macros in directories provided by `ACLOCAL_PATH' when the `--install' option is used is probably a bad idea. Any idea about what the best way to address this would be?
Keep it into @system_includes? :) Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |