New special variable: .RECIPEPREFIX

Allows the user to reset the prefix character for introducing recipe lines
from the default (tab) to any other single character, and back again.
Also, reworked the manual to consistently use the word "recipe" to describe
the set of commands we use to update a target, instead of the various
phrases used in the past: "commands", "command lines", "command scripts",
etc.
This commit is contained in:
Paul Smith
2007-11-04 21:54:00 +00:00
parent c1f71b0336
commit 43d81ff866
16 changed files with 1246 additions and 1080 deletions

View File

@@ -163,7 +163,7 @@ world');
# See Savannah bug # 12124.
run_make_test('deps: ; $(eval deps: foo)', '',
'#MAKEFILE#:1: *** prerequisites cannot be defined in command scripts. Stop.',
'#MAKEFILE#:1: *** prerequisites cannot be defined in recipes. Stop.',
512);
1;

View File

@@ -3,7 +3,7 @@
$description = "Make sure make exits with an error if stdout is full.";
if (-e '/dev/full') {
run_make_test('', '-v > /dev/full', '#MAKE#: write error', 256);
run_make_test('', '-v > /dev/full', '/^#MAKE#: write error/', 256);
}
1;

View File

@@ -50,5 +50,68 @@ all:
# $answer = "X1 =\nX2 = all\nLAST = all foo\n";
# &compare_output($answer, &get_logfile(1));
# Test the .RECIPEPREFIX variable
&run_make_test('
define foo
: foo-one \
foo-two
: foo-three
: foo-four
endef
orig: ; : orig-one
: orig-two \
orig-three \
orig-four \
orig-five \\\\
: orig-six
$(foo)
.RECIPEPREFIX = >
test: ; : test-one
>: test-two \
test-three \
>test-four \
> test-five \\\\
>: test-six
>$(foo)
.RECIPEPREFIX =
reset: ; : reset-one
: reset-two \
reset-three \
reset-four \
reset-five \\\\
: reset-six
$(foo)
',
'orig test reset',
': orig-one
: orig-two \
orig-three \
orig-four \
orig-five \\\\
: orig-six
: foo-one foo-two
: foo-three
: foo-four
: test-one
: test-two \
test-three \
test-four \
test-five \\\\
: test-six
: foo-one foo-two
: foo-three
: foo-four
: reset-one
: reset-two \
reset-three \
reset-four \
reset-five \\\\
: reset-six
: foo-one foo-two
: foo-three
: foo-four');
1;