[openssl-dev] make depend issue: if [ Makefile -nt Makefile ]

Richard Levitte levitte at openssl.org
Tue Mar 8 21:01:36 UTC 2016

I suggest reading the comment just above depend:, especially this:

    # To check if test has the file age comparison operator, we
    # simply try, and rely test to exit with 0 if the comparison
    # was true, 1 if false, and most importantly, 2 if it doesn't
    # recognise the operator.

Comparing Makefile with Makefile is because...  well, it's as good a
file as any, and since the result from the operation itself isn't the
important part on that line, a bit of Makefile narcissism can't hurt


In message <1B05C047-CB6D-4082-8C8F-B5820D22AC46 at akamai.com> on Tue, 8 Mar 2016 20:57:07 +0000, "Short, Todd" <tshort at akamai.com> said:

tshort> Hi,
tshort> I noticed the following oddity in commit f8d9d6e:
tshort> depend:
tshort> @catdepends=false; \
tshort> if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ]; then \
tshort> I’m not sure of the intent or the fix, but it doesn’t seem right to
tshort> compare the timestamp of a file to itself.
tshort> --
tshort> -Todd Short
tshort> // tshort at akamai.com
tshort> // "One if by land, two if by sea, three if by the Internet."

More information about the openssl-dev mailing list