From owner-freebsd-current Mon Nov 13 16:52:55 2000 Delivered-To: freebsd-current@freebsd.org Received: from updraft.jp.freebsd.org (updraft.jp.FreeBSD.ORG [210.157.158.42]) by hub.freebsd.org (Postfix) with ESMTP id AD55337B479; Mon, 13 Nov 2000 16:52:31 -0800 (PST) Received: from castle2.jp.FreeBSD.org (castle2.jp.FreeBSD.org [210.226.20.120]) by updraft.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id JAA37118; Tue, 14 Nov 2000 09:52:29 +0900 (JST) (envelope-from matusita@jp.FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by castle2.jp.FreeBSD.org (8.11.0+3.3W/8.11.0) with ESMTP/inet id eAE0qRs63317; Tue, 14 Nov 2000 09:52:27 +0900 (JST) (envelope-from matusita@jp.FreeBSD.org) Cc: current@FreeBSD.ORG, stable@FreeBSD.ORG In-Reply-To: <3A103875.3555E3D4@cup.hp.com> References: <20001113195111R.matusita@jp.FreeBSD.org> <20001113095855.C38404@dragon.nuxi.com> <3A103875.3555E3D4@cup.hp.com> X-Face: '*aj"d@ijeQ:/X}]oM5c5Uz{ZZZk90WPt>a^y4$cGQp8:!H\W=hSM;PuNiidkc]/%,;6VGu e+`&APmz|P;F~OL/QK%;P2vU>\j4X.8@i%j6[%DTs_3J,Fff0)*oHg$A.cDm&jc#pD24WK@{,"Ef!0 P\):.2}8jo-BiZ?X&t$V X-User-Agent: Mew/1.94.2 XEmacs/21.2 (Notus) X-FaceAnim: (-O_O-)(O_O- )(_O- )(O- )(- -)( -O)( -O_)( -O_O)(-O_O-) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Dispatcher: imput version 20000228(IM140) Lines: 404 From: Makoto MATSUSHITA To: marcel@cup.hp.com Subject: Re: "make modules" kicks the first module directory twice Date: Tue, 14 Nov 2000 09:52:25 +0900 Message-Id: <20001114095225T.matusita@jp.FreeBSD.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG marcel> No you can't. $S expands to "../.." which only works for the marcel> first cd in the -jX case. The second cd will fail. Ouch... give me one more chance to submit a patch. Here's summary: * src/release/Makefile should use 'module-depend' while checking dependancy of modules (not kernel-depend). * For parallel build: "command && command" -> "command; command" * For parallel build: "make obj depend" -> "make obj; make depend" * Avoid to do run "obj" target again in "modules" target (comes from an email of imp@village.org) -- - Makoto `MAR' MATSUSHITA Index: Makefile =================================================================== RCS file: /lab/FreeBSD/FreeBSD.cvs/src/release/Makefile,v retrieving revision 1.585 diff -c -r1.585 Makefile *** Makefile 2000/11/12 11:04:11 1.585 --- Makefile 2000/11/13 05:37:12 *************** *** 831,837 **** @rm -f ${RD}/kernels/*.ko @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL} @cd ${.CURDIR}/../sys/compile/${KERNEL} && \ ! make kernel-depend && \ make ${KERNEL_FLAGS} modules && \ make modules-reinstall DESTDIR=${RD}/kernels && \ --- 831,837 ---- @rm -f ${RD}/kernels/*.ko @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL} @cd ${.CURDIR}/../sys/compile/${KERNEL} && \ ! make modules-depend && \ make ${KERNEL_FLAGS} modules && \ make modules-reinstall DESTDIR=${RD}/kernels && \ Index: Makefile.alpha =================================================================== RCS file: /lab/FreeBSD/FreeBSD.cvs/src/sys/conf/Makefile.alpha,v retrieving revision 1.79 diff -c -r1.79 Makefile.alpha *** Makefile.alpha 2000/10/29 09:47:50 1.79 --- Makefile.alpha 2000/11/14 00:42:39 *************** *** 252,258 **** echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks ! sh makelinks && rm -f dontlink kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } --- 252,258 ---- echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks ! sh makelinks; rm -f dontlink kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } *************** *** 309,338 **** MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: ! @mkdir -p ${.OBJDIR}/modules ! cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all modules-depend: @mkdir -p ${.OBJDIR}/modules ! cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend modules-clean: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandir modules-tags: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} --- 309,342 ---- MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: ! @if [ ! -d ${.OBJDIR}/modules ]; then \ ! echo You must run make depend before building modules; \ ! exit 1; \ ! fi ! cd $S/modules; env ${MKMODULESENV} ${MAKE} all modules-depend: @mkdir -p ${.OBJDIR}/modules ! cd $S/modules; env ${MKMODULESENV} ${MAKE} obj ! env ${MKMODULESENV} ${MAKE} depend modules-clean: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} cleandir modules-tags: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} Index: Makefile.i386 =================================================================== RCS file: /lab/FreeBSD/FreeBSD.cvs/src/sys/conf/Makefile.i386,v retrieving revision 1.212 diff -c -r1.212 Makefile.i386 *** Makefile.i386 2000/10/29 09:47:50 1.212 --- Makefile.i386 2000/11/14 00:43:16 *************** *** 212,218 **** echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks ! sh makelinks && rm -f dontlink kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } --- 212,218 ---- echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks ! sh makelinks; rm -f dontlink kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } *************** *** 270,299 **** MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: ! @mkdir -p ${.OBJDIR}/modules ! cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all modules-depend: @mkdir -p ${.OBJDIR}/modules ! cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend modules-clean: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandir modules-tags: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} --- 270,303 ---- MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: ! @if [ ! -d ${.OBJDIR}/modules ]; then \ ! echo You must run make depend before building modules; \ ! exit 1; \ ! fi ! cd $S/modules; env ${MKMODULESENV} ${MAKE} all modules-depend: @mkdir -p ${.OBJDIR}/modules ! cd $S/modules; env ${MKMODULESENV} ${MAKE} obj ! env ${MKMODULESENV} ${MAKE} depend modules-clean: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} cleandir modules-tags: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} Index: Makefile.ia64 =================================================================== RCS file: /lab/FreeBSD/FreeBSD.cvs/src/sys/conf/Makefile.ia64,v retrieving revision 1.4 diff -c -r1.4 Makefile.ia64 *** Makefile.ia64 2000/10/29 09:47:50 1.4 --- Makefile.ia64 2000/11/14 00:45:08 *************** *** 217,223 **** echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks ! sh makelinks && rm -f dontlink kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } --- 217,223 ---- echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks ! sh makelinks; rm -f dontlink kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } *************** *** 274,303 **** MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: ! @mkdir -p ${.OBJDIR}/modules ! cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all modules-depend: @mkdir -p ${.OBJDIR}/modules ! cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend modules-clean: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandir modules-tags: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} --- 274,307 ---- MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: ! @if [ ! -d ${.OBJDIR}/modules ]; then \ ! echo You must run make depend before building modules; \ ! exit 1; \ ! fi ! cd $S/modules; env ${MKMODULESENV} ${MAKE} all modules-depend: @mkdir -p ${.OBJDIR}/modules ! cd $S/modules; env ${MKMODULESENV} ${MAKE} obj ! env ${MKMODULESENV} ${MAKE} depend modules-clean: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} cleandir modules-tags: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} Index: Makefile.pc98 =================================================================== RCS file: /lab/FreeBSD/FreeBSD.cvs/src/sys/conf/Makefile.pc98,v retrieving revision 1.110 diff -c -r1.110 Makefile.pc98 *** Makefile.pc98 2000/11/05 14:31:17 1.110 --- Makefile.pc98 2000/11/14 00:45:55 *************** *** 215,221 **** echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks ! sh makelinks && rm -f dontlink kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } --- 215,221 ---- echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ sort -u | comm -23 - dontlink | \ sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks ! sh makelinks; rm -f dontlink kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } *************** *** 273,302 **** MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: ! @mkdir -p ${.OBJDIR}/modules ! cd $S/modules && env ${MKMODULESENV} ${MAKE} obj all modules-depend: @mkdir -p ${.OBJDIR}/modules ! cd $S/modules && env ${MKMODULESENV} ${MAKE} obj depend modules-clean: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} cleandir modules-tags: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: ! cd $S/modules && env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} --- 273,306 ---- MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} modules: ! @if [ ! -d ${.OBJDIR}/modules ]; then \ ! echo You must run make depend before building modules; \ ! exit 1; \ ! fi ! cd $S/modules; env ${MKMODULESENV} ${MAKE} all modules-depend: @mkdir -p ${.OBJDIR}/modules ! cd $S/modules; env ${MKMODULESENV} ${MAKE} obj ! env ${MKMODULESENV} ${MAKE} depend modules-clean: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} clean modules-cleandepend: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} cleandepend modules-cleandir: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} cleandir modules-tags: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} tags modules-install modules-install.debug: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} install modules-reinstall modules-reinstall.debug: ! cd $S/modules; env ${MKMODULESENV} ${MAKE} install config.o: ${NORMAL_C} To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message