don't bother resolving onbld python module deps
[unleashed.git] / share / mk / obj.mk
blob4d69f98c75efcd88bf54e11286613f179e0f2466
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
10 # left intact.
12 # Please send copies of changes and bug-fixes to:
13 # sjg@crufty.net
16 .if !target(__${.PARSEFILE:S,bsd.,,}__)
17 __${.PARSEFILE:S,bsd.,,}__:
19 .if defined(NOOBJ)
20 obj:
21 .else
23 # this has to match how make behaves
24 .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
25 .if defined(MAKEOBJDIRPREFIX)
26 __objdir:= ${MAKEOBJDIRPREFIX}${.CURDIR}
27 .else
28 __objdir:= ${MAKEOBJDIR}
29 .endif
30 .else
31 __objdir= obj
32 .endif
34 _SUBDIRUSE:
36 obj! _SUBDIRUSE
37 @cd ${.CURDIR}; \
38 here=`pwd`; \
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}; \
45 fi; \
46 mkdir -p $$dest; \
47 else \
48 dest=$$here/${__objdir} ; \
49 if [ ! -d ${__objdir} ]; then \
50 echo "making $$dest"; \
51 mkdir -p $$dest; \
52 fi; \
54 .endif
55 .endif