xref: /freebsd/share/mk/local.gendirdeps.mk (revision a0ee8cc636cd5c2374ec44ca71226564ea0bca95)
1# $FreeBSD$
2
3# we need a keyword, this noise is to prevent it being expanded
4GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}';
5
6# supress optional/auto dependecies
7# local.dirdeps.mk will put them in if necessary
8GENDIRDEPS_FILTER+= \
9	Nbin/cat.host \
10	Ngnu/lib/libssp/libssp_nonshared \
11	Ncddl/usr.bin/ctf* \
12	Nlib/libc_nonshared \
13	Ntargets/pseudo/stage* \
14	Ntools/*
15
16# Exclude toolchain which is handled special.
17.if ${RELDIR:Mtargets*} == ""
18.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != ""
19GENDIRDEPS_FILTER.host+= \
20	Nusr.bin/clang/* \
21	Ngnu/usr.bin/cc/* \
22
23.endif
24GENDIRDEPS_FILTER+= \
25	Nlib/clang/include.host \
26	Nusr.bin/addr2line.host \
27	Nusr.bin/ar.host \
28	Nusr.bin/clang/clang.host \
29	Nusr.bin/elfcopy.host \
30	Nusr.bin/elfdump.host \
31	Nusr.bin/nm.host \
32	Nusr.bin/readelf.host \
33	Nusr.bin/size.host \
34	Nusr.bin/strings.host \
35	Nusr.bin/strip.host \
36	Ngnu/usr.bin/cc* \
37	Ngnu/usr.bin/binutils*.host \
38
39.endif
40
41GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U}
42
43# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple
44# order of this list matters!
45GENDIRDEPS_FILTER_DIR_VARS+= \
46       CSU_DIR \
47       BOOT_MACHINE_DIR
48
49# order of this list matters!
50GENDIRDEPS_FILTER_VARS+= \
51       KERNEL_NAME \
52       MACHINE_CPUARCH \
53       MACHINE_ARCH \
54       MACHINE
55
56GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@}
57GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u}
58