Date: Thu, 25 Oct 2001 20:02:06 +0300 From: Ruslan Ermilov <ru@FreeBSD.ORG> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: alpha@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: cvs commit: src Makefile.inc1 Message-ID: <20011025200206.I41293@sunbay.com> 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 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/types.h>' > 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 <sys/types.h>' > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011025200206.I41293>
