From owner-freebsd-current Thu Oct 25 10: 4:54 2001 Delivered-To: freebsd-current@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id E6EA437B401; Thu, 25 Oct 2001 10:03:47 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id f9PH26Q52001; Thu, 25 Oct 2001 20:02:06 +0300 (EEST) (envelope-from ru) Date: Thu, 25 Oct 2001 20:02:06 +0300 From: Ruslan Ermilov To: Andrew Gallatin Cc: alpha@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: cvs commit: src Makefile.inc1 Message-ID: <20011025200206.I41293@sunbay.com> References: <200110250728.f9P7Suo32144@freefall.freebsd.org> <20011025103739.B62879@sunbay.com> <15320.6175.46379.397080@grasshopper.cs.duke.edu> <20011025171401.A22980@sunbay.com> <15320.12728.912070.130292@grasshopper.cs.duke.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15320.12728.912070.130292@grasshopper.cs.duke.edu>; from gallatin@cs.duke.edu on Thu, Oct 25, 2001 at 11:37:28AM -0400 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Oct 25, 2001 at 11:37:28AM -0400, Andrew Gallatin wrote: > > > x86 sysinstall seems to have a hardcoded reference to /boot. Eg: > > ===> usr.sbin/spray > rm -f .depend > mkdep -f .depend -a -nostdinc -I/usr/obj/i386/home/gallatin/current/src/alpha/usr/include /home/gallatin/current/src/usr.sbin/spray/spray.c > cd /home/gallatin/current/src/usr.sbin/spray; make _EXTRADEPEND > echo spray: /usr/obj/i386/home/gallatin/current/src/alpha/usr/lib/libc.a /usr/obj/i386/home/gallatin/current/src/alpha/usr/lib/librpcsvc.a >> .depend > ===> usr.sbin/sysinstall > rm -f makedevs.tmp > echo '#include ' > makedevs.tmp > ./rtermcap ansi | file2c 'const char termcap_ansi[] = {' ',0};' >> makedevs.tmp > ./rtermcap cons25w | file2c 'const char termcap_cons25w[] = {' ',0};' >> makedevs.tmp > ./rtermcap cons25 | file2c 'const char termcap_cons25[] = {' ',0};' >> makedevs.tmp > ./rtermcap cons25-m | file2c 'const char termcap_cons25_m[] = {' ',0};' >> makedevs.tmp > ./rtermcap cons25r | file2c 'const char termcap_cons25r[] = {' ',0};' >> makedevs.tmp > ./rtermcap cons25r-m | file2c 'const char termcap_cons25r_m[] = {' ',0};' >> makedevs.tmp > ./rtermcap cons25l1 | file2c 'const char termcap_cons25l1[] = {' ',0};' >> makedevs.tmp > ./rtermcap cons25l1-m | file2c 'const char termcap_cons25l1_m[] = {' ',0};' >> makedevs.tmp > ./rtermcap vt100 | file2c 'const char termcap_vt100[] = {' ',0};' >> makedevs.tmp > ./rtermcap xterm | file2c 'const char termcap_xterm[] = {' ',0};' >> makedevs.tmp > file2c 'u_char boot0[] = {' '};' < /boot/boot0 >> makedevs.tmp > cannot open /boot/boot0: no such file > *** Error code 2 > > Stop in /home/gallatin/current/src/usr.sbin/sysinstall. > *** Error code 1 > > Stop in /home/gallatin/current/src/usr.sbin. > *** Error code 1 > > Stop in /home/gallatin/current/src. > *** Error code 1 > > Stop in /home/gallatin/current/src. > *** Error code 1 > > Stop in /home/gallatin/current/src. > That's the bug in Makefile. We can abuse the fact that sys/ is listed first in Makefile.inc1, and use the version from ${.OBJDIR} if it exists. Could you please try this patch: Index: Makefile =================================================================== RCS file: /home/ncvs/src/usr.sbin/sysinstall/Makefile,v retrieving revision 1.117 diff -u -r1.117 Makefile --- Makefile 2001/09/05 07:12:19 1.117 +++ Makefile 2001/10/25 16:59:05 @@ -21,6 +21,27 @@ CLEANFILES= makedevs.c rtermcap rtermcap.tmp dumpnlist CLEANFILES+= keymap.tmp keymap.h +.if ${MACHINE_ARCH} == i386 +.if exists(${.OBJDIR}/../../sys/boot/${MACHINE}/boot0/boot0) +BOOT0= ${.OBJDIR}/../../sys/boot/${MACHINE}/boot0/boot0 +.else +BOOT0= /boot/boot0 +.endif +.if ${MACHINE} == "i386" +.if exists(${.OBJDIR}/../../sys/boot/i386/mbr/mbr) +MBR= ${.OBJDIR}/../../sys/boot/i386/mbr/mbr +.else +MBR= /boot/mbr +.endif +.elif ${MACHINE} == "pc98" +.if exists(${.OBJDIR}/../../sys/boot/pc98/boot0.5/boot0.5) +BOOT05= ${.OBJDIR}/../../sys/boot/pc98/boot0.5/boot0.5 +.else +BOOT05= /boot/boot0.5 +.endif +.endif +.endif + makedevs.c: Makefile rtermcap rm -f makedevs.tmp echo '#include ' > makedevs.tmp @@ -54,17 +75,16 @@ ./rtermcap xterm | \ file2c 'const char termcap_xterm[] = {' ',0};' \ >> makedevs.tmp -.if ${MACHINE} == "i386" - file2c 'u_char boot0[] = {' '};' < /boot/boot0 >> makedevs.tmp +.if ${MACHINE_ARCH} == i386 + file2c 'u_char boot0[] = {' '};' < ${BOOT0} >> makedevs.tmp echo "size_t boot0_size = sizeof(boot0);" >> makedevs.tmp - file2c 'u_char mbr[] = {' '};' < /boot/mbr >> makedevs.tmp +.if ${MACHINE} == i386 + file2c 'u_char mbr[] = {' '};' < ${MBR} >> makedevs.tmp echo "size_t mbr_size = sizeof(mbr);" >> makedevs.tmp -.endif -.if ${MACHINE} == "pc98" - file2c 'u_char boot0[] = {' '};' < /boot/boot0 >> makedevs.tmp - echo "size_t boot0_size = sizeof(boot0);" >> makedevs.tmp - file2c 'u_char boot05[] = {' '};' < /boot/boot0.5 >> makedevs.tmp +.elif ${MACHINE} == "pc98" + file2c 'u_char boot05[] = {' '};' < ${BOOT05} >> makedevs.tmp echo "size_t boot05_size = sizeof(boot05);" >> makedevs.tmp +.endif .endif mv makedevs.tmp makedevs.c Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message