Module Name:    src
Committed By:   uwe
Date:           Wed Jan 10 18:15:18 UTC 2018

Modified Files:
        src/distrib/sets: sets.subr

Log Message:
When we ask make about MACHINE_CPU and TARGET_ENDIANNESS make sure we
use the right bsd.*.mk files.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 src/distrib/sets/sets.subr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.181 src/distrib/sets/sets.subr:1.182
--- src/distrib/sets/sets.subr:1.181	Wed Nov 22 23:14:01 2017
+++ src/distrib/sets/sets.subr	Wed Jan 10 18:15:18 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.181 2017/11/22 23:14:01 kre Exp $
+#	$NetBSD: sets.subr,v 1.182 2018/01/10 18:15:18 uwe Exp $
 #
 
 #
@@ -179,7 +179,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.181 2017/11/22 23:14:01 kre Exp $
+# 	# $NetBSD: sets.subr,v 1.182 2018/01/10 18:15:18 uwe Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -605,11 +605,10 @@ print_set_lists()
 #
 arch_to_cpu()
 {
-	MAKEFLAGS= MAKEVERBOSE= MACHINE_ARCH=${1} ${MAKE} -B -f- all <<EOMAKE
-.include <bsd.own.mk>
-all:
-	@echo \${MACHINE_CPU}
-EOMAKE
+	MACHINE_ARCH=${1} MAKEFLAGS= \
+	${MAKE} -m ${NETBSDSRCDIR}/share/mk \
+		-f ${NETBSDSRCDIR}/share/mk/bsd.own.mk \
+		-V '${MACHINE_CPU}'
 }
 
 # arch_to_endian mach
@@ -619,11 +618,10 @@ EOMAKE
 #
 arch_to_endian()
 {
-	MAKEFLAGS= MAKEVERBOSE= MACHINE_ARCH=${1} ${MAKE} -B -f- all <<EOMAKE
-.include <bsd.endian.mk>
-all:
-	@echo \${TARGET_ENDIANNESS}
-EOMAKE
+	MACHINE_ARCH=${1} MAKEFLAGS= \
+	${MAKE} -m ${NETBSDSRCDIR}/share/mk \
+		-f ${NETBSDSRCDIR}/share/mk/bsd.endian.mk \
+		-V '${TARGET_ENDIANNESS}'
 }
 
 #####

Reply via email to