summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-03-24 21:29:00 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-03-24 21:34:59 +0300
commit036ccd8efa9ca16734b8baf4cc022eacb5d78576 (patch)
tree9338084f941380ef56eda8e52042652d5690656d /tests
parent87e2dd5c98e7bdd770914c2404efd8194778fc93 (diff)
downloadgunmake-036ccd8efa9ca16734b8baf4cc022eacb5d78576.tar.gz
Support SunOS make target-specific variables
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/features/sun-targetvars23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/scripts/features/sun-targetvars b/tests/scripts/features/sun-targetvars
new file mode 100644
index 0000000..157973b
--- /dev/null
+++ b/tests/scripts/features/sun-targetvars
@@ -0,0 +1,23 @@
+# -*-perl-*-
+$description = "Check SunOS make target-specific assignment.";
+
+$details = "In SunOS make mode ':=' is used for target-specific variable, instead of ':'
+Thus, ':=' cannot be used as variable assignment at all.";
+
+# SunOS make mode, $(other) is undefined:
+run_make_test('
+FOO = true
+all: other
+ @echo $(FOO)
+other := FOO = false
+other:
+ @echo $(FOO) $(other)
+',
+'--sun',
+"false\ntrue\n");
+
+# Same file, but in normal mode, $(other) is "FOO = false":
+run_make_test(undef, '', "true FOO = false\ntrue\n");
+
+# This tells the test driver that the perl test script executed properly.
+1;