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 \ 10*cd0d51baSKyle Evans Nlib/libssp_nonshared \ 1104667c47SSimon J. Gerraty Ncddl/usr.bin/ctf* \ 125633315bSSimon J. Gerraty Nlib/libc_nonshared \ 13312809feSSimon J. Gerraty Ngnu/lib/csu \ 14a160cbfaSBryan Drewery Ngnu/lib/libgcc \ 15a160cbfaSBryan Drewery Nlib/libgcc_eh \ 16a160cbfaSBryan Drewery Nlib/libgcc_s \ 17a6589ab7SSimon J. Gerraty Nstand/libsa/* \ 18a6589ab7SSimon J. Gerraty Nstand/libsa32/* \ 1961ad1ff5SSimon J. Gerraty Ntargets/pseudo/stage* \ 205633315bSSimon J. Gerraty Ntools/* 215633315bSSimon J. Gerraty 22dab362ecSBryan Drewery# Clang has nested directories in its OBJDIR. 23dab362ecSBryan DreweryGENDIRDEPS_FILTER+= C,(lib/clang/lib[^/]*)/.*,\1, 24dab362ecSBryan Drewery 254aa63711SBryan Drewery# Exclude toolchain which is handled special. 2661ad1ff5SSimon J. Gerraty.if ${RELDIR:Mtargets*} == "" 274113aa90SSimon J. Gerraty.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != "" 284113aa90SSimon J. GerratyGENDIRDEPS_FILTER.host+= \ 294113aa90SSimon J. Gerraty Nusr.bin/clang/* \ 304113aa90SSimon J. Gerraty Ngnu/usr.bin/cc/* \ 314113aa90SSimon J. Gerraty 324113aa90SSimon J. Gerraty.endif 3373571281SBryan DreweryGENDIRDEPS_FILTER_HOST_TOOLS+= \ 34142d4b37SBryan Drewery Nlib/clang/headers \ 3573571281SBryan Drewery Nusr.bin/addr2line \ 3673571281SBryan Drewery Nusr.bin/ar \ 3773571281SBryan Drewery Nusr.bin/clang/clang \ 3873571281SBryan Drewery Nusr.bin/elfcopy \ 3973571281SBryan Drewery Nusr.bin/elfdump \ 4073571281SBryan Drewery Nusr.bin/nm \ 4173571281SBryan Drewery Nusr.bin/readelf \ 4273571281SBryan Drewery Nusr.bin/size \ 4373571281SBryan Drewery Nusr.bin/strings \ 4473571281SBryan Drewery Nusr.bin/strip \ 455633315bSSimon J. Gerraty Ngnu/usr.bin/cc* \ 4673571281SBryan Drewery Ngnu/usr.bin/binutils* \ 475633315bSSimon J. Gerraty 4873571281SBryan Drewery.if ${MACHINE} != "host" 4973571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,} 5073571281SBryan Drewery.else 5173571281SBryan DreweryGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS} 5273571281SBryan Drewery.endif 535633315bSSimon J. Gerraty.endif 547750ad47SMarcel Moolenaar 554113aa90SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U} 564113aa90SSimon J. Gerraty 577750ad47SMarcel Moolenaar# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple 5804667c47SSimon J. Gerraty# order of this list matters! 5904667c47SSimon J. GerratyGENDIRDEPS_FILTER_DIR_VARS+= \ 6004667c47SSimon J. Gerraty CSU_DIR \ 6104667c47SSimon J. Gerraty BOOT_MACHINE_DIR 627750ad47SMarcel Moolenaar 6304667c47SSimon J. Gerraty# order of this list matters! 6404667c47SSimon J. GerratyGENDIRDEPS_FILTER_VARS+= \ 6504667c47SSimon J. Gerraty KERNEL_NAME \ 6604667c47SSimon J. Gerraty MACHINE_CPUARCH \ 6704667c47SSimon J. Gerraty MACHINE_ARCH \ 6804667c47SSimon J. Gerraty MACHINE 6904667c47SSimon J. Gerraty 7004667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@} 7104667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u} 72