Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2000 09:52:25 +0900
From:      Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
To:        marcel@cup.hp.com
Cc:        current@FreeBSD.ORG, stable@FreeBSD.ORG
Subject:   Re: "make modules" kicks the first module directory twice
Message-ID:  <20001114095225T.matusita@jp.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>

next in thread | previous in thread | raw e-mail | index | archive | help

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




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