From owner-p4-projects@FreeBSD.ORG Fri Feb 15 14:57:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5438916A4D2; Fri, 15 Feb 2008 14:57:53 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B12FF16A417; Fri, 15 Feb 2008 14:57:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id D1F3913C4F4; Fri, 15 Feb 2008 14:57:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8s) with ESMTP id 232035548-1834499 for multiple; Fri, 15 Feb 2008 09:55:49 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m1FEvfsK099789; Fri, 15 Feb 2008 09:57:41 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Kris Kennaway Date: Fri, 15 Feb 2008 09:52:38 -0500 User-Agent: KMail/1.9.7 References: <200802080420.m184Kvmf077416@repoman.freebsd.org> <200802141032.33861.jhb@freebsd.org> <47B4E0F1.6060006@FreeBSD.org> In-Reply-To: <47B4E0F1.6060006@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802150952.39027.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 15 Feb 2008 09:57:41 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5830/Fri Feb 15 08:07:34 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews , ru@freebsd.org, Kip Macy Subject: Re: PERFORCE change 135010 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2008 14:57:53 -0000 On Thursday 14 February 2008 07:46:41 pm Kris Kennaway wrote: > John Baldwin wrote: > > On Thursday 07 February 2008 11:20:57 pm Kip Macy wrote: > >> http://perforce.freebsd.org/chv.cgi?CH=135010 > >> > >> Change 135010 by kmacy@kmacy:storage:toehead on 2008/02/08 04:20:17 > >> > >> add opt_global.h to dependencies > >> > >> Affected files ... > >> > >> .. //depot/projects/toehead/sys/modules/cxgb/tom/Makefile#3 edit > >> > >> Differences ... > >> > >> ==== //depot/projects/toehead/sys/modules/cxgb/tom/Makefile#3 (text+ko) ==== > >> > >> @@ -5,7 +5,8 @@ > >> KMOD= tom > >> SRCS= cxgb_tom.c cxgb_cpl_io.c cxgb_listen.c cxgb_tom_sysctl.c cxgb_cpl_socket.c > >> SRCS+= cxgb_ddp.c cxgb_vm.c > >> -SRCS+= opt_compat.h opt_inet.h opt_inet6.h opt_ipsec.h opt_mac.h opt_tcpdebug.h opt_ddb.h > >> +SRCS+= opt_compat.h opt_inet.h opt_inet6.h opt_ipsec.h opt_mac.h > >> +SRCS+= opt_tcpdebug.h opt_ddb.h opt_global.h > >> SRCS+= device_if.h bus_if.h pci_if.h > >> > >> #CFLAGS+= -DDEBUG_PRINT -DDEBUG > >> > > > > That's kind of odd. Do you have an explicit #include "opt_global.h" somewhere? > > > > It also doesn't work :) > > The problem is that if you build a kernel+module with > INVARIANTS+INVARIANT_SUPPORT set, then remove both options, rerun > config, make depend, make all, the module is not rebuilt and fails to load. Ah, that is a bug in the 'make depend' stuff. We explicitly enforce a dependency for kernels in kern.post.mk. Try this instead perhaps: Index: kmod.mk =================================================================== RCS file: /usr/cvs/src/sys/conf/kmod.mk,v retrieving revision 1.221 diff -u -r1.221 kmod.mk --- kmod.mk 19 Nov 2007 16:24:10 -0000 1.221 +++ kmod.mk 15 Feb 2008 14:50:03 -0000 @@ -428,6 +428,9 @@ assym.s: @/kern/genassym.sh .endif sh @/kern/genassym.sh genassym.o > ${.TARGET} +.if defined(KERNBUILDDIR) +genassym.o: opt_global.h +.endif .if exists(@) genassym.o: @/${MACHINE_ARCH}/${MACHINE_ARCH}/genassym.c .endif @@ -439,6 +442,10 @@ lint: ${SRCS} ${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c} +.if defined(KERNBUILDDIR) +${OBJS}: opt_global.h +.endif + .include cleandepend: cleanilinks BTW, reading kmod.mk the submit above only works if .depend doesn't exist. It won't work if you have run 'make depend' because of this: .if !exists(${.OBJDIR}/${DEPENDFILE}) ${OBJS}: ${SRCS:M*.h} .endif -- John Baldwin