[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

Richard Levitte via RT rt at openssl.org
Fri Mar 18 18:33:45 UTC 2016


Vid Fre, 18 Mar 2016 kl. 18.07.31, skrev rainer.jung at kippdata.de:
> Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:
> > Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.jung at kippdata.de:
> >> I had the same problem. /bin/sh on Solaris does not understand the
> >> "-
> >> nt"
> >> operator used in the definition of the "depend" target in the top-
> >> level
> >> Makefile, e.g. in line
> >>
> >> if [ Makefile -nt Makefile ] ...
> >
> > That can't be the cause, because whatever the exit code from the test
> > is, it's
> > "swallowed" by 'if'. A little like this is:
>
> If it were syntactically correct, but it isn't.

You'll have to explain that to me. I just had a look here:
https://docs.oracle.com/cd/E26502_01/html/E29030/sh-1.html:


>>> if list ; then list elif list ; then list ; ] . . . [ else list ; ] fi

>>> The list following if is executed and, if it returns a zero exit status,
the list following the first then is executed. Otherwise, the list following
elif is executed and, if its value is zero, the list following the next then is
executed. Failing that, the else list is executed. If no else list or then list
is executed, then the if command returns a zero exit status.

> I added the "set -ex" and:
>
> % make depend
> catdepends=false
> + [ Makefile -nt Makefile ]
> Makefile:172: recipe for target 'depend' failed
> make: *** [depend] Error 1

Would the following make a difference?

if ( [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ] ); then

or perhaps using 'test' instead of '[' (and removing the ']' in that case, of
course)?

> or - since there's no more real need for the catdepends variable

That's an incorrect assumption. 'depend' is run as part of the larger targets,
and on some slower systems, having the same file copying happening every time
is quite time consuming. Checking if there's a need for all the data copying at
all first takes down the time for the cases when the .d files haven't been
updated since last time.

Cheers,
Richard

--
Richard Levitte
levitte at openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4444
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list