Subject: Re: obj dir not created (subdir sendmail/cf/cf)
To: None <tlaronde@polynum.com>
From: Bang Jun-Young <junyoung@netbsd.org>
List: tech-toolchain
Date: 06/21/2005 04:30:51
tlaronde@polynum.com wrote:
> Hello,
> 
> I'm building netbsd-2-0 branch userland.
> 
> My current system (but toolchain is generated):
> NetBSD 2.0.2 i386
> 
> I invoke the build with the following command :
> 
> distribution:
> 	cd $(NETBSDSRCDIR); \
> 	NOCLEANDIR=yes sh $(NETBSDSRCDIR)/build.sh -M $(OBJDIR) -a $(TARGET_ARCH) -X $(X11SRCDIR) -x -U distribution;
> 
> 
> Please note that my NETBSDSRCDIR is _read_only_.
> 
> There is a problem in the make-obj phase, apparently because a subdir
> should be created, while the higher level dir does not exist, namely:
> 
> sendmail/cf/cf/obj
> 
> sendmail/cf not existing.
> 
> [This is just a guess from the log, I have not tracked the intrincacies
> of the make business, so I might be wrong].
> 
> Here is the relevant part of the log:
> 
> ----- LOG
> obj ===> gnu/usr.sbin/sendmail/doc # dir
> obj ===> gnu/usr.sbin/sendmail/doc/op # subdir
> obj ===> gnu/usr.sbin/sendmail/cf/cf # no higher level dir created
> nbmake: don't know how to make obj. Stop
> 
> nbmake: stopped in /usr/src/gnu/usr.sbin/sendmail/cf/cf
> 
> *** Failed target:  obj-cf/cf
> *** Failed command: targ=obj;dir=cf/cf; case "$dir" in /*) echo "$targ ===> $dir"; cd "$dir"; /obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0.2-i386/bin/nbmake "_THISDIR_=$dir/" $targ; ;; *) echo "$targ ===> gnu/usr.sbin/sendmail/$dir"; cd "/usr/src/gnu/usr.sbin/sendmail/$dir"; /obj/polynum.NETBSD-DISTRIB-generic_NetBSD-i386_NetBSD-i386/usr/src/tooldir.NetBSD-2.0.2-i386/bin/nbmake "_THISDIR_=gnu/usr.sbin/sendmail/$dir/" $targ; ;; esac
> *** Error code 2
> 
> Stop.
> nbmake: stopped in /usr/src/gnu/usr.sbin/sendmail
> ----- END LOG
> 
> Since the error might be caused by a blunder on my part, I'd like if
> someone with more knowledge on the toolchain could make the diagnostic
> (the source dir is readonly as previously said [so the error may remain
> unseen in the obj is created in the srcdir where the subdir already
> exists, that's why I give this info in case it may appear to be 
> relevant]).

Can you check if the following patch works (I haven't tested it myself):

Index: Makefile
===================================================================
RCS file: /cvsroot/src/gnu/usr.sbin/sendmail/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	4 Jul 2003 04:52:59 -0000	1.6
+++ Makefile	20 Jun 2005 19:27:38 -0000
@@ -10,10 +10,7 @@
 .endif
 
 .if ${MKSHARE} != "no"
-SUBDIR+=	cf/cf
-.if make(install)
 SUBDIR+=	cf
 .endif
-.endif
 
 .include <bsd.subdir.mk>
Index: cf/Makefile
===================================================================
RCS file: /cvsroot/src/gnu/usr.sbin/sendmail/cf/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- cf/Makefile	19 Sep 2002 03:09:52 -0000	1.5
+++ cf/Makefile	20 Jun 2005 19:27:38 -0000
@@ -7,10 +7,13 @@
 .PATH: ${DIST}/sendmail/cf ${DIST}/sendmail
 
 .if ${MKSHARE} != "no"
+SUBDIR=		cf
+.if make(install)
 FILESDIR=	/usr/share/sendmail
 FILES=		LICENSE README
 
-SUBDIR=		domain feature hack m4 mailer ostype sh siteconfig
+SUBDIR+=	domain feature hack m4 mailer ostype sh siteconfig
+.endif
 .endif
 
 all:

Jun-Young