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 \ 13*a160cbfaSBryan Drewery Ngnu/lib/libgcc \ 14*a160cbfaSBryan Drewery Nlib/libgcc_eh \ 15*a160cbfaSBryan Drewery Nlib/libgcc_s \ 1661ad1ff5SSimon J. Gerraty Ntargets/pseudo/stage* \ 175633315bSSimon J. Gerraty Ntools/* 185633315bSSimon J. Gerraty 19dab362ecSBryan Drewery# Clang has nested directories in its OBJDIR. 20dab362ecSBryan DreweryGENDIRDEPS_FILTER+= C,(lib/clang/lib[^/]*)/.*,\1, 21dab362ecSBryan Drewery 224aa63711SBryan Drewery# Exclude toolchain which is handled special. 2361ad1ff5SSimon J. Gerraty.if ${RELDIR:Mtargets*} == "" 244113aa90SSimon J. Gerraty.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != "" 254113aa90SSimon J. GerratyGENDIRDEPS_FILTER.host+= \ 264113aa90SSimon J. Gerraty Nusr.bin/clang/* \ 274113aa90SSimon J. Gerraty Ngnu/usr.bin/cc/* \ 284113aa90SSimon J. Gerraty 294113aa90SSimon J. Gerraty.endif 3073571281SBryan DreweryGENDIRDEPS_FILTER_HOST_TOOLS+= \ 31142d4b37SBryan Drewery Nlib/clang/headers \ 3273571281SBryan Drewery Nusr.bin/addr2line \ 3373571281SBryan Drewery Nusr.bin/ar \ 3473571281SBryan Drewery Nusr.bin/clang/clang \ 3573571281SBryan Drewery Nusr.bin/elfcopy \ 3673571281SBryan Drewery Nusr.bin/elfdump \ 3773571281SBryan Drewery Nusr.bin/nm \ 3873571281SBryan Drewery Nusr.bin/readelf \ 3973571281SBryan Drewery Nusr.bin/size \ 4073571281SBryan Drewery Nusr.bin/strings \ 4173571281SBryan Drewery Nusr.bin/strip \ 425633315bSSimon J. Gerraty Ngnu/usr.bin/cc* \ 4373571281SBryan Drewery Ngnu/usr.bin/binutils* \ 445633315bSSimon J. Gerraty 4573571281SBryan Drewery.if ${MACHINE} != "host" 4673571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,} 4773571281SBryan Drewery.else 4873571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS} 4973571281SBryan Drewery.endif 505633315bSSimon J. Gerraty.endif 517750ad47SMarcel Moolenaar 524113aa90SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U} 534113aa90SSimon J. Gerraty 547750ad47SMarcel Moolenaar# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple 5504667c47SSimon J. Gerraty# order of this list matters! 5604667c47SSimon J. GerratyGENDIRDEPS_FILTER_DIR_VARS+= \ 5704667c47SSimon J. Gerraty CSU_DIR \ 5804667c47SSimon J. Gerraty BOOT_MACHINE_DIR 597750ad47SMarcel Moolenaar 6004667c47SSimon J. Gerraty# order of this list matters! 6104667c47SSimon J. GerratyGENDIRDEPS_FILTER_VARS+= \ 6204667c47SSimon J. Gerraty KERNEL_NAME \ 6304667c47SSimon J. Gerraty MACHINE_CPUARCH \ 6404667c47SSimon J. Gerraty MACHINE_ARCH \ 6504667c47SSimon J. Gerraty MACHINE 6604667c47SSimon J. Gerraty 6704667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@} 6804667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u} 69