Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2011 23:33:49 +0000 (UTC)
From:      "David E. O'Brien" <obrien@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222295 - head/tools/build/make_check
Message-ID:  <201105252333.p4PNXnZ2034794@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: obrien
Date: Wed May 25 23:33:49 2011
New Revision: 222295
URL: http://svn.freebsd.org/changeset/base/222295

Log:
  + Tighten up (and simplify) the pass_cmd_vars_1 "variable definition arrived
    from the calling make" test.
  + Be more tolerant of newlines in the plus_flag "supports the '+' flag" test.

Modified:
  head/tools/build/make_check/Makefile

Modified: head/tools/build/make_check/Makefile
==============================================================================
--- head/tools/build/make_check/Makefile	Wed May 25 21:53:25 2011	(r222294)
+++ head/tools/build/make_check/Makefile	Wed May 25 23:33:49 2011	(r222295)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.MAKE.MODE=	normal
+
 # Test for broken LHS expansion.
 # This *must* cause make(1) to detect a recursive variable, and fail as such.
 .if make(lhs_expn)
@@ -152,24 +154,19 @@ pass_cmd_vars:
 	@${SMAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_4
 .endif
 
-.if make(pass_cmd_vars_1)
+#
 # Check that the variable definition arrived from the calling make
+#
+.if make(pass_cmd_vars_1)
+# These values should get overridden by the commandline
+CMD1=oops1
+CMD2=oops2
 pass_cmd_vars_1:
 	@:
 
 .if ${CMD1} != cmd1 || ${CMD2} != cmd2
 .error variables not passed through MAKEFLAGS
 .endif
-
-# Check that the variable definition is in MAKEFLAGS
-.if ${.MAKEFLAGS:MCMD1=*} != "CMD1=cmd1" || ${.MAKEFLAGS:MCMD2=*} != "CMD2=cmd2"
-.error variable assignment not found in $${MAKEFLAGS}
-.endif
-
-# Check that the variable definition is not in MFLAGS
-.if ${MFLAGS:MCMD1=*} != "" || ${MFLAGS:MCMD2=*} != ""
-.error variable assignment found in $${MFLAGS}
-.endif
 .endif
 
 .if make(pass_cmd_vars_2)
@@ -228,7 +225,7 @@ pass_cmd_vars_4_1:
 #
 .if make(plus_flag)
 OUT != ${SMAKE} -n plus_flag_1
-.if ${OUT} != "/tmp"
+.if ${OUT:M/tmp} != "/tmp"
 .error make doesn't handle + flag
 .endif
 plus_flag:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105252333.p4PNXnZ2034794>