xref: /freebsd/share/mk/local.gendirdeps.mk (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1
2# we need a keyword, this noise is to prevent it being expanded
3GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}';
4
5# suppress optional/auto dependencies
6# local.dirdeps.mk will put them in if necessary
7GENDIRDEPS_FILTER+= \
8	Nbin/cat.host \
9	Nlib/libssp_nonshared \
10	Ncddl/usr.bin/ctf* \
11	Nlib/libc_nonshared \
12	Nlib/libgcc_eh \
13	Nlib/libgcc_s \
14	Nstand/libsa/* \
15	Nstand/libsa32/* \
16	Ntargets/pseudo/stage* \
17	Ntools/*
18
19# Clang has nested directories in its OBJDIR.
20GENDIRDEPS_FILTER+= C,(lib/clang/lib[^/]*)/.*,\1,
21
22# Exclude toolchain which is handled special.
23.if ${RELDIR:Mtargets*} == ""
24.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != ""
25GENDIRDEPS_FILTER.host+= \
26	Nusr.bin/clang/* \
27	Ngnu/usr.bin/cc/* \
28
29.endif
30GENDIRDEPS_FILTER_HOST_TOOLS+= \
31	Nlib/clang/headers \
32	Nusr.bin/addr2line \
33	Nusr.bin/ar \
34	Nusr.bin/clang/clang \
35	Nusr.bin/elfcopy \
36	Nusr.bin/elfdump \
37	Nusr.bin/nm \
38	Nusr.bin/readelf \
39	Nusr.bin/size \
40	Nusr.bin/strings \
41	Nusr.bin/strip \
42	Ngnu/usr.bin/cc* \
43	Ngnu/usr.bin/binutils* \
44
45.if ${MACHINE} != "host"
46GENDIRDEPS_FILTER+=	${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,}
47.else
48GENDIRDEPS_FILTER+=	${GENDIRDEPS_FILTER_HOST_TOOLS}
49.endif
50.endif
51
52GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U}
53
54# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple
55# see local.meta.sys.mk for GENDIRDEPS_FILTER_DIR_VARS and
56# GENDIRDEPS_FILTER_VARS
57
58# avoid churn for now
59LOCAL_DEPENDS_GUARD= _{DEP_RELDIR} == _{_DEP_RELDIR}
60
61.-include <site.gendirdeps.mk>
62