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>
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to