Mail Archives: djgpp-workers/1999/08/18/07:43:25
On Thu, 12 Aug 1999, Esa A E Peuha wrote:
> Some of these are expected to fail (like the parallel processing test),
> some probably need Make 3.78, and some seem like genuine bugs in the ported
> Make 3.77 (one subtest of features/escape actually crashes Make). The
> following diffs are relative to the package available at this URL:
>
> ftp://alpha.gnu.org/gnu/make/make-test-3.77.90.tar.gz
Sorry for a longish message; there are too many issues to discuss.
Paul, I cc: this thread to you because I think some issues raised
here need to be addressed either by me in the DJGPP port of Make or by
you in the test suite. The goal is to make the test suite work with
the DJGPP port. Esa sent patches that make many tests work; below I
discuss those which didn't work.
I send Esa's patches to Paul in a separate message.
Esa, some of the tests that you said failed for you, worked for me; I
presume this is because I used the pretest of Make 3.78, and built it
with v2.03 library, where the bug in the `system' function is fixed.
The tests that didn't work for me out of the box are:
features/default_names
features/errors
features/echoing
features/parallelism
features/quoting
features/recursion
features/reinvoke
features/targetvars
features/vpathplus
functions/wildcard
options/dash-e
options/dash-I
options/dash-l
targets/clean
targets/INTERMEDIATE
targets/SECONDARY
variables/MAKE
variables/MAKELEVEL
I looked into the failed tests, and I describe below what did I find,
and how I suggest to solve the problems. Please note that my Perl
knowledge is virtually non-existent, so sometimes I cannot even
suggest a solution, only describe the cause for the failure.
The bottom line is that, after applying the patches below, only
features/parallelism, functions/wildcard, and options/dash-e fail for
me (the reasons are explained below).
First, a couple of notes about the top-level scripts. The file README
says to run the tests as in "perl run_make_tests". This didn't work
for me, since the script says "#!/bin/sh" as its first line, and I
don't have a /bin directory. Can we change that line to "#!/bin/perl"
instead? If not, I suggest to say in README that users of non-Unix
systems should run the test like this: "sh ./run_make_tests".
Also, tests where Make exits with a non-zero status print something
like "Error running make (512): ...". 512 comes from this line:
$code = &run_command_with_output($logname,$command);
I don't understand how does Perl get this weird exit status; I'm
guessing that the real exit status is 2, and Perl is somehow shifting
it left by 8 bits, but I don't understand why does it do that. See
also the discussion of features/errors below, which indicates that at
least in that case, the exit code is NOT shifted left.
Another problem is a minor nuisance: the name of the OS comes out
empty on MS-DOS. I think I know why: it's because the invocation of
`uname' from Perl assumes that the default shell is a Unix-style shall
which knows about 2>&1 etc. This assumption is incorrect for DOS, so
all places where such redirection is used should invoke programs via
"sh -c", and they must have the redirection inside the quoted command
that is passed to the shell. For example, here's a patch for
test_driver.pl:
*** test_driver.pl~ Wed Aug 18 10:38:32 1999
--- test_driver.pl Wed Aug 18 10:08:50 1999
***************
*** 185,198 ****
# to not get ugly error messages if uname can't be found.
# Hmmm, BSD/OS 2.0's uname -a is excessively verbose. Let's try it
# with switches first.
! eval "chop (\$osname = `sh -c 'uname -nmsr' 2>&1`)";
if ($osname =~ /not found/i)
{
$osname = "(something unixy with no uname)";
}
elsif ($@ ne "" || $?)
{
! eval "chop (\$osname = `sh -c 'uname -a' 2>&1`)";
if ($@ ne "" || $?)
{
$osname = "(something unixy)";
--- 185,198 ----
# to not get ugly error messages if uname can't be found.
# Hmmm, BSD/OS 2.0's uname -a is excessively verbose. Let's try it
# with switches first.
! eval "chop (\$osname = `sh -c 'uname -nmsr 2>&1'`)";
if ($osname =~ /not found/i)
{
$osname = "(something unixy with no uname)";
}
elsif ($@ ne "" || $?)
{
! eval "chop (\$osname = `sh -c 'uname -a 2>&1'`)";
if ($@ ne "" || $?)
{
$osname = "(something unixy)";
Yet another problem with test_driver.pl is the trick with ".ostest>ick"
file. This works on DOS, because Esa's changes make the script skip this
part (.ostest cannot be created on DOS), but fails on Windows, since `>'
is not allowed in file names. I suggest that the error to create
".ostest>ick" will not be treated as a fatal one, and instead would be
taken as an indication that this is not VOS.
Discussion of individual tests follows:
1) features/default_names
The problem here is that Makefile and makefile map to the same file
on DOS/Windows. The solution I suggest is to generate each
standard makefile just before it is used, as opposed to generating
them all and then running them all:
*** scripts/features/default_names.~0~ Sun Apr 30 09:49:44 1995
--- scripts/features/default_names Mon Aug 16 19:14:14 1999
***************
*** 16,40 ****
close(MAKEFILE);
-
- # Create another makefile called "makefile"
- open(MAKEFILE,"> makefile");
-
- print MAKEFILE "SECOND:\n";
- print MAKEFILE "\t\@echo It chose makefile\n";
-
- close(MAKEFILE);
-
-
- # Create another makefile called "Makefile"
- open(MAKEFILE,"> Makefile");
-
- print MAKEFILE "THIRD:\n";
- print MAKEFILE "\t\@echo It chose Makefile\n";
-
- close(MAKEFILE);
-
-
&run_make_with_options("","",&get_logfile);
# Create the answer to what should be produced by this Makefile
--- 16,21 ----
***************
*** 45,50 ****
--- 26,41 ----
&compare_output($answer,&get_logfile(1)) || &error ("abort
");
unlink $makefile;
+
+
+ # Create another makefile called "makefile"
+ open(MAKEFILE,"> makefile");
+
+ print MAKEFILE "SECOND:\n";
+ print MAKEFILE "\t\@echo It chose makefile\n";
+
+ close(MAKEFILE);
+
$answer = "It chose makefile\n";
***************
*** 55,60 ****
--- 46,60 ----
");
unlink "makefile";
+ # Create another makefile called "Makefile"
+ open(MAKEFILE,"> Makefile");
+
+ print MAKEFILE "THIRD:\n";
+ print MAKEFILE "\t\@echo It chose Makefile\n";
+
+ close(MAKEFILE);
+
+
$answer = "It chose Makefile\n";
&run_make_with_options("","",&get_logfile);
2) features/errors
There are two problems here. First, this line:
$cleanit_error = `$delete_command cleanit 2>&1`;
assumes that `command` is run via a Unixy shell (that's my guess,
otherwise I don't understand how the redirection would work). But
on DOS/Windows, the default shell might not be a Unixy one. I fixed
this by replacing the above line with this:
$cleanit_error = `sh -c "$delete_command cleanit 2>&1"`;
The second problem was with the following line:
$delete_error_code = $? >> 8;
This line assumes that the exit code is in the upper 8 bits of the
status returned by the subsidiary program. This is non-portable;
in particular, DJGPP returns the exit code in the lower 8 bits (so
the shift shouldn't be done). Does Perl have a way for extracting
the exit code in a portable way, using the WEXITSTATUS macro? If
so, the script should use that.
3) features/echoing
This test uses "..." as part of the command line passed to `echo'.
But "..." is a wildcard in DJGPP (it recursively expands to all the
subdirectories of the current directory), so it didn't work. I
changed the command line to make "..." part of another argument:
*** scripts/features/echoing.~0~ Mon Aug 16 18:52:06 1999
--- scripts/features/echoing Tue Aug 17 10:58:52 1999
***************
*** 31,37 ****
# The Contents of the MAKEFILE ...
print MAKEFILE "all: \n";
! print MAKEFILE "\techo This makefile did not clean the dir ... good\n";
print MAKEFILE "clean: \n";
print MAKEFILE "\t\@$delete_command $example\n";
--- 31,37 ----
# The Contents of the MAKEFILE ...
print MAKEFILE "all: \n";
! print MAKEFILE "\techo This makefile did not clean the dir... good\n";
print MAKEFILE "clean: \n";
print MAKEFILE "\t\@$delete_command $example\n";
***************
*** 45,52 ****
# -------
&run_make_with_options($makefile,"",&get_logfile,0);
! $answer = "echo This makefile did not clean the dir ... good\n"
! .`echo This makefile did not clean the dir ... good`;
&compare_output($answer,&get_logfile(1));
--- 45,52 ----
# -------
&run_make_with_options($makefile,"",&get_logfile,0);
! $answer = "echo This makefile did not clean the dir... good\n"
! .`echo This makefile did not clean the dir... good`;
&compare_output($answer,&get_logfile(1));
***************
*** 74,80 ****
# -------
&run_make_with_options($makefile,"-s",&get_logfile,0);
! $answer = `echo This makefile did not clean the dir ... good`;
&compare_output($answer,&get_logfile(1));
--- 74,80 ----
# -------
&run_make_with_options($makefile,"-s",&get_logfile,0);
! $answer = `echo This makefile did not clean the dir... good`;
&compare_output($answer,&get_logfile(1));
4) features/parallelism
This will obviously not work in the DJGPP version. The question is
how to handle this so that the test won't fail. One possibility is
to add a warning message to the DJGPP port of Make saying that -jN
is not supported, and add to the script a few lines that test for
this message being printed, and if it is, skip the test without
failing the suite. Another possibility would be to test for the OS
name in the script and punt the test if it says MS-DOS.
5) features/quoting
The problem here is that quoting is handled differently by the
DJGPP port of make, depending on the shell that is used by the
Makefile. This script assumes a Unixy shell, so it should force
Make into using a Unixy shell:
*** scripts/features/quoting.~0~ Tue Aug 26 17:47:26 1997
--- scripts/features/quoting Mon Aug 16 19:59:38 1999
***************
*** 5,10 ****
--- 5,11 ----
# The Contents of the MAKEFILE ...
+ print MAKEFILE "SHELL = /bin/sh\n";
print MAKEFILE "TEXFONTS = NICEFONT\n";
print MAKEFILE "DEFINES = -DDEFAULT_TFM_PATH=\\\".:\$(TEXFONTS)\\\"\n";
print MAKEFILE "test:\n";
6) features/recursion
There are several problems here. First, one of Esa's patches
(reproduced below) to run_make_tests causes $make_name to be
"make.exe" in the DJGPP version, since it takes the name from an
error message printed by Make:
*** make-test-3.77-90/run_make Tue Jul 20 16:03:08 1999
--- maketest/run_make Thu Aug 12 07:59:36 1999
***************
*** 141,151 ****
$testee_version = $string;
! if ($make_path =~ /$pathsep([^\n$pathsep]*)$/)
{
! $make_name = $1;
}
else
{
! $make_name = $make_path;
}
--- 141,165 ----
$testee_version = $string;
!
! &attach_default_output ("makename.tmp");
! $code = system "$make_path -f /dev/null";
! &detach_default_output;
! $string = &read_file_into_string ("makename.tmp");
! unlink ("makename.tmp");
! $index = index ($string, ": *** No targets. Stop.");
! if ($index > 0)
{
! $make_name = substr ($string, 0, $index);
}
else
{
! if ($make_path =~ /$pathsep([^\n$pathsep]*)$/)
! {
! $make_name = $1;
! }
! else
! {
! $make_name = $make_path;
! }
}
However, messages printed by Make use a string that is different
from the value of $(MAKE), since the latter includes a full path to
the Make executable. I guess $make_name needs to be computed
differently. For example, "makename.tmp" could cause Make to print
the value of $(MAKE).
The second problem is that the DJGPP port didn't convert
backslashes into forward slashes when it computed $(MAKE), which
caused all kinds of weirdness when a sub-Make echoes its name and
this output from `echo' is interpreted by Perl (e.g., \b in c:\bin
is interpreted as a Backspace, and deletes the colon...). The
following patch to Make solves this problem:
1999-08-16 Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
* main.c (main) [__MSDOS__]: Mirror any backslashes in argv[0], to
avoid problems in shell commands that use backslashes as escape
characters.
*** main.c~0 Sun Aug 1 10:43:46 1999
--- main.c Mon Aug 16 20:33:32 1999
***************
*** 944,950 ****
if (print_version_flag)
die (0);
! #if !defined(__MSDOS__) && !defined(VMS)
/* Set the "MAKE_COMMAND" variable to the name we were invoked with.
(If it is a relative pathname with a slash, prepend our directory name
so the result will run the same program regardless of the current dir.
--- 944,950 ----
if (print_version_flag)
die (0);
! #ifndef VMS
/* Set the "MAKE_COMMAND" variable to the name we were invoked with.
(If it is a relative pathname with a slash, prepend our directory name
so the result will run the same program regardless of the current dir.
***************
*** 962,970 ****
--- 962,982 ----
strneq(argv[0], "//", 2))
argv[0] = xstrdup(w32ify(argv[0],1));
#else /* WINDOWS32 */
+ #ifdef __MSDOS__
+ if (strchr (argv[0], '\\'))
+ {
+ char *p;
+
+ argv[0] = xstrdup (argv[0]);
+ for (p = argv[0]; *p; p++)
+ if (*p == '\\')
+ *p = '/';
+ }
+ #else /* !__MSDOS__ */
if (current_directory[0] != '\0'
&& argv[0] != 0 && argv[0][0] != '/' && index (argv[0], '/') != 0)
argv[0] = concat (current_directory, "/", argv[0]);
+ #endif /* !__MSDOS__ */
#endif /* WINDOWS32 */
#endif
The third problem is that run_make_tests sets $mkpath to just
"make", and features/recursion assumes that the value of $(MAKE) is
identical to $mkpath. However, the DJGPP version sets $(MAKE) to the
full path name of the Make executable, so this fails the test. I'm
unsure what is the best way of solving this last problem.
To work around the problems with $mkpath, I've ran the tests with
the -make_path option. This revealed another problem in
run_make_tests: it doesn't know about DOS-style d:/foo/bar absolute
file names, and thinks this is a relative name. The following
patch fixes the problem:
*** run_make_tests.~2~ Mon Aug 16 18:52:06 1999
--- run_make_tests Tue Aug 17 12:10:34 1999
***************
*** 167,173 ****
# start with a slash, but contains one). Thanks for the
# clue, Roland.
! if (index ($make_path, "/") > 0)
{
$mkpath = "$pwd$pathsep$make_path";
}
--- 167,173 ----
# start with a slash, but contains one). Thanks for the
# clue, Roland.
! if (index ($make_path, "/") > 0 && index ($make_path, ":/") != 1)
{
$mkpath = "$pwd$pathsep$make_path";
}
7) features/reinvoke
This script used a file named "reinvoke.mk.orig", which didn't
work on DOS filesystems (more than a single dot in a file name is
not allowed). It also slept only 1 second between touching the
files, which might not be enough on FAT volumes, due to the
2-second granularity of file timestamps. The following changes
solve these two problems:
*** scripts/features/reinvoke.~0~ Wed Aug 13 18:51:38 1997
--- scripts/features/reinvoke Mon Aug 16 20:49:28 1999
***************
*** 11,23 ****
# EXAMPLE: $makefile2 = &get_tmpfile;
$makefile2 = &get_tmpfile;
open(MAKEFILE,"> $makefile");
print MAKEFILE "
all:
\@echo 'running rules.'
! $makefile $makefile2: $makefile.orig
\@echo 'rebuilding \$\@.'
\@touch \$\@
--- 11,24 ----
# EXAMPLE: $makefile2 = &get_tmpfile;
$makefile2 = &get_tmpfile;
+ $makefile_orig = &get_tmpfile;
open(MAKEFILE,"> $makefile");
print MAKEFILE "
all:
\@echo 'running rules.'
! $makefile $makefile2: $makefile_orig
\@echo 'rebuilding \$\@.'
\@touch \$\@
***************
*** 28,36 ****
&touch("$makefile2");
! sleep(1);
! &touch("$makefile.orig");
&run_make_with_options($makefile,
"",
--- 29,37 ----
&touch("$makefile2");
! sleep(2);
! &touch("$makefile_orig");
&run_make_with_options($makefile,
"",
***************
*** 42,48 ****
$answer = "rebuilding $makefile2.\nrebuilding $makefile.\nrunning rules.\n";
&compare_output($answer,&get_logfile(1))
! && unlink "$makefile.orig";
# This tells the test driver that the perl test script executed properly.
1;
--- 43,49 ----
$answer = "rebuilding $makefile2.\nrebuilding $makefile.\nrunning rules.\n";
&compare_output($answer,&get_logfile(1))
! && unlink "$makefile_orig";
# This tells the test driver that the perl test script executed properly.
1;
8) features/targetvars
The Makefile created by this test assumes a Unixy shell (e.g. it
uses $$ to escape a $), so we need this patch:
*** scripts/features/targetvars.~0~ Tue Apr 14 06:43:20 1998
--- scripts/features/targetvars Mon Aug 16 20:57:06 1999
***************
*** 9,14 ****
--- 9,15 ----
open(MAKEFILE,"> $makefile");
print MAKEFILE <<'EOF';
+ SHELL = /bin/sh
export FOO = foo
export BAR = bar
one: override FOO = one
9) features/vpathplus
This also needs "SHELL = /bin/sh" and a 2-second sleep:
*** scripts/features/vpathplus.~0~ Tue Jul 20 19:32:54 1999
--- scripts/features/vpathplus Mon Aug 16 21:40:30 1999
***************
*** 13,18 ****
--- 13,19 ----
print MAKEFILE <<'EOMAKE';
+ SHELL = /bin/sh
.SUFFIXES: .a .b .c .d
.PHONY: general rename notarget intermediate
***************
*** 58,64 ****
($f = $_) =~ s,VP/,$VP,g;
&touch($f);
push(@touchedfiles, $f);
! sleep 1;
}
}
--- 59,65 ----
($f = $_) =~ s,VP/,$VP,g;
&touch($f);
push(@touchedfiles, $f);
! sleep 2;
}
}
10) functions/wildcard
This fails for several reasons. First, it uses file names that
exceed the 8+3 limits on DOS, and are truncated by the OS; this
then causes $(wildcard) to fail because e.g. *.example expands to
nothing. I changed the file names so that they work:
*** scripts/functions/wildcard.~0~ Sat Mar 29 03:37:50 1997
--- scripts/functions/wildcard Mon Aug 16 21:49:42 1999
***************
*** 24,51 ****
# The Contents of the MAKEFILE ...
! print MAKEFILE "print1: ;\@echo \$(wildcard *.example)\n"
."print2: \n"
! ."\t\@echo \$(wildcard ?.example)\n"
! ."\t\@echo \$(wildcard [a-z0-9].example)\n"
! ."\t\@echo \$(wildcard [!A-Za-z_\\\!].example)\n"
."clean: \n"
! ."\t$delete_command \$(wildcard *.example)\n";
# END of Contents of MAKEFILE
close(MAKEFILE);
! &touch("1.example");
! &touch("two.example");
! &touch("3.example");
! &touch("four.example");
! &touch("F.example");
# TEST #1
# -------
! $answer = "1.example 3.example F.example four.example two.example\n";
&run_make_with_options($makefile,"print1",&get_logfile);
--- 24,51 ----
# The Contents of the MAKEFILE ...
! print MAKEFILE "print1: ;\@echo \$(wildcard example.*)\n"
."print2: \n"
! ."\t\@echo \$(wildcard example.?)\n"
! ."\t\@echo \$(wildcard example.[a-z0-9])\n"
! ."\t\@echo \$(wildcard example.[!A-Za-z_\\\!])\n"
."clean: \n"
! ."\t$delete_command \$(wildcard example.*)\n";
# END of Contents of MAKEFILE
close(MAKEFILE);
! &touch("example.1");
! &touch("example.two");
! &touch("example.3");
! &touch("example.for");
! &touch("example.F");
# TEST #1
# -------
! $answer = "example.1 example.3 example.F example.for example.two\n";
&run_make_with_options($makefile,"print1",&get_logfile);
***************
*** 55,63 ****
# TEST #2
# -------
! $answer = "1.example 3.example F.example\n"
! ."1.example 3.example\n"
! ."1.example 3.example\n";
&run_make_with_options($makefile,"print2",&get_logfile);
--- 55,63 ----
# TEST #2
# -------
! $answer = "example.1 example.1 example.F\n"
! ."example.1 example.3\n"
! ."example.1 example.3\n";
&run_make_with_options($makefile,"print2",&get_logfile);
***************
*** 67,74 ****
# TEST #3
# -------
! $answer = "$delete_command 1.example 3.example F.example four.example "
! ."two.example";
if ($vos)
{
$answer .= " \n";
--- 67,74 ----
# TEST #3
# -------
! $answer = "$delete_command example.1 example.3 example.F example.for "
! ."example.two";
if ($vos)
{
$answer .= " \n";
***************
*** 82,88 ****
&compare_output($answer,&get_logfile(1));
! if ((-f "1.example")||(-f "two.example")||(-f "3.example")||(-f "four.example"))
{
$test_passed = 0;
}
--- 82,88 ----
&compare_output($answer,&get_logfile(1));
! if ((-f "example.1")||(-f "example.two")||(-f "example.3")||(-f "example.for"))
{
$test_passed = 0;
}
But there is also another problem: example.F is found when
$(wildcard example.[a-z0-9]) is called, due to the case-insensitive
nature of the filesystem, and example.* finds example.f, not
example.F, because the DJGPP port downcases all DOS file names
(otherwise Unix-born Makefiles will all be broken). Paul, what
feature, exactly, does this file name test? Perhaps if you told me
that, I could find another file name that can test the same
feature(s) without causing trouble on DOS filesystems.
11) options/dash-e
Two problems here: first, $PATH on DOS/Windows includes
semi-colons, so "echo $(PATH)" looks to Make like several commands
separated by semi-colons; the solution is to quote $(PATH):
*** scripts/options/dash-e.~0~ Sun Apr 30 09:49:44 1995
--- scripts/options/dash-e Tue Aug 17 09:08:44 1999
***************
*** 8,14 ****
print MAKEFILE "PATH = .\n"
."all: \n"
! ."\t\@echo \$(PATH)\n";
# END of Contents of MAKEFILE
--- 8,14 ----
print MAKEFILE "PATH = .\n"
."all: \n"
! ."\t\@echo \"\$(PATH)\"\n";
# END of Contents of MAKEFILE
The second problem I don't quite know how to solve best. It is
caused by Perl interpreting \x sequences inside $PATH, probably
when it reads the output of Make. For example, "c:\bin" causes \b
to delete the colon and yields "cin", which is a clear way to a
disaster. I don't know enough Perl to suggest a good solution for
this. Does Perl have some way of reading program's output
literally, without any interpretation of escape sequences?
Incidentally, this test relies on assumptions that I think are
dangerous, even on Unix: it assumes that $ENV{"PATH"} should yield
the same value of $PATH as what Make sees when it is run by Perl.
But this assumption can be easily broken by some site-specific
setup, like various startup files for subsidiary shells and
programs. For example, DJGPP has a special file where each program
can have a section with its private environment variables that
override the settings in the real environment; this file is read
and processed by the startup code. So perhaps a better way would
be to generate two Makefiles, one with PATH = line, the other
without it, and compare the outputs. After all, you don't really
care about the value of $PATH seen by Perl, only about the one seen
by Make, right?
12) options/dash-I
This test uses $mkpath, which is set to just "make", and expects
$(MAKE) to have this value. This is false for the DJGPP port; see
the discussion of features/recursion above. Using -make_path
option when running the suite solves the problem, but I would like
the tests to work correctly even without -make_path.
13) options/dash-l
This test uses a Unixy shell, so it needs to force Make to do so:
*** scripts/options/dash-l.~0~ Sat Jul 10 01:39:46 1999
--- scripts/options/dash-l Tue Aug 17 11:09:52 1999
***************
*** 21,26 ****
--- 21,27 ----
# The Contents of the MAKEFILE ...
print MAKEFILE <<'EOF';
+ SHELL = /bin/sh
define test
if [ ! -f test-file ]; then \
touch test-file; sleep 2; rm -f test-file; \
14) targets/clean
This uses "...", see features/echoing above. Here's the patch:
*** scripts/targets/clean.~0~ Mon Aug 16 18:52:06 1999
--- scripts/targets/clean Tue Aug 17 11:23:52 1999
***************
*** 10,16 ****
# The Contents of the MAKEFILE ...
print MAKEFILE "all: \n";
! print MAKEFILE "\t\@echo This makefile did not clean the dir ... good\n";
print MAKEFILE "clean: \n";
print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
--- 10,16 ----
# The Contents of the MAKEFILE ...
print MAKEFILE "all: \n";
! print MAKEFILE "\t\@echo This makefile did not clean the dir... good\n";
print MAKEFILE "clean: \n";
print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
***************
*** 24,30 ****
&run_make_with_options($makefile,"",&get_logfile,0);
# Create the answer to what should be produced by this Makefile
! $answer = `echo This makefile did not clean the dir ... good`;
&compare_output($answer,&get_logfile(1)) || &error ("abort
");
--- 24,30 ----
&run_make_with_options($makefile,"",&get_logfile,0);
# Create the answer to what should be produced by this Makefile
! $answer = `echo This makefile did not clean the dir... good`;
&compare_output($answer,&get_logfile(1)) || &error ("abort
");
15) targets/INTERMEDIATE
This doesn't sleep enough between creating files, so the DOS
2-second granularity of file timestamps causes it to fail. Here's
a patch:
*** scripts/targets/INTERMEDIATE.~0~ Mon Feb 22 17:59:02 1999
--- scripts/targets/INTERMEDIATE Tue Aug 17 11:46:50 1999
***************
*** 48,54 ****
# TEST #3
! sleep 1;
&touch('foo.f');
&run_make_with_options($makefile,'foo.d',&get_logfile);
--- 48,54 ----
# TEST #3
! sleep 2;
&touch('foo.f');
&run_make_with_options($makefile,'foo.d',&get_logfile);
***************
*** 69,75 ****
# TEST #6
! sleep 1;
&touch('foo.f');
&run_make_with_options($makefile,'foo.c',&get_logfile);
--- 69,75 ----
# TEST #6
! sleep 2;
&touch('foo.f');
&run_make_with_options($makefile,'foo.c',&get_logfile);
16) targets/SECONDARY
Same here:
*** scripts/targets/SECONDARY.~0~ Wed Aug 26 21:44:32 1998
--- scripts/targets/SECONDARY Tue Aug 17 11:48:32 1999
***************
*** 49,55 ****
# TEST #3
! sleep 1;
&touch('foo.f');
&run_make_with_options($makefile,'foo.d',&get_logfile);
--- 49,55 ----
# TEST #3
! sleep 2;
&touch('foo.f');
&run_make_with_options($makefile,'foo.d',&get_logfile);
***************
*** 72,78 ****
# TEST #6
! sleep 1;
&touch('foo.f');
&run_make_with_options($makefile,'foo.c',&get_logfile);
--- 72,78 ----
# TEST #6
! sleep 2;
&touch('foo.f');
&run_make_with_options($makefile,'foo.c',&get_logfile);
17) variables/MAKE
This again uses $mkpath that is set to just "make", and therefore
fails; see features/recursion above.
18) variables/MAKELEVEL
This test needs a Unixy shell (it uses $$ to get a single $):
*** scripts/variables/MAKELEVEL.~0~ Mon Feb 22 18:12:18 1999
--- scripts/variables/MAKELEVEL Tue Aug 17 11:41:42 1999
***************
*** 7,12 ****
--- 7,13 ----
# The Contents of the MAKEFILE ...
print MAKEFILE <<EOF;
+ SHELL = /bin/sh
all:
\t\@echo MAKELEVEL is \$(MAKELEVEL)
\techo \$\$MAKELEVEL
- Raw text -