DESTDIR support is broken (patch)
oneingray at gmail.com
Fri Jun 6 07:40:35 UTC 2008
>>>>> Julien ÉLIE <julien at trigofacile.com> writes:
>>> + if [ -r $D$(MAN5)/../man8 ] ; then \
>> I'd rather use [ $D$(MAN5)/../man8 -ef $D$(MAN8) ] here, but
>> unfortunately `-ef' isn't required by POSIX.
>> Also, it might be something like:
>> if [ $(dir $(MAN5))/$(notdir $(MAN8)) = $(MAN8) ] ; then ...
>> though I don't know whether these Make functions are portable.
> Well, I can do:
> if [ "$D$(MAN5)/../man8" = "$D$(MAN8)" ] && [ -d $D$(MAN5)/../man8 ] ; then \
> It will be like your suggested "-ef"
But it won't! The `-ef' operator tests whether the strings
/name/ the same file. On the other hand, the `=' operator tests
whether the /strings/ are the same, and it doesn't consider any
filesystem objects at all. Consider, e. g.:
test /usr/share -ef /usr/share # => TRUE
test /usr/share = /usr/share # => TRUE
test /usr/share/.. -ef /usr # => TRUE (most probably)
test /usr/share/.. = /usr # => FALSE
(Assuming that both /usr and /usr/share name existing
directories and /usr/share isn't a symbolic link.)
There's an example ``mirroring'' the last one:
test /foo/bar/baz -ef /foo/bar/baz # => FALSE (most probably)
test /foo/bar/baz = /foo/bar/baz # => TRUE
(Assuming that /foo/bar/baz name no existing file.)
> (less efficient but still).
More information about the inn-workers