f957a32dac
Move the setting of TARGET_SPEC_VARS to local.sys.env.mk so meta.sys.mk can do the processing, and include local.meta.sys.mk later. Move the setting of GENDIRDEPS_FILTER*_VARS from local.gendirdeps.mk to local.meta.sys.mk so we can automatically set DEP_* at level 1+ to avoid syntax errors when DEP_* variables are used in conditionals in Makefile.depend files. Update gendirdeps.mk just to get the documentation about the above. No functional change. local.dirdeps.mk be more careful about adding to DIRDEPS to avoid unnecessary overhead, and introducing cycles in the graph. Also set DEP_MACHINE_CPUARCH. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39737
63 lines
1.5 KiB
Makefile
63 lines
1.5 KiB
Makefile
# $FreeBSD$
|
|
|
|
# we need a keyword, this noise is to prevent it being expanded
|
|
GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}';
|
|
|
|
# suppress optional/auto dependencies
|
|
# local.dirdeps.mk will put them in if necessary
|
|
GENDIRDEPS_FILTER+= \
|
|
Nbin/cat.host \
|
|
Nlib/libssp_nonshared \
|
|
Ncddl/usr.bin/ctf* \
|
|
Nlib/libc_nonshared \
|
|
Nlib/libgcc_eh \
|
|
Nlib/libgcc_s \
|
|
Nstand/libsa/* \
|
|
Nstand/libsa32/* \
|
|
Ntargets/pseudo/stage* \
|
|
Ntools/*
|
|
|
|
# Clang has nested directories in its OBJDIR.
|
|
GENDIRDEPS_FILTER+= C,(lib/clang/lib[^/]*)/.*,\1,
|
|
|
|
# Exclude toolchain which is handled special.
|
|
.if ${RELDIR:Mtargets*} == ""
|
|
.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != ""
|
|
GENDIRDEPS_FILTER.host+= \
|
|
Nusr.bin/clang/* \
|
|
Ngnu/usr.bin/cc/* \
|
|
|
|
.endif
|
|
GENDIRDEPS_FILTER_HOST_TOOLS+= \
|
|
Nlib/clang/headers \
|
|
Nusr.bin/addr2line \
|
|
Nusr.bin/ar \
|
|
Nusr.bin/clang/clang \
|
|
Nusr.bin/elfcopy \
|
|
Nusr.bin/elfdump \
|
|
Nusr.bin/nm \
|
|
Nusr.bin/readelf \
|
|
Nusr.bin/size \
|
|
Nusr.bin/strings \
|
|
Nusr.bin/strip \
|
|
Ngnu/usr.bin/cc* \
|
|
Ngnu/usr.bin/binutils* \
|
|
|
|
.if ${MACHINE} != "host"
|
|
GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS:C,$,.host,}
|
|
.else
|
|
GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS}
|
|
.endif
|
|
.endif
|
|
|
|
GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U}
|
|
|
|
# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple
|
|
# see local.meta.sys.mk for GENDIRDEPS_FILTER_DIR_VARS and
|
|
# GENDIRDEPS_FILTER_VARS
|
|
|
|
# avoid churn for now
|
|
LOCAL_DEPENDS_GUARD= _{DEP_RELDIR} == _{_DEP_RELDIR}
|
|
|
|
.-include <site.gendirdeps.mk>
|