Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143830216
D5742.id14720.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
27 KB
Referenced Files
None
Subscribers
None
D5742.id14720.diff
View Options
Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -124,7 +124,7 @@
installworld kernel-toolchain libraries lint maninstall \
obj objlink rerelease showconfig tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
- _build-tools _cross-tools _includes _libraries _depend \
+ _build-tools _cross-tools _includes _libraries \
build32 distribute32 install32 build32 distribute32 install32 \
builddtb xdev xdev-build xdev-install \
xdev-links native-xtools installconfig \
Index: Makefile.inc1
===================================================================
--- Makefile.inc1
+++ Makefile.inc1
@@ -7,10 +7,9 @@
# -DDB_FROM_SRC use the user/group databases in src/etc instead of
# the system database when installing.
# -DNO_SHARE do not go into share subdir
-# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,DEPEND,OBJ}
+# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,OBJ}
# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
-# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel
# -DNO_PORTSUPDATE do not update ports in ${MAKE} update
# -DNO_ROOT install without using root privilege
@@ -145,16 +144,6 @@
CLEANDIR= cleandir
.endif
-# FAST_DEPEND can skip depend tree-walks.
-.if ${MK_FAST_DEPEND} == "yes"
-NO_DEPEND= t
-NO_KERNELDEPEND=t
-.endif
-# Ensure shell checks later have a value.
-.if defined(NO_DEPEND)
-NO_DEPEND= t
-.endif
-
LOCAL_TOOL_DIRS?=
PACKAGEDIR?= ${DESTDIR}/${DISTDIR}
@@ -406,7 +395,6 @@
.endif
.endfor
CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \
- DEPFLAGS="${DEPFLAGS}" \
CPP="${XCPP} ${XCFLAGS}" \
AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \
OBJDUMP=${XOBJDUMP} OBJCOPY="${XOBJCOPY}" \
@@ -444,10 +432,6 @@
# Force using libc++ for external GCC.
XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
-nostdinc++ -L${WORLDTMP}/../lib/libc++
-# XXX: DEPFLAGS is a workaround for not properly passing CXXFLAGS to sub-makes
-# due to CXX="${XCXX} ${XCXXFLAGS}". bsd.dep.mk does use CXXFLAGS when
-# building C++ files so this can come out if passing CXXFLAGS down is fixed.
-DEPFLAGS+= -I${WORLDTMP}/usr/include/c++/v1
.elif ${TARGET_ARCH} != ${MACHINE_ARCH}
TARGET_ABI?= unknown
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
@@ -641,16 +625,10 @@
${_+_}cd ${.CURDIR}; \
${WMAKE} -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no \
MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS} libraries
-_depend:
- @echo
- @echo "--------------------------------------------------------------"
- @echo ">>> stage 4.3: make dependencies"
- @echo "--------------------------------------------------------------"
- ${_+_}cd ${.CURDIR}; ${WMAKE} depend
everything:
@echo
@echo "--------------------------------------------------------------"
- @echo ">>> stage 4.4: building everything"
+ @echo ">>> stage 4.3: building everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; _PARALLEL_SUBDIR_OK=1 ${WMAKE} all
@@ -661,9 +639,6 @@
.endif
WMAKE_TGTS+= _cleanobj _obj _build-tools _cross-tools
WMAKE_TGTS+= _includes _libraries
-.if !defined(NO_DEPEND)
-WMAKE_TGTS+= _depend
-.endif
WMAKE_TGTS+= everything
.if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE)
WMAKE_TGTS+= build${libcompat}
@@ -706,7 +681,7 @@
@cd ${BUILDENV_DIR} && env ${WMAKEENV} BUILDENV=1 ${BUILDENV_SHELL} \
|| true
-TOOLCHAIN_TGTS= ${WMAKE_TGTS:N_depend:Neverything:Nbuild${libcompat}}
+TOOLCHAIN_TGTS= ${WMAKE_TGTS:Neverything:Nbuild${libcompat}}
toolchain: ${TOOLCHAIN_TGTS}
kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
@@ -1003,7 +978,6 @@
.if defined(KERNFAST)
NO_KERNELCLEAN= t
NO_KERNELCONFIG= t
-NO_KERNELDEPEND= t
NO_KERNELOBJ= t
# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah
.if !defined(KERNCONF) && ${KERNFAST} != "1"
@@ -1085,16 +1059,9 @@
@echo ">>> stage 2.3: build tools"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools
-.if !defined(NO_KERNELDEPEND)
- @echo
- @echo "--------------------------------------------------------------"
- @echo ">>> stage 3.1: making dependencies"
- @echo "--------------------------------------------------------------"
- ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ
-.endif
@echo
@echo "--------------------------------------------------------------"
- @echo ">>> stage 3.2: building everything"
+ @echo ">>> stage 3.1: building everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ
@echo "--------------------------------------------------------------"
@@ -1293,11 +1260,10 @@
false
.endif
.for _tool in tools/build ${_elftoolchain_libs}
- ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \
- if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \
${MAKE} DIRPRFX=${_tool}/ all; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
.endfor
@@ -1447,10 +1413,9 @@
${_vtfontcvt} \
usr.bin/localedef
${_bt}-${_tool}: .PHONY .MAKE
- ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \
${MAKE} DIRPRFX=${_tool}/ all; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install
@@ -1496,10 +1461,9 @@
.for _tool in \
${_gcc_tools}
build-tools_${_tool}: .PHONY
- ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \
${MAKE} DIRPRFX=${_tool}/ all
build-tools: build-tools_${_tool}
.endfor
@@ -1580,10 +1544,9 @@
${_btxld} \
${_crunchide} \
${_usb_tools}
- ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${MAKE} DIRPRFX=${_tool}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${MAKE} DIRPRFX=${_tool}/ depend; fi; \
${MAKE} DIRPRFX=${_tool}/ all; \
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install
.endfor
@@ -1612,10 +1575,9 @@
native-xtools: .PHONY
.if ${MK_GCC_BOOTSTRAP} != "no"
mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin
- ${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> ${_gperf} (obj,all,install)"; \
cd ${.CURDIR}/${_gperf}; \
${NXBMAKE} DIRPRFX=${_gperf}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${NXBMAKE} DIRPRFX=${_gperf}/ depend; fi; \
${NXBMAKE} DIRPRFX=${_gperf}/ all; \
${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install
.endif
@@ -1687,10 +1649,9 @@
usr.bin/xz \
usr.bin/yacc \
usr.sbin/chown
- ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${NXBMAKE} DIRPRFX=${_tool}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${NXBMAKE} DIRPRFX=${_tool}/ depend; fi; \
${NXBMAKE} DIRPRFX=${_tool}/ all; \
${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install
.endfor
@@ -1926,10 +1887,9 @@
.for _lib in ${_prereq_libs}
${_lib}__PL: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
- ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
cd ${.CURDIR}/${_lib}; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; fi; \
${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
DIRPRFX=${_lib}/ all; \
${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
@@ -1940,10 +1900,9 @@
.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
${_lib}__L: .PHONY .MAKE
.if exists(${.CURDIR}/${_lib})
- ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
cd ${.CURDIR}/${_lib}; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; fi; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \
${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install
.endif
@@ -1953,10 +1912,9 @@
# static PAM library, and dynamic PAM library before dynamic PAM
# modules.
lib/libpam__L: .PHONY .MAKE
- ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> lib/libpam (obj,all,install)"; \
cd ${.CURDIR}/lib/libpam; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ depend; fi; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \
-D_NO_LIBPAM_SO_YET all; \
${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \
@@ -2251,10 +2209,9 @@
.for _tool in \
${_clang_tblgen} \
${_gperf}
- ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
+ ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \
cd ${.CURDIR}/${_tool}; \
${CDMAKE} DIRPRFX=${_tool}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ depend; fi; \
${CDMAKE} DIRPRFX=${_tool}/ all; \
${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install
.endfor
@@ -2271,10 +2228,9 @@
${_clang_libs} \
${_clang} \
${_cc}
- ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \
+ ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,all)"; \
cd ${.CURDIR}/${_tool}; \
${CDMAKE} DIRPRFX=${_tool}/ obj; \
- if [ -z "${NO_DEPEND}" ]; then ${CDMAKE} DIRPRFX=${_tool}/ depend; fi; \
${CDMAKE} DIRPRFX=${_tool}/ all
.endfor
Index: Makefile.libcompat
===================================================================
--- Makefile.libcompat
+++ Makefile.libcompat
@@ -152,7 +152,7 @@
${_+_}cd ${.CURDIR}; \
${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries
.if ${libcompat} == "32"
-.for _t in obj depend all
+.for _t in obj all
${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIBCOMPATWMAKE} \
-DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t}
${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIBCOMPATWMAKE} \
Index: gnu/lib/csu/Makefile
===================================================================
--- gnu/lib/csu/Makefile
+++ gnu/lib/csu/Makefile
@@ -22,7 +22,6 @@
CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
-I${CCDIR}/cc_tools
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
-MKDEP= -DCRT_BEGIN
.if ${TARGET_CPUARCH} == "arm"
CFLAGS+= -DTARGET_ARM_EABI
Index: share/man/man5/make.conf.5
===================================================================
--- share/man/man5/make.conf.5
+++ share/man/man5/make.conf.5
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 24, 2016
+.Dd March 29, 2016
.Dt MAKE.CONF 5
.Os
.Sh NAME
@@ -294,12 +294,6 @@
.Xr config 8
during
.Dq Li "${MAKE} buildkernel" .
-.It Va NO_KERNELDEPEND
-.Pq Vt bool
-Set this to skip running
-.Dq Li "${MAKE} depend"
-during
-.Dq Li "${MAKE} buildkernel" .
.It Va NO_KERNELOBJ
.Pq Vt bool
Set this to skip running
Index: share/man/man7/build.7
===================================================================
--- share/man/man7/build.7
+++ share/man/man7/build.7
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 26, 2016
+.Dd March 29, 2016
.Dt BUILD 7
.Os
.Sh NAME
@@ -122,11 +122,13 @@
.It Cm clean
Remove any files created during the build process.
.It Cm cleandepend
-Remove the file
-.Pa ${.OBJDIR}/${DEPENDFILE}
-generated by a prior
+Remove the
+.Pa ${.OBJDIR}/${DEPENDFILE}*
+files generated by prior
+.Dq Li "make"
+and
.Dq Li "make depend"
-step.
+steps.
.It Cm cleandir
Remove the canonical object directory if it exists, or perform
actions equivalent to
@@ -146,6 +148,8 @@
.It Cm depend
Generate a list of build dependencies in file
.Pa ${.OBJDIR}/${DEPENDFILE} .
+Per-object dependencies are generated at build time and stored in
+.Pa ${.OBJDIR}/${DEPENDFILE}.${OBJ} .
.It Cm install
Install the results of the build to the appropriate location in the
installation directory hierarchy specified in variable
@@ -412,7 +416,6 @@
defaults to setting
.Va NO_KERNELCLEAN ,
.Va NO_KERNELCONFIG ,
-.Va NO_KERNELDEPEND
and
.Va NO_KERNELOBJ .
When set to a value other than
@@ -527,7 +530,7 @@
.Fl D
option of
.Xr make 1 :
-.Bl -tag -width ".Va -DNO_KERNELDEPEND"
+.Bl -tag -width ".Va -DNO_KERNELCONFIG"
.It Va NO_CLEANDIR
If set, the build targets that clean parts of the object tree use the
equivalent of
@@ -565,12 +568,6 @@
as part of the
.Cm buildkernel
target.
-.It Va NO_KERNELDEPEND
-If set, the build process does not run
-.Dq make depend
-as part of the
-.Cm buildkernel
-target.
.It Va NO_KERNELOBJ
If set, the build process does not run
.Dq make obj
Index: share/mk/bsd.clang-analyze.mk
===================================================================
--- share/mk/bsd.clang-analyze.mk
+++ share/mk/bsd.clang-analyze.mk
@@ -85,10 +85,7 @@
${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
.endfor
-.if ${MK_FAST_DEPEND} == "yes"
-beforeanalyze: depend
-.endif
-beforeanalyze: .PHONY
+beforeanalyze: depend .PHONY
.if !defined(_RECURSING_PROGS) && !empty(CLANG_ANALYZE_SRCS) && \
${CLANG_ANALYZE_OUTPUT} != "text"
mkdir -p ${CLANG_ANALYZE_OUTPUT_DIR}
Index: share/mk/bsd.dep.mk
===================================================================
--- share/mk/bsd.dep.mk
+++ share/mk/bsd.dep.mk
@@ -20,10 +20,6 @@
#
# HTAGSFLAGS Options for htags(1) [not set]
#
-# MKDEP Options for ${MKDEPCMD} [not set]
-#
-# MKDEPCMD Makefile dependency list program [mkdep]
-#
# SRCS List of source files (c, c++, assembler)
#
# DPSRCS List of source files which are needed for generating
@@ -54,13 +50,6 @@
GTAGSFLAGS?= -o
HTAGSFLAGS?=
-_MKDEPCC:= ${CC:N${CCACHE_BIN}}
-# XXX: DEPFLAGS can come out once Makefile.inc1 properly passes down
-# CXXFLAGS.
-.if !empty(DEPFLAGS)
-_MKDEPCC+= ${DEPFLAGS}
-.endif
-MKDEPCMD?= CC='${_MKDEPCC}' mkdep
.if ${MK_DIRDEPS_BUILD} == "no"
.MAKE.DEPENDFILE= ${DEPENDFILE}
.endif
@@ -95,9 +84,6 @@
.for _S in ${SRCS:N*.[dhly]}
OBJS_DEPEND_GUESS.${_S:R}.o= ${_S}
-.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
-${_S:R}.o: ${OBJS_DEPEND_GUESS.${_S:R}.o}
-.endif
.endfor
# Lexical analyzers
@@ -106,9 +92,6 @@
${_LC}: ${_LSRC}
${LEX} ${LFLAGS} -o${.TARGET} ${.ALLSRC}
OBJS_DEPEND_GUESS.${_LC:R}.o= ${_LC}
-.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
-${_LC:R}.o: ${OBJS_DEPEND_GUESS.${_LC:R}.o}
-.endif
SRCS:= ${SRCS:S/${_LSRC}/${_LC}/}
CLEANFILES+= ${_LC}
.endfor
@@ -138,9 +121,6 @@
${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
.endif
OBJS_DEPEND_GUESS.${_YC:R}.o= ${_YC}
-.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
-${_YC:R}.o: ${OBJS_DEPEND_GUESS.${_YC:R}.o}
-.endif
.endfor
.endfor
@@ -175,7 +155,6 @@
.if !empty(.MAKE.MODE:Mmeta) && empty(.MAKE.MODE:Mnofilemon)
_meta_filemon= 1
.endif
-.if ${MK_FAST_DEPEND} == "yes"
.if ${MAKE_VERSION} < 20160220
DEPEND_MP?= -MP
.endif
@@ -210,7 +189,6 @@
.endfor
.endif # !defined(_SKIP_READ_DEPEND)
.endif # !defined(_meta_filemon)
-.endif # ${MK_FAST_DEPEND} == "yes"
.endif # defined(SRCS)
.if ${MK_DIRDEPS_BUILD} == "yes"
@@ -230,7 +208,6 @@
# Guess some dependencies for when no ${DEPENDFILE}.OBJ is generated yet.
# For meta+filemon the .meta file is checked for since it is the dependency
# file used.
-.if ${MK_FAST_DEPEND} == "yes"
.for __obj in ${DEPENDOBJS:O:u}
.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${__obj}.meta)) || \
(!defined(_meta_filemon) && !exists(${.OBJDIR}/${DEPENDFILE}.${__obj}))
@@ -245,7 +222,6 @@
.if ${MK_DIRDEPS_BUILD} == "no" || ${.MAKE.LEVEL} > 0
beforebuild: depend
.endif
-.endif # ${MK_FAST_DEPEND} == "yes"
.if !target(depend)
.if defined(SRCS)
@@ -254,41 +230,14 @@
# Tell bmake not to look for generated files via .PATH
.NOPATH: ${DEPENDFILE} ${DEPENDFILES_OBJS}
-.if ${MK_FAST_DEPEND} == "no"
-# Capture -include from CFLAGS.
-# This could be simpler with bmake :tW but needs to support fmake for MFC.
-_CFLAGS_INCLUDES= ${CFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g}
-_CXXFLAGS_INCLUDES= ${CXXFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g}
-
-# Different types of sources are compiled with slightly different flags.
-# Split up the sources, and filter out headers and non-applicable flags.
-MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \
- ${CFLAGS:M-ansi} ${_CFLAGS_INCLUDES}
-MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} \
- ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*} \
- ${_CXXFLAGS_INCLUDES}
-.endif # ${MK_FAST_DEPEND} == "no"
-
DPSRCS+= ${SRCS}
-# FAST_DEPEND will only generate a .depend if _EXTRADEPEND is used but
-# the target is created to allow 'make depend' to generate files.
+# A .depend file will only be generated if there are commands in
+# beforedepend/_EXTRADEPEND/afterdepend. The target is kept
+# to allow 'make depend' to generate files.
${DEPENDFILE}: ${DPSRCS}
.if exists(${.OBJDIR}/${DEPENDFILE})
rm -f ${DEPENDFILE}
.endif
-.if ${MK_FAST_DEPEND} == "no"
-.if !empty(DPSRCS:M*.[cS])
- ${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
- ${MKDEP_CFLAGS} ${.ALLSRC:M*.[cS]}
-.endif
-.if !empty(DPSRCS:M*.cc) || !empty(DPSRCS:M*.C) || !empty(DPSRCS:M*.cpp) || \
- !empty(DPSRCS:M*.cxx)
- ${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
- ${MKDEP_CXXFLAGS} \
- ${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp} ${.ALLSRC:M*.cxx}
-.else
-.endif
-.endif # ${MK_FAST_DEPEND} == "no"
.if target(_EXTRADEPEND)
_EXTRADEPEND: .USE
${DEPENDFILE}: _EXTRADEPEND
Index: share/mk/bsd.lib.mk
===================================================================
--- share/mk/bsd.lib.mk
+++ share/mk/bsd.lib.mk
@@ -289,12 +289,6 @@
.endif
_EXTRADEPEND:
-.if ${MK_FAST_DEPEND} == "no"
- @TMP=_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.So:/' < ${DEPENDFILE} \
- > $$TMP; \
- mv $$TMP ${DEPENDFILE}
-.endif
.if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME)
.if defined(DPADD) && !empty(DPADD)
echo ${SHLIB_NAME_FULL}: ${DPADD} >> ${DEPENDFILE}
@@ -414,23 +408,6 @@
.endif
.include <bsd.dep.mk>
-
-.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
-.if defined(LIB) && !empty(LIB)
-${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS}
-.for _S in ${SRCS:N*.[hly]}
-${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po}
-.endfor
-.endif
-.if defined(SHLIB_NAME) || \
- defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
-${SOBJS}: ${OBJS_DEPEND_GUESS}
-.for _S in ${SRCS:N*.[hly]}
-${_S:R}.So: ${OBJS_DEPEND_GUESS.${_S:R}.So}
-.endfor
-.endif
-.endif
-
.include <bsd.clang-analyze.mk>
.include <bsd.obj.mk>
.include <bsd.sys.mk>
Index: share/mk/bsd.opts.mk
===================================================================
--- share/mk/bsd.opts.mk
+++ share/mk/bsd.opts.mk
@@ -52,7 +52,6 @@
ASSERT_DEBUG \
DEBUG_FILES \
DOCCOMPRESS \
- FAST_DEPEND \
INCLUDES \
INSTALLLIB \
KERBEROS \
@@ -79,12 +78,6 @@
STAGING_PROG/STAGING \
-# Enable FAST_DEPEND by default for the meta build.
-.if !empty(.MAKE.MODE:Mmeta)
-__DEFAULT_YES_OPTIONS+= FAST_DEPEND
-__DEFAULT_NO_OPTIONS:= ${__DEFAULT_NO_OPTIONS:NFAST_DEPEND}
-.endif
-
.include <bsd.mkopt.mk>
#
Index: share/mk/bsd.prog.mk
===================================================================
--- share/mk/bsd.prog.mk
+++ share/mk/bsd.prog.mk
@@ -282,13 +282,6 @@
.endif
.include <bsd.dep.mk>
-
-.if defined(PROG)
-.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
-${OBJS}: ${OBJS_DEPEND_GUESS}
-.endif
-.endif
-
.include <bsd.clang-analyze.mk>
.include <bsd.obj.mk>
.include <bsd.sys.mk>
Index: share/mk/local.meta.sys.mk
===================================================================
--- share/mk/local.meta.sys.mk
+++ share/mk/local.meta.sys.mk
@@ -6,7 +6,6 @@
# we need this until there is an alternative
MK_INSTALL_AS_USER= yes
-MK_FAST_DEPEND= yes
_default_makeobjdir=$${.CURDIR:S,^$${SRCTOP},$${OBJTOP},}
Index: sys/conf/kern.opts.mk
===================================================================
--- sys/conf/kern.opts.mk
+++ sys/conf/kern.opts.mk
@@ -30,7 +30,6 @@
CDDL \
CRYPT \
CUSE \
- FAST_DEPEND \
FORMAT_EXTENSIONS \
INET \
INET6 \
@@ -49,12 +48,6 @@
NAND \
OFED
-# Enable FAST_DEPEND by default for the meta build.
-.if !empty(.MAKE.MODE:Unormal:Mmeta)
-__DEFAULT_YES_OPTIONS+= FAST_DEPEND
-__DEFAULT_NO_OPTIONS:= ${__DEFAULT_NO_OPTIONS:NFAST_DEPEND}
-.endif
-
# Some options are totally broken on some architectures. We disable
# them. If you need to enable them on an experimental basis, you
# must change this code.
Index: sys/conf/kern.post.mk
===================================================================
--- sys/conf/kern.post.mk
+++ sys/conf/kern.post.mk
@@ -145,10 +145,6 @@
OBJS_DEPEND_GUESS+= assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} \
${MFILES:T:S/.m$/.h/}
-.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/.depend)
-${SYSTEM_OBJS}: ${OBJS_DEPEND_GUESS}
-.endif
-
LNFILES= ${CFILES:T:S/.c$/.ln/}
.for mfile in ${MFILES}
@@ -189,23 +185,6 @@
${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
-# Normal files first
-CFILES_NORMAL= ${CFILES:N*/cddl/*:N*fs/nfsclient/nfs_clkdtrace*:N*/compat/linuxkpi/common/*:N*/ofed/*:N*/dev/mlx5/*}
-SFILES_NORMAL= ${SFILES:N*/cddl/*}
-
-# We have "special" -I include paths for zfs/dtrace files in 'depend'.
-CFILES_CDDL= ${CFILES:M*/cddl/*}
-SFILES_CDDL= ${SFILES:M*/cddl/*}
-
-# We have "special" -I include paths for LinuxKPI.
-CFILES_LINUXKPI=${CFILES:M*/compat/linuxkpi/common/*}
-
-# We have "special" -I include paths for OFED.
-CFILES_OFED=${CFILES:M*/ofed/*}
-
-# We have "special" -I include paths for MLX5.
-CFILES_MLX5=${CFILES:M*/dev/mlx5/*}
-
# Skip reading .depend when not needed to speed up tree-walks
# and simple lookups.
.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \
@@ -216,9 +195,6 @@
.endif
kernel-depend: .depend
-# The argument list can be very long, so use make -V and xargs to
-# pass it to mkdep.
-_MKDEPCC:= ${CC:N${CCACHE_BIN}}
SRCS= assym.s vnode_if.h ${BEFORE_DEPEND} ${CFILES} \
${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \
${MFILES:T:S/.m$/.h/}
@@ -228,7 +204,6 @@
.if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon)
_meta_filemon= 1
.endif
-.if ${MK_FAST_DEPEND} == "yes"
DEPENDOBJS+= ${SYSTEM_OBJS} genassym.o
DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:C/^/.depend./}
.if ${MAKE_VERSION} < 20160220
@@ -261,12 +236,10 @@
# all dependencies are correctly added or accounted for. This is mostly to
# ensure downstream uses of kernel-depend are handled.
beforebuild: kernel-depend
-.endif # ${MK_FAST_DEPEND} == "yes"
# Guess some dependencies for when no ${DEPENDFILE}.OBJ is generated yet.
# For meta+filemon the .meta file is checked for since it is the dependency
# file used.
-.if ${MK_FAST_DEPEND} == "yes"
.for __obj in ${DEPENDOBJS:O:u}
.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${__obj}.meta)) || \
(!defined(_meta_filemon) && !exists(${.OBJDIR}/.depend.${__obj}))
@@ -276,32 +249,10 @@
${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
.endif
.endfor
-.endif
.NOPATH: .depend ${DEPENDFILES_OBJS}
.depend: .PRECIOUS ${SRCS}
-.if ${MK_FAST_DEPEND} == "no"
- rm -f ${.TARGET}.tmp
-# C files
- ${MAKE} -V CFILES_NORMAL -V SYSTEM_CFILES -V GEN_CFILES | \
- CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${CFLAGS}
- ${MAKE} -V CFILES_CDDL | \
- CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_CFLAGS} \
- ${FBT_CFLAGS} ${DTRACE_CFLAGS}
- ${MAKE} -V CFILES_LINUXKPI | \
- CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp \
- ${CFLAGS} ${LINUXKPI_INCLUDES}
- ${MAKE} -V CFILES_OFED -V CFILES_MLX5 | \
- CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp \
- ${CFLAGS} ${OFEDINCLUDES}
-# Assembly files
- ${MAKE} -V SFILES_NORMAL | \
- CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ASM_CFLAGS}
- ${MAKE} -V SFILES_CDDL | \
- CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_ASM_CFLAGS}
- mv ${.TARGET}.tmp ${.TARGET}
-.endif
_ILINKS= machine
.if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
Index: sys/conf/kern.pre.mk
===================================================================
--- sys/conf/kern.pre.mk
+++ sys/conf/kern.pre.mk
@@ -64,29 +64,6 @@
INCLUDES= ${NOSTDINC} ${INCLMAGIC} -I. -I$S
-.if ${MK_FAST_DEPEND} == "no" && (make(depend) || make(kernel-depend))
-
-# This hack lets us use the ipfilter code without spamming a new
-# include path into contrib'ed source files.
-INCLUDES+= -I$S/contrib/ipfilter
-
-# ... and the same for ath
-INCLUDES+= -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal
-
-# ... and the same for the NgATM stuff
-INCLUDES+= -I$S/contrib/ngatm
-
-# ... and the same for vchiq
-INCLUDES+= -I$S/contrib/vchiq
-
-# ... and the same for twa
-INCLUDES+= -I$S/dev/twa
-
-# ... and the same for cxgb and cxgbe
-INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe
-
-.endif
-
CFLAGS= ${COPTFLAGS} ${DEBUG}
CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100
Index: sys/conf/kmod.mk
===================================================================
--- sys/conf/kmod.mk
+++ sys/conf/kmod.mk
@@ -458,11 +458,6 @@
OBJS_DEPEND_GUESS+= ${SRCS:M*.h}
.include <bsd.dep.mk>
-
-.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
-${OBJS}: ${OBJS_DEPEND_GUESS}
-.endif
-
.include <bsd.clang-analyze.mk>
.include <bsd.obj.mk>
.include "kern.mk"
Index: sys/modules/pflog/Makefile
===================================================================
--- sys/modules/pflog/Makefile
+++ sys/modules/pflog/Makefile
@@ -7,14 +7,11 @@
opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h
SRCS+= bus_if.h device_if.h
-.if defined(KERNBUILDDIR)
-MKDEP+= -include ${KERNBUILDDIR}/opt_global.h
-.else
+.if !defined(KERNBUILDDIR)
.if defined(VIMAGE)
opt_global.h:
echo "#define VIMAGE 1" >> ${.TARGET}
CFLAGS+= -include opt_global.h
-MKDEP+= -include opt_global.h
.endif
.endif
Index: sys/modules/pfsync/Makefile
===================================================================
--- sys/modules/pfsync/Makefile
+++ sys/modules/pfsync/Makefile
@@ -7,14 +7,11 @@
opt_pf.h opt_inet.h opt_inet6.h
SRCS+= bus_if.h device_if.h
-.if defined(KERNBUILDDIR)
-MKDEP+= -include ${KERNBUILDDIR}/opt_global.h
-.else
+.if !defined(KERNBUILDDIR)
.if defined(VIMAGE)
opt_global.h:
echo "#define VIMAGE 1" >> ${.TARGET}
CFLAGS+= -include opt_global.h
-MKDEP+= -include opt_global.h
.endif
.endif
Index: sys/modules/wtap/Makefile
===================================================================
--- sys/modules/wtap/Makefile
+++ sys/modules/wtap/Makefile
@@ -16,11 +16,8 @@
SRCS += opt_global.h
-.if defined(KERNBUILDDIR)
-MKDEP= -include ${KERNBUILDDIR}/opt_global.h
-.else
+.if !defined(KERNBUILDDIR)
CFLAGS+= -include opt_global.h
-MKDEP= -include opt_global.h
opt_global.h:
echo "#define VIMAGE 1" > ${.TARGET}
Index: tools/build/options/WITHOUT_FAST_DEPEND
===================================================================
--- tools/build/options/WITHOUT_FAST_DEPEND
+++ /dev/null
@@ -1,5 +0,0 @@
-.\" $FreeBSD$
-Set to use the historical
-.Xr mkdep 1
-for the "make depend" phase of the build.
-This option is deprecated and will be removed soon.
Index: tools/build/options/WITH_FAST_DEPEND
===================================================================
--- tools/build/options/WITH_FAST_DEPEND
+++ /dev/null
@@ -1,7 +0,0 @@
-.\" $FreeBSD$
-Set to generate
-.Sy .depend
-files in the build during compilation instead of the
-historial
-.Xr mkdep 1
-call during the "make depend" phase.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 5:28 PM (20 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28405840
Default Alt Text
D5742.id14720.diff (27 KB)
Attached To
Mode
D5742: Remove old depend code and make FAST_DEPEND one true way.
Attached
Detach File
Event Timeline
Log In to Comment