Subject: can't make MAKEDEV
To: None <current-users@NetBSD.org>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: current-users
Date: 11/09/2003 21:28:17
Hello,

In src/etc, "make MAKEDEV" has failed with recent -current. Also I can't make
release by same error.

# cd /usr/src/etc && make MAKEDEV
awk -v ETCDIR="/usr/src/etc" -f /usr/src/etc/MAKEDEV.awk /usr/src/etc/MAKEDEV.tmpl > MAKEDEV
ERROR: 'MACHINE' and 'MACHINE_ARCH' must be set in environment
*** Error code 1

Stop.
make: stopped in /usr/src/etc

Is following patch necessary for src/etc/Makefile?

best regards.

--
 Kouichirou Hiratsuka
   hira@po6.nsk.ne.jp

Index: src/etc/Makefile
===================================================================
RCS file: /cvs/cvsroot/src/etc/Makefile,v
retrieving revision 1.261
diff -u -r1.261 Makefile
--- src/etc/Makefile	26 Oct 2003 23:34:29 -0000	1.261
+++ src/etc/Makefile	9 Nov 2003 12:23:28 -0000
@@ -146,7 +146,9 @@
 
 .PHONY: MAKEDEV
 MAKEDEV:
-	awk -v ETCDIR="${.CURDIR}" -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
+	MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} awk \
+	-v ETCDIR="${.CURDIR}" -f ${.CURDIR}/MAKEDEV.awk \
+	${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
 
 	
 
@@ -541,5 +543,6 @@
 
 clean:
 	-rm -rf ${CDROM.dir} ${CDROM.pathlist} ${OBSOLETE.dir}
+	-rm -f MAKEDEV
 
 .include <bsd.prog.mk>