xref: /freebsd/share/mk/local.gendirdeps.mk (revision 73571281f5747b72748a265cc6a6846760549f45)
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
164aa63711SBryan Drewery# Exclude toolchain which is handled special.
1761ad1ff5SSimon J. Gerraty.if ${RELDIR:Mtargets*} == ""
184113aa90SSimon J. Gerraty.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != ""
194113aa90SSimon J. GerratyGENDIRDEPS_FILTER.host+= \
204113aa90SSimon J. Gerraty	Nusr.bin/clang/* \
214113aa90SSimon J. Gerraty	Ngnu/usr.bin/cc/* \
224113aa90SSimon J. Gerraty
234113aa90SSimon J. Gerraty.endif
24*73571281SBryan DreweryGENDIRDEPS_FILTER_HOST_TOOLS+= \
25*73571281SBryan Drewery	Nlib/clang/include \
26*73571281SBryan Drewery	Nusr.bin/addr2line \
27*73571281SBryan Drewery	Nusr.bin/ar \
28*73571281SBryan Drewery	Nusr.bin/clang/clang \
29*73571281SBryan Drewery	Nusr.bin/elfcopy \
30*73571281SBryan Drewery	Nusr.bin/elfdump \
31*73571281SBryan Drewery	Nusr.bin/nm \
32*73571281SBryan Drewery	Nusr.bin/readelf \
33*73571281SBryan Drewery	Nusr.bin/size \
34*73571281SBryan Drewery	Nusr.bin/strings \
35*73571281SBryan Drewery	Nusr.bin/strip \
365633315bSSimon J. Gerraty	Ngnu/usr.bin/cc* \
37*73571281SBryan Drewery	Ngnu/usr.bin/binutils* \
385633315bSSimon J. Gerraty
39*73571281SBryan Drewery.if ${MACHINE} != "host"
40*73571281SBryan DreweryGENDIRDEPS_FILTER+=	${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,}
41*73571281SBryan Drewery.else
42*73571281SBryan DreweryGENDIRDEPS_FILTER+=	${GENDIRDEPS_FILTER_HOST_TOOLS}
43*73571281SBryan Drewery.endif
445633315bSSimon J. Gerraty.endif
457750ad47SMarcel Moolenaar
464113aa90SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U}
474113aa90SSimon J. Gerraty
487750ad47SMarcel Moolenaar# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple
4904667c47SSimon J. Gerraty# order of this list matters!
5004667c47SSimon J. GerratyGENDIRDEPS_FILTER_DIR_VARS+= \
5104667c47SSimon J. Gerraty       CSU_DIR \
5204667c47SSimon J. Gerraty       BOOT_MACHINE_DIR
537750ad47SMarcel Moolenaar
5404667c47SSimon J. Gerraty# order of this list matters!
5504667c47SSimon J. GerratyGENDIRDEPS_FILTER_VARS+= \
5604667c47SSimon J. Gerraty       KERNEL_NAME \
5704667c47SSimon J. Gerraty       MACHINE_CPUARCH \
5804667c47SSimon J. Gerraty       MACHINE_ARCH \
5904667c47SSimon J. Gerraty       MACHINE
6004667c47SSimon J. Gerraty
6104667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@}
6204667c47SSimon J. GerratyGENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u}
63