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 \ 1361ad1ff5SSimon J. Gerraty Ntargets/pseudo/stage* \ 145633315bSSimon J. Gerraty Ntools/* 155633315bSSimon J. Gerraty 16*dab362ecSBryan Drewery# Clang has nested directories in its OBJDIR. 17*dab362ecSBryan DreweryGENDIRDEPS_FILTER+= C,(lib/clang/lib[^/]*)/.*,\1, 18*dab362ecSBryan Drewery 194aa63711SBryan Drewery# Exclude toolchain which is handled special. 2061ad1ff5SSimon J. Gerraty.if ${RELDIR:Mtargets*} == "" 214113aa90SSimon J. Gerraty.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != "" 224113aa90SSimon J. GerratyGENDIRDEPS_FILTER.host+= \ 234113aa90SSimon J. Gerraty Nusr.bin/clang/* \ 244113aa90SSimon J. Gerraty Ngnu/usr.bin/cc/* \ 254113aa90SSimon J. Gerraty 264113aa90SSimon J. Gerraty.endif 2773571281SBryan DreweryGENDIRDEPS_FILTER_HOST_TOOLS+= \ 2873571281SBryan Drewery Nlib/clang/include \ 2973571281SBryan Drewery Nusr.bin/addr2line \ 3073571281SBryan Drewery Nusr.bin/ar \ 3173571281SBryan Drewery Nusr.bin/clang/clang \ 3273571281SBryan Drewery Nusr.bin/elfcopy \ 3373571281SBryan Drewery Nusr.bin/elfdump \ 3473571281SBryan Drewery Nusr.bin/nm \ 3573571281SBryan Drewery Nusr.bin/readelf \ 3673571281SBryan Drewery Nusr.bin/size \ 3773571281SBryan Drewery Nusr.bin/strings \ 3873571281SBryan Drewery Nusr.bin/strip \ 395633315bSSimon J. Gerraty Ngnu/usr.bin/cc* \ 4073571281SBryan Drewery Ngnu/usr.bin/binutils* \ 415633315bSSimon J. Gerraty 4273571281SBryan Drewery.if ${MACHINE} != "host" 4373571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,} 4473571281SBryan Drewery.else 4573571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS} 4673571281SBryan Drewery.endif 475633315bSSimon J. Gerraty.endif 487750ad47SMarcel Moolenaar 494113aa90SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U} 504113aa90SSimon J. Gerraty 517750ad47SMarcel Moolenaar# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple 5204667c47SSimon J. Gerraty# order of this list matters! 5304667c47SSimon J. GerratyGENDIRDEPS_FILTER_DIR_VARS+= \ 5404667c47SSimon J. Gerraty CSU_DIR \ 5504667c47SSimon J. Gerraty BOOT_MACHINE_DIR 567750ad47SMarcel Moolenaar 5704667c47SSimon J. Gerraty# order of this list matters! 5804667c47SSimon J. GerratyGENDIRDEPS_FILTER_VARS+= \ 5904667c47SSimon J. Gerraty KERNEL_NAME \ 6004667c47SSimon J. Gerraty MACHINE_CPUARCH \ 6104667c47SSimon J. Gerraty MACHINE_ARCH \ 6204667c47SSimon J. Gerraty MACHINE 6304667c47SSimon J. Gerraty 6404667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@} 6504667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u} 66