summaryrefslogtreecommitdiff
path: root/tests/scripts/functions/origin
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-03-10 02:20:45 +0000
committerPaul Smith <psmith@gnu.org>2006-03-10 02:20:45 +0000
commit6d8d9b74d9c50cb07fe952ac0929f618e4280a55 (patch)
tree2ba40ec88c9a4f3445fbc8f6dc6a3de7760ac604 /tests/scripts/functions/origin
parentafc4906acaeb7191e4ec085d7be4ca5b036b821d (diff)
downloadgunmake-6d8d9b74d9c50cb07fe952ac0929f618e4280a55.tar.gz
Numerous updates to tests for issues found on Cygwin and Windows.
Revert a fix for $? including non-existent files as it shows a bug in the Linux kernel build. Give them a release to fix this. Add some changes from Eli Z. for Windows changes.
Diffstat (limited to 'tests/scripts/functions/origin')
-rw-r--r--tests/scripts/functions/origin44
1 files changed, 17 insertions, 27 deletions
diff --git a/tests/scripts/functions/origin b/tests/scripts/functions/origin
index 49e6f38..f7b7eb8 100644
--- a/tests/scripts/functions/origin
+++ b/tests/scripts/functions/origin
@@ -18,34 +18,24 @@ defined per the following list:
# Set an environment variable
$extraENV{MAKETEST} = 1;
-open(MAKEFILE,"> $makefile");
-
-print MAKEFILE <<EOF;
+run_make_test('
foo := bletch garf
-auto_var = udef CC MAKETEST MAKE foo CFLAGS WHITE \@
-av = \$(foreach var, \$(auto_var), \$(origin \$(var)) )
+auto_var = undefined CC MAKETEST MAKE foo CFLAGS WHITE @
+av = $(foreach var, $(auto_var), $(origin $(var)) )
override WHITE := BLACK
all: auto
-\t\@echo \$(origin undefined)
-\t\@echo \$(origin CC)
-\t\@echo \$(origin MAKETEST)
-\t\@echo \$(origin MAKE)
-\t\@echo \$(origin foo)
-\t\@echo \$(origin CFLAGS)
-\t\@echo \$(origin WHITE)
-\t\@echo \$(origin \@)
+ @echo $(origin undefined)
+ @echo $(origin CC)
+ @echo $(origin MAKETEST)
+ @echo $(origin MAKE)
+ @echo $(origin foo)
+ @echo $(origin CFLAGS)
+ @echo $(origin WHITE)
+ @echo $(origin @)
auto :
-\t\@echo \$(av)
-EOF
-
-close(MAKEFILE);
-
-&run_make_with_options($makefile,
- "-e WHITE=WHITE CFLAGS=",
- &get_logfile);
-
-# Create the answer to what should be produced by this Makefile
-$answer = "undefined default environment default file command line override automatic
+ @echo $(av)',
+ '-e WHITE=WHITE CFLAGS=',
+ 'undefined default environment default file command line override automatic
undefined
default
environment
@@ -53,9 +43,9 @@ default
file
command line
override
-automatic\n";
-
+automatic');
-&compare_output($answer,&get_logfile(1));
+# Reset an environment variable
+delete $extraENV{MAKETEST};
1;