Wed 01 Mar 2006 08:27:08 PM UTC, comment #1:
In rethinking my proposed solution, I don't like the idea of
simply skipping the test. Instead, I thought a better solution would be to try it with .PHONY : $(path)foo
But, unfortunately, this gives the same error as original:
make: stat: p:foo: No medium found
Should make really be trying to stat $(path)foo when it has been declared as .PHONY?
Here is the relevant section of my revised tests/features/escape, complete file also attached:
[...]
print MAKEFILE <<'EOF';
$(path)foo : ; @echo cp $^ $@
foo\ bar: ; @echo 'touch "$@"'
sharp: foo\#bar.ext
foo\#bar.ext: ; @echo foo\#bar.ext = '$@'
# for bug #15947:
ifdef port_type
.PHONY : $(path)foo
endif
#$(warning path=$(path))
#$(warning port_type=$(port_type))
EOF
[...]
# TEST 3: This one should work, since we escape the ":".
if (false){
# 2006.03.01 -unavailable- - avoid test entirely? - poor 'fix' for bug #15947:
# CAVEAT: this may also fail on other systems. May need to filter out other $port_type values
if ($port_type != 'W32' && $port_type != 'DOS')
{
# TEST 3: This one should work, since we escape the ":".
&run_make_with_options($makefile, "'path=p\\:'", &get_logfile, 0);
$answer = "cp p:foo\n";
&compare_output($answer,&get_logfile(1));
}
} else {
# 2006.03.01 -unavailable- - shouldn't this should work using .PHONY ?
# - fails to fix error of 'make: stat: p:foo: No medium found' in Cygwin
$escape_options = "'path=p\\:'";
if ($port_type == 'W32' || $port_type == 'DOS')
{
# for bug #15947:
$escape_options .= " 'port_type=$port_type'";
}
&run_make_with_options($makefile, $escape_options, &get_logfile, 0);
$answer = "cp p:foo\n";
&compare_output($answer,&get_logfile(1));
}
--- RESULT:
[greg@x2 tests]$ ./run_make_tests features/escape
[...]
features/escape ......................................... FAILED (5/6 passed)
1 Test in 1 Category Failed (See .diff files in work dir for details) :-(
--- FILE: escape.diff.2:
- work/features/escape.base.2 Wed Mar 1 12:13:52 2006
--- work/features/escape.log.2 Wed Mar 1 12:13:52 2006
***************
--- 1,3 ----
+ make: stat: p:foo: No medium found
cp p:foo
+ make: stat: p:foo: No medium found
|