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