+= is even more magical than I thought
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 09 Feb 2009 16:55:52 -0500
changeset 68 6e86f2c1921a
parent 67 63531e755f52
child 69 1a4ff1289645
push id40
push userbsmedberg@mozilla.com
push dateMon, 09 Feb 2009 22:17:35 +0000
+= is even more magical than I thought
tests/var-set.mk
--- a/tests/var-set.mk
+++ b/tests/var-set.mk
@@ -1,17 +1,33 @@
+#T commandline: ['OBASIC=oval']
+
+BASIC = val
+
 TEST = $(TEST)
 
 TEST2 = $(TES
 TEST2 += T)
 
 TES T = val
 
-SETVAR = foo
-SETVAR += var baz 
+RECVAR = foo
+RECVAR += var baz 
+
+IMMVAR = bloo
 
-all: SETVAR += bam
+all: BASIC = valall
+all: RECVAR += $(BASIC)
+all: IMMVAR += $(BASIC)
+all: UNSET += more
+all: OBASIC += allmore
+
+RECVAR = blimey
+IMMVAR := blaz
 
 all:
 	test "$(TEST2)" = "val"
-	test "$(SETVAR)" = "foo var baz  bam"
 	test '$(value TEST2)' = '$$(TES T)'
+	test "$(RECVAR)" = "blimey valall"
+	test "$(IMMVAR)" = "blaz valall"
+	test "$(UNSET)" = "more"
+	test "$(OBASIC)" = "oval"
 	@echo TEST-PASS