1 # $Id: obj.mk,v 1.15 2012/11/11 22:37:02 sjg Exp $
3 # @(#) Copyright (c) 1999-2010, Simon J. Gerraty
5 # This file is provided in the hope that it will
6 # be of use. There is absolutely NO WARRANTY.
7 # Permission to copy, redistribute or otherwise
8 # use this file is hereby granted provided that
9 # the above copyright notice and this notice are
12 # Please send copies of changes and bug-fixes to:
16 .if
!target
(__
${.PARSEFILE
:S
,bsd.
,,}__
)
17 __
${.PARSEFILE
:S
,bsd.
,,}__
:
23 # this has to match how make behaves
24 .if defined
(MAKEOBJDIRPREFIX
) || defined
(MAKEOBJDIR
)
25 .if defined
(MAKEOBJDIRPREFIX
)
26 __objdir
:= ${MAKEOBJDIRPREFIX}${.CURDIR
}
28 __objdir
:= ${MAKEOBJDIR}
39 if
[ -n
"${UNLEASHED_OBJ}" ]; then \
40 dest
="${UNLEASHED_OBJ}$$here"; \
41 echo
"$$here/${__objdir} -> $$dest"; \
42 if
[ ! -L
${__objdir} -o
"`readlink ${__objdir}`" != "$$dest" ]; then \
43 [ -e
${__objdir} ] && rm -rf
${__objdir}; \
44 ln
-sf
$$dest ${__objdir}; \
48 dest
=$$here/${__objdir} ; \
49 if
[ ! -d
${__objdir} ]; then \
50 echo
"making $$dest"; \