aboutsummaryrefslogtreecommitdiff
path: root/share/mk/gendirdeps.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/gendirdeps.mk')
-rw-r--r--share/mk/gendirdeps.mk26
1 files changed, 13 insertions, 13 deletions
diff --git a/share/mk/gendirdeps.mk b/share/mk/gendirdeps.mk
index 890f4956f38e..8572a7adeb12 100644
--- a/share/mk/gendirdeps.mk
+++ b/share/mk/gendirdeps.mk
@@ -1,6 +1,7 @@
-# $Id: gendirdeps.mk,v 1.10 2012/06/30 00:37:50 sjg Exp $
+# $Id: gendirdeps.mk,v 1.12 2013/02/10 19:59:10 sjg Exp $
-# Copyright (c) 2010, Juniper Networks, Inc.
+# Copyright (c) 2010-2013, Juniper Networks, Inc.
+# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -106,25 +107,26 @@ _py_d =
# we can afford to do this all the time.
DPDEPS ?= no
META2DEPS_CMD = ${_time} ${PYTHON} ${META2DEPS} ${_py_d} \
- -R ${RELDIR} -H ${HOST_TARGET} -O ${M2D_OBJROOT}
+ -R ${RELDIR} -H ${HOST_TARGET} \
+ ${M2D_OBJROOTS:O:u:@o@-O $o@}
+
.if ${DPDEPS:tl} != "no"
META2DEPS_CMD += -D ${DPDEPS}
.endif
+
+M2D_OBJROOTS += ${OBJTOP}/ ${_OBJROOT}
+.if defined(SB_OBJROOT)
+M2D_OBJROOTS += ${SB_OBJROOT}
+.endif
.if ${.MAKE.DEPENDFILE_PREFERENCE:U${.MAKE.DEPENDFILE}:M*.${MACHINE}} == ""
# meta2deps.py only groks objroot
# so we need to give it what it expects
-M2D_OBJROOT = ${OBJTOP}/
# and tell it not to add machine qualifiers
META2DEPS_ARGS += MACHINE=none
-.else
-.if defined(SB_OBJROOT)
-M2D_OBJROOT ?= ${SB_OBJROOT}
-.else
-M2D_OBJROOT = ${OBJTOP}/
-.endif
.endif
.if defined(SB_BACKING_SB)
-META2DEPS_CMD += -S ${SB_BACKING_SB}/src -O ${SB_BACKING_SB}/${SB_OBJPREFIX}
+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"
@@ -263,7 +265,6 @@ CAT_DEPEND ?= .depend
${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@} ${_this} ${META2DEPS}
@(echo '# Autogenerated - do NOT edit!'; echo; \
echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \
- echo 'DEP_MACHINE := $${.PARSEFILE:E}'; echo; \
echo 'DIRDEPS = \'; \
echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \
${_include_src_dirdeps} \
@@ -285,7 +286,6 @@ all: ${_DEPENDFILE}
${_DEPENDFILE}: ${MAKEFILE} ${_this}
@(echo '# Autogenerated - do NOT edit!'; echo; \
echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \
- echo 'DEP_MACHINE := $${.PARSEFILE:E}'; echo; \
echo 'DIRDEPS = \'; \
echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \
echo '.include <dirdeps.mk>'; \