1993-10-21 08:27:40 +03:00
|
|
|
# $Id: bsd.obj.mk,v 1.2 1993/10/21 05:27:40 cgd Exp $
|
1993-08-15 23:26:05 +04:00
|
|
|
|
|
|
|
.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 ; \
|
1993-10-21 08:27:40 +03:00
|
|
|
echo "$$here/obj -> $$dest"; ln -s $$dest obj; \
|
1993-08-15 23:26:05 +04:00
|
|
|
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
|