DragonFly commits List (threaded) for 2007-09
DragonFly BSD
DragonFly commits List (threaded) for 2007-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/gnu/usr.bin/cc41/cc_tools Makefile Makefile.gen Makefile.tools src/gnu/usr.bin/cc41/cc_tools/gcov-iov Makefile src/gnu/usr.bin/cc41/cc_tools/genattr Makefile src/gnu/usr.bin/cc41/cc_tools/genattrtab Makefile src/gnu/usr.bin/cc41/cc_tools/gencheck Makefile ...


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Wed, 19 Sep 2007 18:01:27 +0900

On Tue, Aug 28, 2007 at 12:42:23AM -0700, Matthew Dillon wrote:
> 
> :Matthew Dillon wrote:
> :>     This is running for make obj target, before the object directory exists,
> :>     which means that make can't find the object directory at that point in
> :>     the file (because it doesn't exist yet), which means that make's idea
> :>     of .OBJDIR is the source directory.
> :
> :Oh.  I wonder why it worked here then.  I'll see what I can do.
> :
> :cheers
> :  simon
> 
>     I'm guessing your /usr/src is R+W.  Mine is a read-only NFS mount.
> 
>     The following patch fixes the problem, but it's a bit of a hack so
>     I'm assuming you'll be able to come up with something cleaner.
> 
> 					-Matt
> 					Matthew Dillon 
> 					<dillon@backplane.com>

Can you try this one instead?  I only tested it in gnu/usr.bin/cc41 with -j5,
but I believe it works for buildworld, too.

- move mktooldir target into cc_tools/Makefile.tools, and make beforedepend
  depend on it, if ${TOOLGENDIR} doesn't exist yet.  This conditional is
  there only to omit many 'mkdir -p' during depend stage.

Cheers.

Index: cc_tools/Makefile
===================================================================
RCS file: /home/source/dragonfly/cvs/src/gnu/usr.bin/cc41/cc_tools/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- cc_tools/Makefile	25 Aug 2007 15:29:28 -0000	1.2
+++ cc_tools/Makefile	19 Sep 2007 08:03:02 -0000
@@ -10,13 +10,7 @@ SUBDIR+= gcov-iov genchecksum
 #SUBDIR+= fini
 #.endif
 
-.ORDER: mktooldir ${SUBDIR}
-
 .include "Makefile.tools"
-obj depend: mktooldir
-mktooldir:
-	mkdir -p ${TOOLGENDIR}
-
 clean cleandir:
 	rm -rf ${TOOLGENDIR}
 
Index: cc_tools/Makefile.tools
===================================================================
RCS file: /home/source/dragonfly/cvs/src/gnu/usr.bin/cc41/cc_tools/Makefile.tools,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.tools
--- cc_tools/Makefile.tools	25 Aug 2007 15:29:28 -0000	1.2
+++ cc_tools/Makefile.tools	19 Sep 2007 08:04:36 -0000
@@ -4,3 +4,9 @@ MIC= sh ${GCCDIR}/move-if-change
 TOOLGENDIR= ${OTOPDIR}/cc_tools/gen
 .PATH: ${TOOLGENDIR}
 CFLAGS+= -I${TOOLGENDIR}
+
+.if !exists(${TOOLGENDIR})
+beforedepend: mktooldir
+mktooldir:
+	mkdir -p ${TOOLGENDIR}
+.endif



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]