]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/local.gendirdeps.mk
Merge llvm trunk r321414 to contrib/llvm.
[FreeBSD/FreeBSD.git] / share / mk / local.gendirdeps.mk
1 # $FreeBSD$
2
3 # we need a keyword, this noise is to prevent it being expanded
4 GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}';
5
6 # suppress optional/auto dependencies
7 # local.dirdeps.mk will put them in if necessary
8 GENDIRDEPS_FILTER+= \
9         Nbin/cat.host \
10         Ngnu/lib/libssp/libssp_nonshared \
11         Ncddl/usr.bin/ctf* \
12         Nlib/libc_nonshared \
13         Ngnu/lib/libgcc \
14         Nlib/libgcc_eh \
15         Nlib/libgcc_s \
16         Ntargets/pseudo/stage* \
17         Ntools/*
18
19 # Clang has nested directories in its OBJDIR.
20 GENDIRDEPS_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*} != ""
25 GENDIRDEPS_FILTER.host+= \
26         Nusr.bin/clang/* \
27         Ngnu/usr.bin/cc/* \
28
29 .endif
30 GENDIRDEPS_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"
46 GENDIRDEPS_FILTER+=     ${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,}
47 .else
48 GENDIRDEPS_FILTER+=     ${GENDIRDEPS_FILTER_HOST_TOOLS}
49 .endif
50 .endif
51
52 GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U}
53
54 # gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple
55 # order of this list matters!
56 GENDIRDEPS_FILTER_DIR_VARS+= \
57        CSU_DIR \
58        BOOT_MACHINE_DIR
59
60 # order of this list matters!
61 GENDIRDEPS_FILTER_VARS+= \
62        KERNEL_NAME \
63        MACHINE_CPUARCH \
64        MACHINE_ARCH \
65        MACHINE
66
67 GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@}
68 GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u}