mirror of
https://github.com/mirror/make.git
synced 2025-01-27 21:00:22 +08:00
Some VMS fixes sent by John Fowler.
Fix: make flags on some lines of define/endef don't affect other lines
This commit is contained in:
parent
8f2b1e2c7c
commit
5d582d4ba0
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2001-05-02 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* job.c (start_job_command): Don't add define/endef per-line flags
|
||||
to the top-level flags setting.
|
||||
|
||||
2001-04-03 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* arscan.c (VMS_get_member_info,ar_scan) [VMS]: VMS sets the low
|
||||
bit on error, so check for odd return values, not non-0 return
|
||||
values.
|
||||
(VMS_get_member_info): Calculate the timezone differences correctly.
|
||||
Reported by John Fowler <jfowler@nyx.net>.
|
||||
|
||||
2001-01-17 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* variable.c (lookup_variable) [VMS]: When getting values from the
|
||||
|
12
arscan.c
12
arscan.c
@ -66,7 +66,7 @@ VMS_get_member_info (module, rfa)
|
||||
|
||||
status = lbr$set_module (&VMS_lib_idx, rfa, &bufdesc,
|
||||
&bufdesc.dsc$w_length, 0);
|
||||
if (! status)
|
||||
if (! (status & 1))
|
||||
{
|
||||
error (NILF, _("lbr$set_module failed to extract module info, status = %d"),
|
||||
status);
|
||||
@ -79,7 +79,11 @@ VMS_get_member_info (module, rfa)
|
||||
mhd = (struct mhddef *) filename;
|
||||
|
||||
#ifdef __DECC
|
||||
val = decc$fix_time (&mhd->mhd$l_datim);
|
||||
/* John Fowler <jfowler@nyx.net> writes this is needed in his environment,
|
||||
* but that decc$fix_time() isn't documented to work this way. Let me
|
||||
* know if this causes problems in other VMS environments.
|
||||
*/
|
||||
val = decc$fix_time (&mhd->mhd$l_datim) + timezone - daylight*3600;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < module->dsc$w_length; i++)
|
||||
@ -150,7 +154,7 @@ ar_scan (archive, function, arg)
|
||||
|
||||
status = lbr$ini_control (&VMS_lib_idx, &func, &type, 0);
|
||||
|
||||
if (! status)
|
||||
if (! (status & 1))
|
||||
{
|
||||
error (NILF, _("lbr$ini_control failed with status = %d"),status);
|
||||
return -2;
|
||||
@ -161,7 +165,7 @@ ar_scan (archive, function, arg)
|
||||
|
||||
status = lbr$open (&VMS_lib_idx, &libdesc, 0, 0, 0, 0, 0);
|
||||
|
||||
if (! status)
|
||||
if (! (status & 1))
|
||||
{
|
||||
error (NILF, _("unable to open library `%s' to lookup member `%s'"),
|
||||
archive, (char *)arg);
|
||||
|
@ -227,7 +227,7 @@ set_file_variables (file)
|
||||
}
|
||||
|
||||
/* Chop CMDS up into individual command lines if necessary.
|
||||
Also set the `lines_flag' and `any_recurse' members. */
|
||||
Also set the `lines_flags' and `any_recurse' members. */
|
||||
|
||||
void
|
||||
chop_commands (cmds)
|
||||
|
@ -128,7 +128,7 @@ patsubst_expand (o, text, pattern, replace, pattern_percent, replace_percent)
|
||||
unsigned int pattern_prepercent_len, pattern_postpercent_len;
|
||||
unsigned int replace_prepercent_len, replace_postpercent_len = 0;
|
||||
char *t;
|
||||
int len;
|
||||
unsigned int len;
|
||||
int doneany = 0;
|
||||
|
||||
/* We call find_percent on REPLACE before checking PATTERN so that REPLACE
|
||||
|
12
job.c
12
job.c
@ -895,8 +895,14 @@ start_job_command (child)
|
||||
++p;
|
||||
}
|
||||
|
||||
/* Update the file's command flags with any new ones we found. */
|
||||
child->file->cmds->lines_flags[child->command_line - 1] |= flags;
|
||||
/* Update the file's command flags with any new ones we found. We only
|
||||
keep the COMMANDS_RECURSE setting. Even this isn't 100% correct; we are
|
||||
now marking more commands recursive than should be in the case of
|
||||
multiline define/endef scripts where only one line is marked "+". In
|
||||
order to really fix this, we'll have to keep a lines_flags for every
|
||||
actual line, after expansion. */
|
||||
child->file->cmds->lines_flags[child->command_line - 1]
|
||||
|= flags & COMMANDS_RECURSE;
|
||||
|
||||
/* Figure out an argument list from this command line. */
|
||||
|
||||
@ -1580,6 +1586,8 @@ load_too_high ()
|
||||
}
|
||||
user_access ();
|
||||
|
||||
DB (DB_JOBS, ("Current system load = %f (max requested = %f)\n",
|
||||
load, max_load_average));
|
||||
return load >= max_load_average;
|
||||
#endif
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2001-05-02 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* scripts/variables/flavors: Test define/endef scripts where only
|
||||
one of the command lines is quiet.
|
||||
|
||||
2000-06-22 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* scripts/options/dash-q: New file; test the -q option. Includes
|
||||
|
@ -28,7 +28,7 @@ next: ; @echo $x$(space)$y
|
||||
|
||||
define multi
|
||||
@echo hi
|
||||
@echo there
|
||||
echo there
|
||||
endef
|
||||
|
||||
ifdef BOGUS
|
||||
@ -47,7 +47,7 @@ close(MAKEFILE);
|
||||
# -------
|
||||
|
||||
&run_make_with_options($makefile, "", &get_logfile);
|
||||
$answer = "hi\nthere\nHello\n";
|
||||
$answer = "hi\necho there\nthere\nHello\n";
|
||||
&compare_output($answer, &get_logfile(1));
|
||||
|
||||
# TEST #2
|
||||
|
Loading…
Reference in New Issue
Block a user