summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/features/default_names6
-rw-r--r--tests/scripts/features/reinvoke12
-rw-r--r--tests/scripts/functions/foreach2
-rw-r--r--tests/scripts/functions/origin11
-rw-r--r--tests/scripts/options/dash-l2
-rw-r--r--tests/scripts/options/dash-n8
-rw-r--r--tests/scripts/variables/MAKECMDGOALS4
7 files changed, 25 insertions, 20 deletions
diff --git a/tests/scripts/features/default_names b/tests/scripts/features/default_names
index 824f889..501f1fc 100644
--- a/tests/scripts/features/default_names
+++ b/tests/scripts/features/default_names
@@ -1,3 +1,5 @@
+# -*-perl-*-
+
$description = "This script tests to make sure that Make looks for
default makefiles in the correct order (GNUmakefile,makefile,Makefile)";
@@ -13,7 +15,7 @@ close(MAKEFILE);
# DOS/WIN32 platforms preserve case, but Makefile is the same file as makefile.
# Just test what we can here (avoid Makefile versus makefile test).
#
-if ($osname !~ /DOS|Windows/i)
+if ($port_type eq 'UNIX')
{
# Create another makefile called "makefile"
open(MAKEFILE,"> makefile");
@@ -45,7 +47,7 @@ unlink $makefile;
# DOS/WIN32 platforms preserve case, but Makefile is the same file as makefile.
# Just test what we can here (avoid Makefile versus makefile test).
#
-if ($osname !~ /DOS|Windows/i)
+if ($port_type eq 'UNIX')
{
$answer = "It chose makefile\n";
diff --git a/tests/scripts/features/reinvoke b/tests/scripts/features/reinvoke
index 99fb466..713580c 100644
--- a/tests/scripts/features/reinvoke
+++ b/tests/scripts/features/reinvoke
@@ -18,7 +18,7 @@ all: ; \@echo 'running rules.'
$makefile $makefile2: $makefile_orig
\@echo 'rebuilding \$\@.'
- \@touch \$\@
+ \@echo >> \$\@
include $makefile2
@@ -54,11 +54,11 @@ SHELL = /bin/sh
all: ; @echo hello
-a : b ; touch $@
+a : b ; echo >> $@
-b : c ; [ -f $@ ] || touch $@
+b : c ; [ -f $@ ] || echo >> $@
-c: ; touch $@
+c: ; echo >> $@
include $(F)
EOM
@@ -74,7 +74,7 @@ sleep(2);
&run_make_with_options($makefile3, "F=a", &get_logfile, 0);
-$answer = "[ -f b ] || touch b\nhello\n";
+$answer = "[ -f b ] || echo >> b\nhello\n";
&compare_output($answer,&get_logfile(1));
# Now try with the file we're not updating being the actual file we're
@@ -82,7 +82,7 @@ $answer = "[ -f b ] || touch b\nhello\n";
&run_make_with_options($makefile3, "F=b", &get_logfile, 0);
-$answer = "[ -f b ] || touch b\nhello\n";
+$answer = "[ -f b ] || echo >> b\nhello\n";
&compare_output($answer,&get_logfile(1));
unlink('a','b','c');
diff --git a/tests/scripts/functions/foreach b/tests/scripts/functions/foreach
index 0c63c47..b80751b 100644
--- a/tests/scripts/functions/foreach
+++ b/tests/scripts/functions/foreach
@@ -20,7 +20,7 @@ open(MAKEFILE,"> $makefile");
# On WIN32 systems, the user's path is found in %Path% ($Path)
#
-$pathvar = (($osname =~ /Windows/i) ? "Path" : "PATH");
+$pathvar = (($port_type eq 'Windows') ? "Path" : "PATH");
print MAKEFILE <<EOF;
foo = bletch null \@ garf
diff --git a/tests/scripts/functions/origin b/tests/scripts/functions/origin
index 721d928..eab2d78 100644
--- a/tests/scripts/functions/origin
+++ b/tests/scripts/functions/origin
@@ -15,12 +15,13 @@ defined per the following list:
'override' defined by override in makefile
'automatic' Automatic variable\n";
-# On WIN32 systems, HOME is meaningless. SystemRoot should be defined though.
-# With DJGPP, HOME is not guaranteed to be defined. Use DJDIR instead.
+# On WIN32 systems, HOME is meaningless. SystemRoot should be defined
+# though. With DJGPP, HOME is not guaranteed to be defined. Use DJDIR
+# instead.
#
-$homevar = (($osname =~ /Windows/i)
- ? "SystemRoot"
- : (($osname =~ /DOS/i) ? "DJDIR" : "HOME"));
+$homevar = (($port_type eq 'Windows') ? "SystemRoot"
+ : (($port_type eq 'DOS') ? "DJDIR"
+ : "HOME"));
open(MAKEFILE,"> $makefile");
diff --git a/tests/scripts/options/dash-l b/tests/scripts/options/dash-l
index 445b869..58216f9 100644
--- a/tests/scripts/options/dash-l
+++ b/tests/scripts/options/dash-l
@@ -25,7 +25,7 @@ SHELL = /bin/sh
define test
if [ ! -f test-file ]; then \
- touch test-file; sleep 2; rm -f test-file; \
+ echo >> test-file; sleep 2; rm -f test-file; \
else \
echo $@ FAILED; \
fi
diff --git a/tests/scripts/options/dash-n b/tests/scripts/options/dash-n
index 97dac7a..c1f4aab 100644
--- a/tests/scripts/options/dash-n
+++ b/tests/scripts/options/dash-n
@@ -9,8 +9,8 @@ open(MAKEFILE, "> $makefile");
print MAKEFILE <<'EOMAKE';
-final: intermediate ; touch $@
-intermediate: orig ; touch $@
+final: intermediate ; echo >> $@
+intermediate: orig ; echo >> $@
EOMAKE
@@ -19,11 +19,11 @@ close(MAKEFILE);
&touch('orig');
&run_make_with_options($makefile, "", &get_logfile);
-$answer = "touch intermediate\ntouch final\n";
+$answer = "echo >> intermediate\necho >> final\n";
&compare_output($answer, &get_logfile(1));
&run_make_with_options($makefile, "-Worig -n", &get_logfile);
-$answer = "touch intermediate\ntouch final\n";
+$answer = "echo >> intermediate\necho >> final\n";
&compare_output($answer, &get_logfile(1));
unlink('orig', 'intermediate', 'final');
diff --git a/tests/scripts/variables/MAKECMDGOALS b/tests/scripts/variables/MAKECMDGOALS
index ec33358..879283b 100644
--- a/tests/scripts/variables/MAKECMDGOALS
+++ b/tests/scripts/variables/MAKECMDGOALS
@@ -1,4 +1,6 @@
-$description = "The following test creates a makefile to test the MAKECMDGOALS variable.";
+# -*-perl-*-
+
+$description = "Test the MAKECMDGOALS variable.";
$details = "\
We construct a makefile with various targets, all of which print out