Subject: fpsp and non-standard build directories
To: None <port-m68k@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: port-m68k
Date: 12/07/2000 23:11:42
Folks,

I tried to build a hp300 kernel and it wanted to put the object files
for fpsp in the sys/arch/m68k/fpsp directory itself, which failed
miserably on my read-only nfs mounted source tree (I build kernels in
/usr/obj/sys/arch/... on all my machines).  The trailing patches fix
this for me - anyone see any problems before I commit them?

Simon.
[ Please CC replies to me - I'm not (yet) on port-m68k. ]
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Sales, Support and Service:  http://www.wasabisystems.com/



Index: Makefile
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/m68k/fpsp/Makefile,v
retrieving revision 1.7
diff -d -p -u -r1.7 Makefile
--- Makefile	1997/09/18 22:55:56	1.7
+++ Makefile	2000/12/07 12:04:03
@@ -67,10 +67,22 @@ PREFIX		= L_
 
 .SUFFIXES:	.o .s .sa .defs .h
 
+.if defined(FPSPDIR)
+.PATH.h:	${FPSPDIR}
+.PATH.sa:	${FPSPDIR}
+.PATH.s:	${FPSPDIR}
+.PATH.defs:	${FPSPDIR}
+ASM2GAS?=	${FPSPDIR}/asm2gas
+AS+=		-I${FPSPDIR}
+.else
+ASM2GAS?=	${.CURDIR}/asm2gas
+.endif
+
+
 .sa.s:
-	sh ${.CURDIR}/asm2gas ${.IMPSRC} >${.TARGET}
+	sh ${ASM2GAS} ${.IMPSRC} >${.TARGET}
 .h.defs:
-	sh ${.CURDIR}/asm2gas ${.IMPSRC} >${.TARGET}
+	sh ${ASM2GAS} ${.IMPSRC} >${.TARGET}
 .s.o:
 	$(AS) -o ${.TARGET} ${.IMPSRC}
 
Index: Makefile.inc
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/m68k/fpsp/Makefile.inc,v
retrieving revision 1.11
diff -d -p -u -r1.11 Makefile.inc
--- Makefile.inc	2000/05/14 14:13:56	1.11
+++ Makefile.inc	2000/12/07 12:04:04
@@ -27,7 +27,7 @@ FPSP!=	printf "\#include \"opt_fpsp.h\"\
 #	    LD=${LD:Q} STRIP=${STRIP:Q} \
 
 FPSPMAKE= \
-	cd ${FPSPDIR} && MAKEOBJDIR=${FPSPDST} ${MAKE} .OBJDIR=${FPSPDST} \
+	cd ${FPSPDST} && ${MAKE} -f ${FPSPDIR:Q}/Makefile \
 	    MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
 	    FPSPCPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
 	    FPSPMISCCPPFLAGS=${FPSPMISCCPPFLAGS:Q} \