[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 19:44:02 UTC 2016


Vid Fre, 18 Mar 2016 kl. 19.10.42, skrev rainer.jung at kippdata.de:
> Your suggested fix would mean on platforms without "-nt" we would
> always
> rebuild and that's in fact what I observed (make test rebuilds a lot
> of
> object files) whereas the "find" variant should work on all platforms
> and only adds the dependencies that are newer than the Makefile. If
> you
> want to add all dependencies even if only one is newer than the
> Makefile, a "find" based solution would be:
>
> depend:
> @:
> @if [ "X`find $(DEPS) -newer Makefile`" != "X" ]; then \
> ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
> echo '# DO NOT DELETE THIS LINE -- make depend depends
> on
> it.'; \
> echo; \
> for d in $(DEPS); do \
> if [ -f $$d ]; then cat $$d; fi; \
> done ) > Makefile.new; \
> if cmp Makefile.new Makefile >/dev/null 2>&1; then \
> rm -f Makefile.new; \
> else \
> mv -f Makefile.new Makefile; \
> fi; \
> fi
> @:

This, I like. Makes total sense. Thank you.

> One final suggestion: if the final solution will still contain a "for
> d
> in ..." loop, you might want to rename the loop variable from d to
> something else, like e.g. "f". Why? It took me quite some time to
> understand why
>
> sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile;
>
> works although the variable "d" was only defined below that line. Only
> later I noticed, that here the "$$d" has a totally different meaning
> than $$d in the loop (",$$" resolves to ",$" meaning until end of file
> and "d" is the sed delete command). So my confusion was triggered by
> seeing "$$d" in two places close to each other but having totally
> different meaning. If there were no variable "d" IMHO it might become
> a
> bit more understandable.

Yeah, ok, I can see that confusion. Will do.

> BTW: I do like the new build system :)

Thank you :-)

--
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