From owner-svn-src-all@FreeBSD.ORG Thu Feb 10 19:58:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 979751065672; Thu, 10 Feb 2011 19:58:21 +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 7D3D28FC33; Thu, 10 Feb 2011 19:58:21 +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 p1AJwL8S033061; Thu, 10 Feb 2011 19:58:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1AJwLCq033059; Thu, 10 Feb 2011 19:58:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201102101958.p1AJwLCq033059@svn.freebsd.org> From: Warner Losh Date: Thu, 10 Feb 2011 19:58:21 +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: r218526 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2011 19:58:21 -0000 Author: imp Date: Thu Feb 10 19:58:21 2011 New Revision: 218526 URL: http://svn.freebsd.org/changeset/base/218526 Log: You are now *REQUIRED* to pass both TARGET and TARGET_ARCH to any invocations of Makefile.inc1 (since that's supposed to be an internal interface for world and related targets). Document this with a .error message. For a transition period, support passing in just TARGET, but give a .warning for that case: I plan on removing it in 9.0... Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Feb 10 19:13:54 2011 (r218525) +++ head/Makefile.inc1 Thu Feb 10 19:58:21 2011 (r218526) @@ -28,6 +28,17 @@ # /usr/share/mk. These include: # obj depend all install clean cleandepend cleanobj +# You are supposed to define both of these when calling Makefile.inc1 +# directly. However, some old scripts don't. Cope for the moment, but +# issue a new warning for a transition period. +.if defined(TARGET) && !defined(TARGET_ARCH) +.warning "You must pass both TARGET and TARGET_ARCH to Makefile.inc1. Setting TARGET_ARCH=${TARGET}." +TARGET_ARCH=${TARGET} +.endif +.if !defined(TARGET) || !defined(TARGET_ARCH) +.error "Both TARGET and TARGET_ARCH must be defined." +.endif + .include .include