Re: [PATCH 2/5] configure, test: Added variables for paths to true and false.

Subject: Re: [PATCH 2/5] configure, test: Added variables for paths to true and false.

Date: Thu, 08 May 2014 11:00:07 -0400

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Charles Celerier


David Bremner <david@tethera.net> writes:

> Charles Celerier <cceleri@cs.stanford.edu> writes:
>
>> The path to true may not be the same on all platforms (e.g. on Mac OS X
>> it is /usr/bin/true), so the hard-coded path of /bin/true is not
>> portable. This is resolved by adding a step to the configure script to
>> locate the path of true and to use the TRUE variable wherever /bin/true
>> was needed. The same was done for false.
>
> Does this really need a configure script variable? It seems like
> overkill.

I will be the first too admit that I do not know much about configure
scripts, but adding a TRUE variable seemed straightforward. The problem
is that you want to make softlinks for test/have-man and
test/have-compact for how they are used in tests T010-help-test and
T020-compact; making softlinks requires full paths. You could use
`$(which true)` in test/Makefile.local, but I felt the code repetition
there was unecessary since you could just create a TRUE variable in the
configure script. An alternative is to change the tests so that the
location of true (and false) is no longer an issue.

chuck
part-000.sig (application/pgp-signature)

Thread: