This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
forced in any of the standard ways (MAKEOBJDIR was lost in the
previous commit). Simplified the conditionals for this.
Restored comment about MAKEOBJDIR from rev.1.4.
Improved English in comments.
of the variable OBJLINK which is used in /etc/make.conf to build 'obj'
links in the current directory. This caused lots of useless warnings
since if OBJLINK is defined ./obj will be created and used.
in the tree that use things like bsd.prog.mk just to get the default
targets like install, tags, obj, clean, cleandir, cleandepend, but do not
actually build anything there.
bsd.obj.mk. Also, a make target called objwarn checks to see
if ${.OBJDIR} != ${.CURDIR} and ${.OBJDIR} != ${CANONICALOBJDIR}
and outputs a warning. (No warning for the latter if MAKEOBJDIR or MAKEOBJDIRP
REFIX is set). objwarn is called from all targets in bsd.prog.mk, bsd.kmod.mk,
and bsd.lib.mk.
Reviewed by: bde
Running them twice usually destroyed the target binary. E.g., the
second `make objlink' in `make objlink; make; make objlink' replaced
the `cat' binary by a symlink cat@ -> /usr/obj/usr/src/bin/cat.
`ln -fs' is unusable when the target might be a symlink that resolves
to a directory. Then -f applies to a file in the directory and not
to the symlink. This seems to be the standard (and sometimes useful)
behaviour.
Create 'obj' directory in current directory instead
a symbolic link to the 'obj' tree if defined. [not set]
Print a warning if 'obj' tree (/usr/obj) does not exist.
Change default 'obj' directory from ``obj.${MACHINE}'' back to
``obj'', unfortunately many Makefiles are wired with the name ``obj''.
Add some comments for variables and targets.