NetBSD/share/mk/bsd.obj.mk

28 lines
578 B
Makefile
Raw Normal View History

# $Id: bsd.obj.mk,v 1.2 1993/10/21 05:27:40 cgd Exp $
.if !target(obj)
.if defined(NOOBJ)
obj:
.else
obj:
@cd ${.CURDIR}; rm -f obj > /dev/null 2>&1 || true; \
here=`pwd`; subdir=`echo $$here | sed 's,^/usr/src/,,'`; \
if test $$here != $$subdir ; then \
dest=/usr/obj/$$subdir ; \
echo "$$here/obj -> $$dest"; ln -s $$dest obj; \
if test -d /usr/obj -a ! -d $$dest; then \
mkdir -p $$dest; \
else \
true; \
fi; \
else \
true ; \
dest=$$here/obj ; \
if test ! -d obj ; then \
echo "making $$dest" ; \
mkdir $$dest; \
fi ; \
fi;
.endif
.endif