1ccfb9654SSimon J. Gerraty# $FreeBSD$ 2ccfb9654SSimon J. Gerraty 3ccfb9654SSimon J. Gerraty# we need a keyword, this noise is to prevent it being expanded 48311337dSSimon J. GerratyGENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}'; 5ccfb9654SSimon J. Gerraty 6ca7f4027SPedro F. Giffuni# suppress optional/auto dependencies 77750ad47SMarcel Moolenaar# local.dirdeps.mk will put them in if necessary 804667c47SSimon J. GerratyGENDIRDEPS_FILTER+= \ 9dba62d8dSSimon J. Gerraty Nbin/cat.host \ 10cd0d51baSKyle Evans Nlib/libssp_nonshared \ 1104667c47SSimon J. Gerraty Ncddl/usr.bin/ctf* \ 125633315bSSimon J. Gerraty Nlib/libc_nonshared \ 13a160cbfaSBryan Drewery Nlib/libgcc_eh \ 14a160cbfaSBryan Drewery Nlib/libgcc_s \ 15a6589ab7SSimon J. Gerraty Nstand/libsa/* \ 16a6589ab7SSimon J. Gerraty Nstand/libsa32/* \ 1761ad1ff5SSimon J. Gerraty Ntargets/pseudo/stage* \ 185633315bSSimon J. Gerraty Ntools/* 195633315bSSimon J. Gerraty 20dab362ecSBryan Drewery# Clang has nested directories in its OBJDIR. 21dab362ecSBryan DreweryGENDIRDEPS_FILTER+= C,(lib/clang/lib[^/]*)/.*,\1, 22dab362ecSBryan Drewery 234aa63711SBryan Drewery# Exclude toolchain which is handled special. 2461ad1ff5SSimon J. Gerraty.if ${RELDIR:Mtargets*} == "" 254113aa90SSimon J. Gerraty.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != "" 264113aa90SSimon J. GerratyGENDIRDEPS_FILTER.host+= \ 274113aa90SSimon J. Gerraty Nusr.bin/clang/* \ 284113aa90SSimon J. Gerraty Ngnu/usr.bin/cc/* \ 294113aa90SSimon J. Gerraty 304113aa90SSimon J. Gerraty.endif 3173571281SBryan DreweryGENDIRDEPS_FILTER_HOST_TOOLS+= \ 32142d4b37SBryan Drewery Nlib/clang/headers \ 3373571281SBryan Drewery Nusr.bin/addr2line \ 3473571281SBryan Drewery Nusr.bin/ar \ 3573571281SBryan Drewery Nusr.bin/clang/clang \ 3673571281SBryan Drewery Nusr.bin/elfcopy \ 3773571281SBryan Drewery Nusr.bin/elfdump \ 3873571281SBryan Drewery Nusr.bin/nm \ 3973571281SBryan Drewery Nusr.bin/readelf \ 4073571281SBryan Drewery Nusr.bin/size \ 4173571281SBryan Drewery Nusr.bin/strings \ 4273571281SBryan Drewery Nusr.bin/strip \ 435633315bSSimon J. Gerraty Ngnu/usr.bin/cc* \ 4473571281SBryan Drewery Ngnu/usr.bin/binutils* \ 455633315bSSimon J. Gerraty 4673571281SBryan Drewery.if ${MACHINE} != "host" 4773571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,} 4873571281SBryan Drewery.else 4973571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS} 5073571281SBryan Drewery.endif 515633315bSSimon J. Gerraty.endif 527750ad47SMarcel Moolenaar 534113aa90SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U} 544113aa90SSimon J. Gerraty 557750ad47SMarcel Moolenaar# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple 5604667c47SSimon J. Gerraty# order of this list matters! 5704667c47SSimon J. GerratyGENDIRDEPS_FILTER_DIR_VARS+= \ 5804667c47SSimon J. Gerraty CSU_DIR \ 5904667c47SSimon J. Gerraty BOOT_MACHINE_DIR 607750ad47SMarcel Moolenaar 6104667c47SSimon J. Gerraty# order of this list matters! 6204667c47SSimon J. GerratyGENDIRDEPS_FILTER_VARS+= \ 6304667c47SSimon J. Gerraty KERNEL_NAME \ 6404667c47SSimon J. Gerraty MACHINE_CPUARCH \ 6504667c47SSimon J. Gerraty MACHINE_ARCH \ 6604667c47SSimon J. Gerraty MACHINE 6704667c47SSimon J. Gerraty 6804667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@} 6904667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u} 70*960b77beSSimon J. Gerraty 71*960b77beSSimon J. Gerraty# avoid churn for now 72*960b77beSSimon J. GerratyLOCAL_DEPENDS_GUARD= _{DEP_RELDIR} == _{_DEP_RELDIR} 73