RFR: 8031669: (xs) Allow override of "simple required tools" in basics.m4

Mike Duigou mike.duigou at oracle.com
Fri Jan 17 01:20:33 UTC 2014


On Jan 15 2014, at 00:48 , Erik Joelsson <erik.joelsson at oracle.com> wrote:

> 
> On 2014-01-14 20:59, Mike Duigou wrote:
>> On Jan 14 2014, at 10:35 , Mike Duigou <mike.duigou at oracle.com> wrote:
>> 
>> I discovered the problem.
>> 
>> CAT=foo sh configure
>> 
>> will result in
>> 
>> CAT=/usr/bin/cat
>> 
>> (the default) whereas
>> 
>> CAT=/usr/bin/foo sh configure
>> 
>> will result in
>> 
>> CAT=/usr/bin/foo
>> 
>> (overridden) The value for CAT has to be an absolute path and not merely the name of something on the path. I'm now using
>> 
>> CAT=`which foo`
>> 
>> (overridden to /usr/bin/foo) and that seems to work fine.
>> 
>> Mike
>> 
> Ah, that makes sense, but it's also annoying. I would expect CAT=foo to work if I didn't know better. It's good to know of the workaround though.
> 
> Would it make sense to enable CAT=foo to work for (almost) all tools by changing BASIC_REQUIRE_PROG to the following?
> 
> AC_DEFUN([BASIC_REQUIRE_PROG],
> [
>  AC_PATH_PROG($1, [$1 $2])
>   BASIC_CHECK_NONEMPTY($1, $2)
> ])

Seems reasonable but it would need to call AC_PATH_PROGS as AC_PATH_PROG doesn't allow for alternatives.

Mike

PS.- Review is still needed for http://cr.openjdk.java.net/~mduigou/JDK-8031669/1/webrev/





More information about the build-dev mailing list