Deleted Added
full compact
gendirdeps.mk (255253) gendirdeps.mk (268437)
1# $Id: gendirdeps.mk,v 1.23 2013/09/04 17:49:20 sjg Exp $
1# $Id: gendirdeps.mk,v 1.25 2014/03/14 21:28:37 sjg Exp $
2
3# Copyright (c) 2010-2013, Juniper Networks, Inc.
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright

--- 214 unchanged lines hidden (view full) ---

224dirdep_list := ${dirdep_list:O:u}
225qualdir_list := ${qualdir_list:N*.${MACHINE}:O:u}
226
227DIRDEPS = \
228 ${dirdep_list:N${RELDIR}:N${RELDIR}/*} \
229 ${qualdir_list:N${RELDIR}.*:N${RELDIR}/*}
230
231# We only consider things below $RELDIR/ if they have a makefile.
2
3# Copyright (c) 2010-2013, Juniper Networks, Inc.
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright

--- 214 unchanged lines hidden (view full) ---

224dirdep_list := ${dirdep_list:O:u}
225qualdir_list := ${qualdir_list:N*.${MACHINE}:O:u}
226
227DIRDEPS = \
228 ${dirdep_list:N${RELDIR}:N${RELDIR}/*} \
229 ${qualdir_list:N${RELDIR}.*:N${RELDIR}/*}
230
231# We only consider things below $RELDIR/ if they have a makefile.
232# This is the same test that _DIRDEPS_USE applies.
232# This is the same test that _DIRDEP_USE applies.
233# We have do a double test with dirdep_list as it _may_ contain
234# qualified dirs - if we got anything from a stage dir.
235# qualdir_list we know are all qualified.
236# It would be nice do peform this check for all of DIRDEPS,
237# but we cannot assume that all of the tree is present,
238# in fact we can only assume that RELDIR is.
239DIRDEPS += \
240 ${dirdep_list:M${RELDIR}/*:@d@${.MAKE.MAKEFILE_PREFERENCE:@m@${exists(${SRCTOP}/$d/$m):?$d:${exists(${SRCTOP}/${d:R}/$m):?$d:}}@}@} \
241 ${qualdir_list:M${RELDIR}/*:@d@${.MAKE.MAKEFILE_PREFERENCE:@m@${exists(${SRCTOP}/${d:R}/$m):?$d:}@}@}
242
233# We have do a double test with dirdep_list as it _may_ contain
234# qualified dirs - if we got anything from a stage dir.
235# qualdir_list we know are all qualified.
236# It would be nice do peform this check for all of DIRDEPS,
237# but we cannot assume that all of the tree is present,
238# in fact we can only assume that RELDIR is.
239DIRDEPS += \
240 ${dirdep_list:M${RELDIR}/*:@d@${.MAKE.MAKEFILE_PREFERENCE:@m@${exists(${SRCTOP}/$d/$m):?$d:${exists(${SRCTOP}/${d:R}/$m):?$d:}}@}@} \
241 ${qualdir_list:M${RELDIR}/*:@d@${.MAKE.MAKEFILE_PREFERENCE:@m@${exists(${SRCTOP}/${d:R}/$m):?$d:}@}@}
242
243DIRDEPS := ${DIRDEPS:${GENDIRDEPS_FILTER:UNno:ts:}:O:u}
243DIRDEPS := ${DIRDEPS:${GENDIRDEPS_FILTER:UNno:ts:}:C,//+,/,g:O:u}
244
245.if ${DEBUG_GENDIRDEPS:Uno:@x@${RELDIR:M$x}@} != ""
246.info ${RELDIR}: M2D_OBJROOTS=${M2D_OBJROOTS}
247.info ${RELDIR}: dir_list='${dir_list}'
248.info ${RELDIR}: dpadd_dir_list='${dpadd_dir_list}'
249.info ${RELDIR}: dirdep_list='${dirdep_list}'
250.info ${RELDIR}: qualdir_list='${qualdir_list}'
251.info ${RELDIR}: SKIP_GENDIRDEPS='${SKIP_GENDIRDEPS}'

--- 4 unchanged lines hidden (view full) ---

256
257# SRC_DIRDEPS is for checkout logic
258src_dirdep_list = \
259 ${dir_list:M${SRCTOP}/*:S,${SRCTOP}/,,}
260
261SRC_DIRDEPS = \
262 ${src_dirdep_list:N${RELDIR}:N${RELDIR}/*:C,(/h)/.*,,}
263
244
245.if ${DEBUG_GENDIRDEPS:Uno:@x@${RELDIR:M$x}@} != ""
246.info ${RELDIR}: M2D_OBJROOTS=${M2D_OBJROOTS}
247.info ${RELDIR}: dir_list='${dir_list}'
248.info ${RELDIR}: dpadd_dir_list='${dpadd_dir_list}'
249.info ${RELDIR}: dirdep_list='${dirdep_list}'
250.info ${RELDIR}: qualdir_list='${qualdir_list}'
251.info ${RELDIR}: SKIP_GENDIRDEPS='${SKIP_GENDIRDEPS}'

--- 4 unchanged lines hidden (view full) ---

256
257# SRC_DIRDEPS is for checkout logic
258src_dirdep_list = \
259 ${dir_list:M${SRCTOP}/*:S,${SRCTOP}/,,}
260
261SRC_DIRDEPS = \
262 ${src_dirdep_list:N${RELDIR}:N${RELDIR}/*:C,(/h)/.*,,}
263
264SRC_DIRDEPS := ${SRC_DIRDEPS:${GENDIRDEPS_SRC_FILTER:UN/*:ts:}:O:u}
264SRC_DIRDEPS := ${SRC_DIRDEPS:${GENDIRDEPS_SRC_FILTER:UN/*:ts:}:C,//+,/,g:O:u}
265
266# if you want to capture SRC_DIRDEPS in .MAKE.DEPENDFILE put
267# SRC_DIRDEPS_FILE = ${_DEPENDFILE}
268# in local.gendirdeps.mk
269.if ${SRC_DIRDEPS_FILE:Uno:tl} != "no"
270ECHO_SRC_DIRDEPS = echo 'SRC_DIRDEPS = \'; echo '${SRC_DIRDEPS:@d@ $d \\${.newline}@}'; echo;
271
272.if ${SRC_DIRDEPS_FILE:T} == ${_DEPENDFILE:T}

--- 65 unchanged lines hidden ---
265
266# if you want to capture SRC_DIRDEPS in .MAKE.DEPENDFILE put
267# SRC_DIRDEPS_FILE = ${_DEPENDFILE}
268# in local.gendirdeps.mk
269.if ${SRC_DIRDEPS_FILE:Uno:tl} != "no"
270ECHO_SRC_DIRDEPS = echo 'SRC_DIRDEPS = \'; echo '${SRC_DIRDEPS:@d@ $d \\${.newline}@}'; echo;
271
272.if ${SRC_DIRDEPS_FILE:T} == ${_DEPENDFILE:T}

--- 65 unchanged lines hidden ---