diff options
author | imp <imp@FreeBSD.org> | 2011-02-10 19:58:21 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2011-02-10 19:58:21 +0000 |
commit | 13e3760d36cd87c1e0eaba90bf4f53bef69199ac (patch) | |
tree | 1ffe43b42f5f40daa452a46da2ba10bc25460183 /Makefile.inc1 | |
parent | f41a2b1387fdec56a01a07c274a63c9d1d6ed95e (diff) | |
download | FreeBSD-src-13e3760d36cd87c1e0eaba90bf4f53bef69199ac.zip FreeBSD-src-13e3760d36cd87c1e0eaba90bf4f53bef69199ac.tar.gz |
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...
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 06d6951..0fd7e24 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -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 <bsd.own.mk> .include <bsd.arch.inc.mk> |