aboutsummaryrefslogtreecommitdiffstats
path: root/mk/gendirdeps.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/gendirdeps.mk')
-rw-r--r--mk/gendirdeps.mk28
1 files changed, 16 insertions, 12 deletions
diff --git a/mk/gendirdeps.mk b/mk/gendirdeps.mk
index 5742c6fbcc1d..9be367369f57 100644
--- a/mk/gendirdeps.mk
+++ b/mk/gendirdeps.mk
@@ -1,4 +1,4 @@
-# $Id: gendirdeps.mk,v 1.21 2013/03/28 20:01:05 sjg Exp $
+# $Id: gendirdeps.mk,v 1.22 2013/05/11 05:16:26 sjg Exp $
# Copyright (c) 2010-2013, Juniper Networks, Inc.
# All rights reserved.
@@ -111,13 +111,24 @@ _py_d =
.if ${META2DEPS:E} == "py"
# we can afford to do this all the time.
DPDEPS ?= no
-META2DEPS_CMD = ${_time} ${PYTHON} ${META2DEPS} ${_py_d} \
- -R ${RELDIR} -H ${HOST_TARGET} \
- ${M2D_OBJROOTS:O:u:@o@-O $o@}
-
+META2DEPS_CMD = ${_time} ${PYTHON} ${META2DEPS} ${_py_d}
.if ${DPDEPS:tl} != "no"
META2DEPS_CMD += -D ${DPDEPS}
.endif
+META2DEPS_FILTER = sed 's,^src:,${SRCTOP}/,;s,^\([^/]\),${OBJTOP}/\1,' |
+.elif ${META2DEPS:E} == "sh"
+META2DEPS_CMD = ${_time} ${_sh_x} ${META2DEPS} OBJTOP=${_OBJTOP}
+.else
+META2DEPS_CMD ?= ${META2DEPS}
+.endif
+
+.if ${TARGET_OBJ_SPEC:U${MACHINE}} != ${MACHINE}
+META2DEPS_CMD += -T ${TARGET_OBJ_SPEC}
+.endif
+META2DEPS_CMD += \
+ -R ${RELDIR} -H ${HOST_TARGET} \
+ ${M2D_OBJROOTS:O:u:@o@-O $o@}
+
M2D_OBJROOTS += ${OBJTOP} ${_OBJROOT} ${_objroot}
.if defined(SB_OBJROOT)
@@ -133,13 +144,6 @@ META2DEPS_ARGS += MACHINE=none
META2DEPS_CMD += -S ${SB_BACKING_SB}/src
M2D_OBJROOTS += ${SB_BACKING_SB}/${SB_OBJPREFIX}
.endif
-META2DEPS_FILTER = sed 's,^src:,${SRCTOP}/,;s,^\([^/]\),${OBJTOP}/\1,' |
-.elif ${META2DEPS:E} == "sh"
-META2DEPS_CMD = ${_time} ${_sh_x} ${META2DEPS} \
- OBJTOP=${_objtop} SB_OBJROOT=${_objroot}
-.else
-META2DEPS_CMD ?= ${META2DEPS}
-.endif
# we are only interested in the dirs
# sepecifically those we read something from.