]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/local.gendirdeps.mk
Merge build glue for libraries and tests done on github
[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         Nstand/libsa/* \
17         Nstand/libsa32/* \
18         Ntargets/pseudo/stage* \
19         Ntools/*
20
21 # Clang has nested directories in its OBJDIR.
22 GENDIRDEPS_FILTER+= C,(lib/clang/lib[^/]*)/.*,\1,
23
24 # Exclude toolchain which is handled special.
25 .if ${RELDIR:Mtargets*} == ""
26 .if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != ""
27 GENDIRDEPS_FILTER.host+= \
28         Nusr.bin/clang/* \
29         Ngnu/usr.bin/cc/* \
30
31 .endif
32 GENDIRDEPS_FILTER_HOST_TOOLS+= \
33         Nlib/clang/headers \
34         Nusr.bin/addr2line \
35         Nusr.bin/ar \
36         Nusr.bin/clang/clang \
37         Nusr.bin/elfcopy \
38         Nusr.bin/elfdump \
39         Nusr.bin/nm \
40         Nusr.bin/readelf \
41         Nusr.bin/size \
42         Nusr.bin/strings \
43         Nusr.bin/strip \
44         Ngnu/usr.bin/cc* \
45         Ngnu/usr.bin/binutils* \
46
47 .if ${MACHINE} != "host"
48 GENDIRDEPS_FILTER+=     ${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,}
49 .else
50 GENDIRDEPS_FILTER+=     ${GENDIRDEPS_FILTER_HOST_TOOLS}
51 .endif
52 .endif
53
54 GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U}
55
56 # gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple
57 # order of this list matters!
58 GENDIRDEPS_FILTER_DIR_VARS+= \
59        CSU_DIR \
60        BOOT_MACHINE_DIR
61
62 # order of this list matters!
63 GENDIRDEPS_FILTER_VARS+= \
64        KERNEL_NAME \
65        MACHINE_CPUARCH \
66        MACHINE_ARCH \
67        MACHINE
68
69 GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@}
70 GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u}