Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jul 2018 00:18:37 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335922 - head/sys/conf
Message-ID:  <201807040018.w640Ib7l099515@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Wed Jul  4 00:18:36 2018
New Revision: 335922
URL: https://svnweb.freebsd.org/changeset/base/335922

Log:
  Use OBJS_DEPEND_GUESS for forced opt_global.h dependency.
  
  MFC after:	2 weeks
  Sponsored by:	Dell EMC

Modified:
  head/sys/conf/kern.post.mk
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kern.post.mk
==============================================================================
--- head/sys/conf/kern.post.mk	Tue Jul  3 23:47:20 2018	(r335921)
+++ head/sys/conf/kern.post.mk	Wed Jul  4 00:18:36 2018	(r335922)
@@ -205,7 +205,8 @@ assym.inc: $S/kern/genassym.sh genassym.o genoffset_te
 genassym.o: $S/$M/$M/genassym.c  offset.inc
 	${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c
 
-${SYSTEM_OBJS} genoffset.o genassym.o vers.o: opt_global.h
+OBJS_DEPEND_GUESS+= opt_global.h
+genoffset.o genassym.o vers.o: opt_global.h
 
 .if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon)
 _meta_filemon=	1

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Tue Jul  3 23:47:20 2018	(r335921)
+++ head/sys/conf/kmod.mk	Wed Jul  4 00:18:36 2018	(r335922)
@@ -476,9 +476,6 @@ DEPENDOBJS+=	genoffset.o
 .endif
 assym.inc: genassym.o
 offset.inc: genoffset.o
-.if defined(KERNBUILDDIR)
-genassym.o: opt_global.h
-.endif
 assym.inc: ${SYSDIR}/kern/genassym.sh
 	sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET}
 genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc
@@ -492,16 +489,15 @@ genoffset.o: ${SRCS:Mopt_*.h}
 	${CC} -c ${CFLAGS:N-flto:N-fno-common} \
 	    ${SYSDIR}/kern/genoffset.c
 
-.if defined(KERNBUILDDIR)
-${OBJS}: opt_global.h
-.endif
-
 CLEANDEPENDFILES+=	${_ILINKS}
 # .depend needs include links so we remove them only together.
 cleanilinks:
 	rm -f ${_ILINKS}
 
 OBJS_DEPEND_GUESS+= ${SRCS:M*.h}
+.if defined(KERNBUILDDIR)
+OBJS_DEPEND_GUESS+= opt_global.h
+.endif
 
 .include <bsd.dep.mk>
 .include <bsd.clang-analyze.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807040018.w640Ib7l099515>