From owner-svn-src-head@FreeBSD.ORG Mon Jan 3 22:48:01 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66A83106564A; Mon, 3 Jan 2011 22:48:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 565668FC18; Mon, 3 Jan 2011 22:48:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p03Mm1e3007685; Mon, 3 Jan 2011 22:48:01 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p03Mm14W007683; Mon, 3 Jan 2011 22:48:01 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201101032248.p03Mm14W007683@svn.freebsd.org> From: Warner Losh Date: Mon, 3 Jan 2011 22:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216934 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2011 22:48:01 -0000 Author: imp Date: Mon Jan 3 22:48:01 2011 New Revision: 216934 URL: http://svn.freebsd.org/changeset/base/216934 Log: When TARGET_ARCH_${kernel} gets set, it is using the host's config, not the one we build as part of make world. This means that make universe will fail if building on a too-old current or any stable system prior to a few days ago in weird ways (parse errors from shell). This copes with these old systems in two ways: (1) Works around the WARNING: issue by filtering all warnings that sneak onto stdout. (2) if TARGET_ARCH_${kernel} winds up being empty, then we error out immediately with a semi-useful error message. This usually comes from config not groking -m. Ideally, we'd use a buildworld's config here, but that's tricky, so I'll leave that detail to others to fix (it has to be done post make world for the arch rather than at the top level makefile). This should make 'make universe' usable from recent 8-stable systems (recent == last few months or so) for building -current. They have -m, but spewed warnings out stdout. Older systems will now at least get a firm error early rather than a confusing error late. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Mon Jan 3 22:25:34 2011 (r216933) +++ head/Makefile Mon Jan 3 22:48:01 2011 (r216934) @@ -351,7 +351,10 @@ universe_kernconfs: .for kernel in ${KERNCONFS} TARGET_ARCH_${kernel}!= cd ${.CURDIR}/sys/${TARGET}/conf && \ config -m ${.CURDIR}/sys/${TARGET}/conf/${kernel} 2> /dev/null | \ - cut -f 2 + grep -v WARNING: | cut -f 2 +.if empty(TARGET_ARCH_${kernel}) +.error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old." +.endif universe_kernconfs: universe_kernconf_${TARGET}_${kernel} universe_kernconf_${TARGET}_${kernel}: @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \