dirdeps.mk (296637) | dirdeps.mk (297040) |
---|---|
1# $Id: dirdeps.mk,v 1.59 2016/02/26 23:32:29 sjg Exp $ | 1# $Id: dirdeps.mk,v 1.62 2016/03/16 00:11:53 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 --- 120 unchanged lines hidden (view full) --- 130 131now_utc = ${%s:L:gmtime} 132.if !defined(start_utc) 133start_utc := ${now_utc} 134.endif 135 136# make sure these are empty to start with 137_DEP_TARGET_SPEC = | 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 --- 120 unchanged lines hidden (view full) --- 130 131now_utc = ${%s:L:gmtime} 132.if !defined(start_utc) 133start_utc := ${now_utc} 134.endif 135 136# make sure these are empty to start with 137_DEP_TARGET_SPEC = |
138_DIRDEP_CHECKED = | |
139 140# If TARGET_SPEC_VARS is other than just MACHINE 141# it should be set by sys.mk or similar by now. 142# TARGET_SPEC must not contain any '.'s. 143TARGET_SPEC_VARS ?= MACHINE 144# this is what we started with 145TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v:U}@:ts,} 146# this is what we mostly use below --- 73 unchanged lines hidden (view full) --- 220# this is all we have to work with 221DEP_MACHINE = ${TARGET_MACHINE:U${MACHINE}} 222_DEP_TARGET_SPEC := ${DEP_TARGET_SPEC} 223.else 224_DEP_TARGET_SPEC = ${_last_dependfile:${M_dep_qual_fixes:ts:}:E} 225.endif 226.if !empty(_last_dependfile) 227# record that we've read dependfile for this | 138 139# If TARGET_SPEC_VARS is other than just MACHINE 140# it should be set by sys.mk or similar by now. 141# TARGET_SPEC must not contain any '.'s. 142TARGET_SPEC_VARS ?= MACHINE 143# this is what we started with 144TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v:U}@:ts,} 145# this is what we mostly use below --- 73 unchanged lines hidden (view full) --- 219# this is all we have to work with 220DEP_MACHINE = ${TARGET_MACHINE:U${MACHINE}} 221_DEP_TARGET_SPEC := ${DEP_TARGET_SPEC} 222.else 223_DEP_TARGET_SPEC = ${_last_dependfile:${M_dep_qual_fixes:ts:}:E} 224.endif 225.if !empty(_last_dependfile) 226# record that we've read dependfile for this |
228_DIRDEP_CHECKED += ${_CURDIR}.${TARGET_SPEC} | 227_dirdeps_checked.${_CURDIR}.${TARGET_SPEC}: |
229.endif 230.endif 231 232# by now _DEP_TARGET_SPEC should be set, parse it. 233.if ${TARGET_SPEC_VARS:[#]} > 1 234# we need to parse DEP_MACHINE may or may not contain more info 235_tspec := ${_DEP_TARGET_SPEC:S/,/ /g} 236.for i in ${_tspec_x} --- 64 unchanged lines hidden (view full) --- 301DEP_SKIP_DIR = ${SKIP_DIR} \ 302 ${SKIP_DIR.${DEP_TARGET_SPEC}:U} \ 303 ${SKIP_DIR.${DEP_MACHINE}:U} \ 304 ${SKIP_DIRDEPS.${DEP_MACHINE}:U} 305 306NSkipDir = ${DEP_SKIP_DIR:${M_ListToSkip}} 307 308.if defined(NO_DIRDEPS) || defined(NODIRDEPS) || defined(WITHOUT_DIRDEPS) | 228.endif 229.endif 230 231# by now _DEP_TARGET_SPEC should be set, parse it. 232.if ${TARGET_SPEC_VARS:[#]} > 1 233# we need to parse DEP_MACHINE may or may not contain more info 234_tspec := ${_DEP_TARGET_SPEC:S/,/ /g} 235.for i in ${_tspec_x} --- 64 unchanged lines hidden (view full) --- 300DEP_SKIP_DIR = ${SKIP_DIR} \ 301 ${SKIP_DIR.${DEP_TARGET_SPEC}:U} \ 302 ${SKIP_DIR.${DEP_MACHINE}:U} \ 303 ${SKIP_DIRDEPS.${DEP_MACHINE}:U} 304 305NSkipDir = ${DEP_SKIP_DIR:${M_ListToSkip}} 306 307.if defined(NO_DIRDEPS) || defined(NODIRDEPS) || defined(WITHOUT_DIRDEPS) |
309# confine ourselves to the original dir | 308# confine ourselves to the original dir and below. |
310DIRDEPS_FILTER += M${_DEP_RELDIR}* | 309DIRDEPS_FILTER += M${_DEP_RELDIR}* |
310.elif defined(NO_DIRDEPS_BELOW) 311DIRDEPS_FILTER += M${_DEP_RELDIR} |
|
311.endif 312 313# this is what we run below 314DIRDEP_MAKE?= ${.MAKE} 315 316# we suppress SUBDIR when visiting the leaves 317# we assume sys.mk will set MACHINE_ARCH 318# you can add extras to DIRDEP_USE_ENV --- 273 unchanged lines hidden (view full) --- 592${_this_dir}.$m: ${_build_dirs:M*.$m:N${_this_dir}.$m} 593.endif 594.endfor 595 596.endif 597 598# Now find more dependencies - and recurse. 599.for d in ${_build_all_dirs} | 312.endif 313 314# this is what we run below 315DIRDEP_MAKE?= ${.MAKE} 316 317# we suppress SUBDIR when visiting the leaves 318# we assume sys.mk will set MACHINE_ARCH 319# you can add extras to DIRDEP_USE_ENV --- 273 unchanged lines hidden (view full) --- 593${_this_dir}.$m: ${_build_dirs:M*.$m:N${_this_dir}.$m} 594.endif 595.endfor 596 597.endif 598 599# Now find more dependencies - and recurse. 600.for d in ${_build_all_dirs} |
600.if ${_DIRDEP_CHECKED:M$d} == "" | 601.if !target(_dirdeps_checked.$d) |
601# once only | 602# once only |
602_DIRDEP_CHECKED += $d | 603_dirdeps_checked.$d: |
603.if ${_debug_search} 604.info checking $d 605.endif 606# Note: _build_all_dirs is fully qualifed so d:R is always the directory 607.if exists(${d:R}) 608# Warning: there is an assumption here that MACHINE is always 609# the first entry in TARGET_SPEC_VARS. 610# If TARGET_SPEC and MACHINE are insufficient, you have a problem. --- 88 unchanged lines hidden --- | 604.if ${_debug_search} 605.info checking $d 606.endif 607# Note: _build_all_dirs is fully qualifed so d:R is always the directory 608.if exists(${d:R}) 609# Warning: there is an assumption here that MACHINE is always 610# the first entry in TARGET_SPEC_VARS. 611# If TARGET_SPEC and MACHINE are insufficient, you have a problem. --- 88 unchanged lines hidden --- |