mirror of
https://github.com/mirror/make.git
synced 2025-01-28 13:20:29 +08:00
* Fix PR/1709.
This commit is contained in:
parent
d5f7eb2897
commit
cbe92a2241
@ -1,3 +1,10 @@
|
|||||||
|
2000-06-21 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* read.c (read_makefile): If we find a semicolon in the target
|
||||||
|
definition, remember where it was. If the line turns out to be a
|
||||||
|
target-specific variable, add back the semicolon and everything
|
||||||
|
after it. Fixes PR/1709.
|
||||||
|
|
||||||
2000-06-19 Paul D. Smith <psmith@gnu.org>
|
2000-06-19 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* config.h-vms.template: #define uintmax_t for this system.
|
* config.h-vms.template: #define uintmax_t for this system.
|
||||||
|
11
read.c
11
read.c
@ -751,7 +751,7 @@ read_makefile (filename, flags)
|
|||||||
|
|
||||||
enum make_word_type wtype;
|
enum make_word_type wtype;
|
||||||
enum variable_origin v_origin;
|
enum variable_origin v_origin;
|
||||||
char *cmdleft, *lb_next;
|
char *cmdleft, *semip, *lb_next;
|
||||||
unsigned int len, plen = 0;
|
unsigned int len, plen = 0;
|
||||||
char *colonp;
|
char *colonp;
|
||||||
|
|
||||||
@ -772,6 +772,7 @@ read_makefile (filename, flags)
|
|||||||
else if (cmdleft != 0)
|
else if (cmdleft != 0)
|
||||||
/* Found one. Cut the line short there before expanding it. */
|
/* Found one. Cut the line short there before expanding it. */
|
||||||
*(cmdleft++) = '\0';
|
*(cmdleft++) = '\0';
|
||||||
|
semip = cmdleft;
|
||||||
|
|
||||||
collapse_continuations (lb.buffer);
|
collapse_continuations (lb.buffer);
|
||||||
|
|
||||||
@ -932,6 +933,14 @@ read_makefile (filename, flags)
|
|||||||
|
|
||||||
if (wtype == w_varassign)
|
if (wtype == w_varassign)
|
||||||
{
|
{
|
||||||
|
/* If there was a semicolon found, add it back, plus anything
|
||||||
|
after it. */
|
||||||
|
if (semip)
|
||||||
|
{
|
||||||
|
*(--semip) = ';';
|
||||||
|
variable_buffer_output (p2 + strlen (p2),
|
||||||
|
semip, strlen (semip)+1);
|
||||||
|
}
|
||||||
record_target_var (filenames, p, two_colon, v_origin, &fileinfo);
|
record_target_var (filenames, p, two_colon, v_origin, &fileinfo);
|
||||||
filenames = 0;
|
filenames = 0;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2000-06-21 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* scripts/features/targetvars: Added a test for PR/1709: allowing
|
||||||
|
semicolons in target-specific variable values.
|
||||||
|
|
||||||
2000-06-19 Paul D. Smith <psmith@gnu.org>
|
2000-06-19 Paul D. Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* scripts/functions/addsuffix: Test for an empty final argument.
|
* scripts/functions/addsuffix: Test for an empty final argument.
|
||||||
|
@ -146,9 +146,27 @@ close(MAKEFILE);
|
|||||||
$answer = "bar baz biz\nbar baz\n";
|
$answer = "bar baz biz\nbar baz\n";
|
||||||
&compare_output($answer, &get_logfile(1));
|
&compare_output($answer, &get_logfile(1));
|
||||||
|
|
||||||
|
# Test #10
|
||||||
|
|
||||||
&run_make_with_options("$makefile3", "one", &get_logfile);
|
&run_make_with_options("$makefile3", "one", &get_logfile);
|
||||||
$answer = "bar biz\n";
|
$answer = "bar biz\n";
|
||||||
&compare_output($answer, &get_logfile(1));
|
&compare_output($answer, &get_logfile(1));
|
||||||
|
|
||||||
|
# Test #11
|
||||||
|
# PR/1709: Test semicolons in target-specific variable values
|
||||||
|
|
||||||
|
$makefile4 = &get_tmpfile;
|
||||||
|
|
||||||
|
open(MAKEFILE, "> $makefile4");
|
||||||
|
print MAKEFILE <<'EOF';
|
||||||
|
foo : FOO = ; ok
|
||||||
|
foo : ; @echo '$(FOO)'
|
||||||
|
EOF
|
||||||
|
close(MAKEFILE);
|
||||||
|
|
||||||
|
&run_make_with_options("$makefile4", "", &get_logfile);
|
||||||
|
$answer = "; ok\n";
|
||||||
|
&compare_output($answer, &get_logfile(1));
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user