and target (and rely upon a non-zero exit value to indicate a missing file),
instead instead of unconditionally installing the link.
SYMLINKS: use stat -qf '%Y' $l to read a symlink's target (and rely upon
a non-zero exit value to indicate a missing file or non-symlink),
instead of test -h $l && ls -ld $l | awk '{print $NF}' , since
the former is quicker and more concise.
This resolves PR toolchain/16885 from David Laight.
as they default to using install(1) -r.
the rm can cause problems in certain situations, such as moving a library or
shared linker that install(1) depends upon to another location and replacing
it with a (sym)link.
Sources for a target do not accumulate over dependency lines
when this operator is used.
An unstated implication of this is that when parallel builds are done,
each separate instance of the target can be scheduled independantly.
As a result, the linksinstall target with commands could be executed
too early during a parallel build since they didn't actually have a
dependancy on "realinstall".
To fix this, correct the linksinstall:: realinstall dependancy by
eliminating the command-less linksinstall target, and moving the
dependancy to the other linksinstall target.
descriptive comments. The guts of hostprog, lib, and prog are mostly
unchanged; this will be done in another pass.
Make several things work properly with UNPRIVILEGED set, and make the
install-time "cmp" logic work for MANZ. Also reimplement INCS{DIR,NAME}_foo
(requested by wiz) in a backwards compatible way.
Reviewed by christos.
-put "echo"s for the daughter Makefile into a subshell to get them all
into the Makefile (instead of stdout - should fix PR misc/9336 by
Bernd Ernesti)
-change operator for "realall" back to ":" - rules are supposed to
accumulate, and "::" clashes with the definition in <bsd.own.mk>
-call sub-make with the "all" target to make sure we don't get just
the first rule