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 \ 1004667c47SSimon J. Gerraty Ngnu/lib/libssp/libssp_nonshared \ 1104667c47SSimon J. Gerraty Ncddl/usr.bin/ctf* \ 125633315bSSimon J. Gerraty Nlib/libc_nonshared \ 13a160cbfaSBryan Drewery Ngnu/lib/libgcc \ 14a160cbfaSBryan Drewery Nlib/libgcc_eh \ 15a160cbfaSBryan Drewery Nlib/libgcc_s \ 16*a6589ab7SSimon J. Gerraty Nstand/libsa/* \ 17*a6589ab7SSimon J. Gerraty Nstand/libsa32/* \ 1861ad1ff5SSimon J. Gerraty Ntargets/pseudo/stage* \ 195633315bSSimon J. Gerraty Ntools/* 205633315bSSimon J. Gerraty 21dab362ecSBryan Drewery# Clang has nested directories in its OBJDIR. 22dab362ecSBryan DreweryGENDIRDEPS_FILTER+= C,(lib/clang/lib[^/]*)/.*,\1, 23dab362ecSBryan Drewery 244aa63711SBryan Drewery# Exclude toolchain which is handled special. 2561ad1ff5SSimon J. Gerraty.if ${RELDIR:Mtargets*} == "" 264113aa90SSimon J. Gerraty.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != "" 274113aa90SSimon J. GerratyGENDIRDEPS_FILTER.host+= \ 284113aa90SSimon J. Gerraty Nusr.bin/clang/* \ 294113aa90SSimon J. Gerraty Ngnu/usr.bin/cc/* \ 304113aa90SSimon J. Gerraty 314113aa90SSimon J. Gerraty.endif 3273571281SBryan DreweryGENDIRDEPS_FILTER_HOST_TOOLS+= \ 33142d4b37SBryan Drewery Nlib/clang/headers \ 3473571281SBryan Drewery Nusr.bin/addr2line \ 3573571281SBryan Drewery Nusr.bin/ar \ 3673571281SBryan Drewery Nusr.bin/clang/clang \ 3773571281SBryan Drewery Nusr.bin/elfcopy \ 3873571281SBryan Drewery Nusr.bin/elfdump \ 3973571281SBryan Drewery Nusr.bin/nm \ 4073571281SBryan Drewery Nusr.bin/readelf \ 4173571281SBryan Drewery Nusr.bin/size \ 4273571281SBryan Drewery Nusr.bin/strings \ 4373571281SBryan Drewery Nusr.bin/strip \ 445633315bSSimon J. Gerraty Ngnu/usr.bin/cc* \ 4573571281SBryan Drewery Ngnu/usr.bin/binutils* \ 465633315bSSimon J. Gerraty 4773571281SBryan Drewery.if ${MACHINE} != "host" 4873571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,} 4973571281SBryan Drewery.else 5073571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS} 5173571281SBryan Drewery.endif 525633315bSSimon J. Gerraty.endif 537750ad47SMarcel Moolenaar 544113aa90SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U} 554113aa90SSimon J. Gerraty 567750ad47SMarcel Moolenaar# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple 5704667c47SSimon J. Gerraty# order of this list matters! 5804667c47SSimon J. GerratyGENDIRDEPS_FILTER_DIR_VARS+= \ 5904667c47SSimon J. Gerraty CSU_DIR \ 6004667c47SSimon J. Gerraty BOOT_MACHINE_DIR 617750ad47SMarcel Moolenaar 6204667c47SSimon J. Gerraty# order of this list matters! 6304667c47SSimon J. GerratyGENDIRDEPS_FILTER_VARS+= \ 6404667c47SSimon J. Gerraty KERNEL_NAME \ 6504667c47SSimon J. Gerraty MACHINE_CPUARCH \ 6604667c47SSimon J. Gerraty MACHINE_ARCH \ 6704667c47SSimon J. Gerraty MACHINE 6804667c47SSimon J. Gerraty 6904667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@} 7004667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u} 71