xref: /freebsd/share/mk/local.gendirdeps.mk (revision 8311337d3559e8f66576e2a64a43bca5681d3606)
1ccfb9654SSimon J. Gerraty# $FreeBSD$
2ccfb9654SSimon J. Gerraty
3ccfb9654SSimon J. Gerraty# we need a keyword, this noise is to prevent it being expanded
4*8311337dSSimon J. GerratyGENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}';
5ccfb9654SSimon J. Gerraty
604667c47SSimon J. Gerraty# supress optional/auto dependecies
77750ad47SMarcel Moolenaar# local.dirdeps.mk will put them in if necessary
804667c47SSimon J. GerratyGENDIRDEPS_FILTER+= \
904667c47SSimon J. Gerraty	Ngnu/lib/libssp/libssp_nonshared \
1004667c47SSimon J. Gerraty	Ncddl/usr.bin/ctf* \
115633315bSSimon J. Gerraty	Nlib/clang/include \
125633315bSSimon J. Gerraty	Nlib/libc_nonshared \
1361ad1ff5SSimon J. Gerraty	Ntargets/pseudo/stage* \
145633315bSSimon J. Gerraty	Ntools/*
155633315bSSimon J. Gerraty
1661ad1ff5SSimon J. Gerraty.if ${RELDIR:Mtargets*} == ""
174113aa90SSimon J. Gerraty.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != ""
184113aa90SSimon J. GerratyGENDIRDEPS_FILTER.host+= \
194113aa90SSimon J. Gerraty	Nusr.bin/clang/* \
204113aa90SSimon J. Gerraty	Ngnu/usr.bin/cc/* \
214113aa90SSimon J. Gerraty
224113aa90SSimon J. Gerraty.endif
235633315bSSimon J. GerratyGENDIRDEPS_FILTER+= \
245633315bSSimon J. Gerraty	Nusr.bin/clang/clang.host \
255633315bSSimon J. Gerraty	Ngnu/usr.bin/cc* \
264113aa90SSimon J. Gerraty	Ngnu/usr.bin/binutils*.host \
275633315bSSimon J. Gerraty
285633315bSSimon J. Gerraty.endif
297750ad47SMarcel Moolenaar
304113aa90SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U}
314113aa90SSimon J. Gerraty
327750ad47SMarcel Moolenaar# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple
3304667c47SSimon J. Gerraty# order of this list matters!
3404667c47SSimon J. GerratyGENDIRDEPS_FILTER_DIR_VARS+= \
3504667c47SSimon J. Gerraty       CSU_DIR \
3604667c47SSimon J. Gerraty       BOOT_MACHINE_DIR
377750ad47SMarcel Moolenaar
3804667c47SSimon J. Gerraty# order of this list matters!
3904667c47SSimon J. GerratyGENDIRDEPS_FILTER_VARS+= \
4004667c47SSimon J. Gerraty       KERNEL_NAME \
4104667c47SSimon J. Gerraty       MACHINE_CPUARCH \
4204667c47SSimon J. Gerraty       MACHINE_ARCH \
4304667c47SSimon J. Gerraty       MACHINE
4404667c47SSimon J. Gerraty
4504667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@}
4604667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u}
4704667c47SSimon J. Gerraty
4804667c47SSimon J. Gerraty# handle the non-standard way that gnu/usr.bin/groff/tmac is staged
4904667c47SSimon J. GerratyGENDIRDEPS_FILTER+= C,.*usr/share/tmac.*stage,gnu/usr.bin/groff/tmac,
507750ad47SMarcel Moolenaar
51