Date: Fri, 04 Dec 1998 21:22:12 -0700 From: Warner Losh <imp@village.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: Requiring make depend Message-ID: <199812050422.VAA47365@harmony.village.org> In-Reply-To: Your message of "Fri, 04 Dec 1998 18:09:15 PST." <199812050209.SAA01724@dingo.cdrom.com> References: <199812050209.SAA01724@dingo.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ingore my last patch, as it just papers over the problem. Consider the attached patch. It uses the bsd make's .ORDER: directive to force things to be built in the right order. Since we already use pmake features, this doesn't do much to the portability of the file. It also explicit adds the generated files to the SYSTEM_DEP make macro so they are built properly. I use the .ORDER to ensure that things which are generated are built first. I do not know how this interacts with make -j to know if this would completely close the race for a n-way make (where n >> 15). I think that in order to be absolutely sure that you may need to do a make depend before an -j n make. This patch makes the race much much harder to lose since the first things to be built are those things which are generated. All this w/o hacking config or changing substantially how we do dependencies. To go farther would requires a small change to config could allow for tagging of files as "generated" (maybe key off the compile-with keyword, since that really means create-with) and then have them automatically be added to BEFORE_DEPEND (or some better name). There are serveral files that fall into this catagory that are optional files (eg smb bus files, iic bus files, etc). Those files are not covered by this patch. However, the whole config(8) system is long overdue for retirement just as soon as someone shakes loose enough time to give it an heir apparent. Warner Index: conf/files =================================================================== RCS file: /home/imp/FreeBSD/CVS/src/sys/conf/files,v retrieving revision 1.177 diff -u -r1.177 files --- files 1998/12/04 18:01:22 1.177 +++ files 1998/12/05 04:21:17 @@ -13,11 +13,8 @@ no-obj no-implicit-rule before-depend \ clean "aic7xxx_seq.h aic7xxx_reg.h" \ dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" -kern/subr_rman.c standard -kern/subr_bus.c standard \ - dependency "device_if.h bus_if.h" device_if.o standard \ - dependency "device_if.c" \ + dependency "device_if.c device_if.h" \ compile-with "${NORMAL_C}" \ no-implicit-rule local device_if.c standard \ @@ -252,6 +249,7 @@ kern/kern_xxx.c standard kern/md5c.c standard kern/subr_autoconf.c standard +kern/subr_bus.c standard kern/subr_devstat.c standard kern/subr_diskslice.c standard kern/subr_dkbad.c standard @@ -264,6 +262,7 @@ kern/sys_generic.c standard kern/sys_pipe.c standard kern/sys_process.c standard +kern/subr_rman.c standard kern/sys_socket.c standard kern/sysv_ipc.c standard kern/sysv_msg.c optional sysvmsg Index: i386/conf/Makefile.i386 =================================================================== RCS file: /home/imp/FreeBSD/CVS/src/sys/i386/conf/Makefile.i386,v retrieving revision 1.129 diff -u -r1.129 Makefile.i386 --- Makefile.i386 1998/11/15 18:07:35 1.129 +++ Makefile.i386 1998/12/05 04:02:20 @@ -81,7 +81,7 @@ # everything just to do a make depend. SYSTEM_CFILES= ioconf.c param.c vnode_if.c config.c SYSTEM_SFILES= ${I386}/i386/locore.s -SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${SYSTEM_OBJS} +SYSTEM_DEP= Makefile symbols.exclude symbols.sort ${BEFORE_DEPEND} ${SYSTEM_OBJS} .if ${CFLAGS:M-g} == "" SYMORDER_EXCLUDE=-x symbols.exclude .endif @@ -113,6 +113,7 @@ %MFILES +.ORDER: ${BEFORE_DEPEND} %LOAD %CLEAN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812050422.VAA47365>