aboutsummaryrefslogtreecommitdiff
path: root/share/mk/sys.dependfile.mk
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2016-03-11 01:35:39 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2016-03-11 01:35:39 +0000
commitbe19d90b612d233d594d335933c8618e60854713 (patch)
tree1eefb1aee77f4268ae920b1f416feefde0a0000d /share/mk/sys.dependfile.mk
parentc3c6c935fca17c15194dafc56ee3bf4ef9ecd35e (diff)
parentd58aa1959ce6eb99db9e15b1f59db03cfd79069b (diff)
Merge bmake-20160307
Notes
Notes: svn path=/head/; revision=296637
Diffstat (limited to 'share/mk/sys.dependfile.mk')
-rw-r--r--share/mk/sys.dependfile.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/share/mk/sys.dependfile.mk b/share/mk/sys.dependfile.mk
index d12d939750b8..745873f6bfeb 100644
--- a/share/mk/sys.dependfile.mk
+++ b/share/mk/sys.dependfile.mk
@@ -1,5 +1,5 @@
# $FreeBSD$
-# $Id: sys.dependfile.mk,v 1.6 2014/08/02 18:02:06 sjg Exp $
+# $Id: sys.dependfile.mk,v 1.7 2016/02/20 01:57:39 sjg Exp $
#
# @(#) Copyright (c) 2012, Simon J. Gerraty
#
@@ -49,8 +49,10 @@ _e := ${.MAKE.DEPENDFILE_PREFERENCE:@m@${exists($m):?$m:}@}
# MACHINE specific depend files are supported, but *not* default.
# If any already exist, we should follow suit.
_aml = ${ALL_MACHINE_LIST:Uarm amd64 i386 powerpc:N${MACHINE}} ${MACHINE}
-# MACHINE must be the last entry in _aml ;-)
+# make sure we restore MACHINE
+_m := ${MACHINE}
_e := ${_aml:@MACHINE@${.MAKE.DEPENDFILE_PREFERENCE:@m@${exists($m):?$m:}@}@}
+MACHINE := ${_m}
.if !empty(_e)
.MAKE.DEPENDFILE ?= ${.MAKE.DEPENDFILE_PREFERENCE:M*${MACHINE}:[1]}
.endif