summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2023-04-01 15:57:04 -0400
committerPaul Smith <psmith@gnu.org>2023-04-02 10:02:18 -0400
commitc2792d6129fe9b13efba159126430d657f447033 (patch)
treee17008438550ba148ae1fb7fc15426b3aac388e6 /src
parenta0d1e76d604df5bd006fd5ed6a69963d3c6b4d7a (diff)
downloadmake-git-c2792d6129fe9b13efba159126430d657f447033.tar.gz
Adjust output strings to be aligned
Change error and fatal messages to start with lowercase and not end with a period. Note a few very common messages were left as-is, just in case some other tools parse them. Also modify the test known-good-output to satisfy the messages.
Diffstat (limited to 'src')
-rw-r--r--src/ar.c8
-rw-r--r--src/arscan.c4
-rw-r--r--src/commands.c10
-rw-r--r--src/expand.c2
-rw-r--r--src/file.c14
-rw-r--r--src/function.c20
-rw-r--r--src/job.c8
-rw-r--r--src/load.c12
-rw-r--r--src/main.c27
-rw-r--r--src/output.c4
-rw-r--r--src/read.c2
-rw-r--r--src/remake.c10
-rw-r--r--src/rule.c2
13 files changed, 61 insertions, 62 deletions
diff --git a/src/ar.c b/src/ar.c
index e6eb0a1e..d7928563 100644
--- a/src/ar.c
+++ b/src/ar.c
@@ -63,7 +63,7 @@ ar_parse_name (const char *name, char **arname_p, char **memname_p)
p = strchr (*arname_p, '(');
/* This is never called unless ar_name() is true so p cannot be NULL. */
if (!p)
- OS (fatal, NILF, "Internal: ar_parse_name: bad name '%s'", *arname_p);
+ OS (fatal, NILF, "INTERNAL: ar_parse_name: bad name '%s'", *arname_p);
*(p++) = '\0';
p[strlen (p) - 1] = '\0';
*memname_p = p;
@@ -148,7 +148,7 @@ ar_touch (const char *name)
switch (ar_member_touch (arname, memname))
{
case -1:
- OS (error, NILF, _("touch: Archive '%s' does not exist"), arname);
+ OS (error, NILF, _("touch: archive '%s' does not exist"), arname);
break;
case -2:
OS (error, NILF, _("touch: '%s' is not a valid archive"), arname);
@@ -158,14 +158,14 @@ ar_touch (const char *name)
break;
case 1:
OSS (error, NILF,
- _("touch: Member '%s' does not exist in '%s'"), memname, arname);
+ _("touch: member '%s' does not exist in '%s'"), memname, arname);
break;
case 0:
val = 0;
break;
default:
OS (error, NILF,
- _("touch: Bad return code from ar_member_touch on '%s'"), name);
+ _("touch: bad return code from ar_member_touch on '%s'"), name);
}
free (arname);
diff --git a/src/arscan.c b/src/arscan.c
index 7ad1fbfa..62e7420b 100644
--- a/src/arscan.c
+++ b/src/arscan.c
@@ -399,11 +399,11 @@ parse_int (const char *ptr, const size_t len, const int base, uintmax_t max,
if (*ptr < '0' || *ptr > maxchar)
OSSS (fatal, NILF,
- _("Invalid %s for archive %s member %s"), type, archive, name);
+ _("invalid %s for archive %s member %s"), type, archive, name);
nv = (val * base) + (*ptr - '0');
if (nv < val || nv > max)
OSSS (fatal, NILF,
- _("Invalid %s for archive %s member %s"), type, archive, name);
+ _("invalid %s for archive %s member %s"), type, archive, name);
val = nv;
++ptr;
}
diff --git a/src/commands.c b/src/commands.c
index eebd63a3..05c164ee 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -376,7 +376,7 @@ chop_commands (struct commands *cmds)
if (nlines == USHRT_MAX)
ON (fatal, &cmds->fileinfo,
- _("Recipe has too many lines (limit %hu)"), nlines);
+ _("recipe has too many lines (limit %hu)"), nlines);
if (nlines == max)
{
@@ -618,11 +618,11 @@ delete_target (struct file *file, const char *on_behalf_of)
{
if (on_behalf_of)
OSS (error, NILF,
- _("*** [%s] Archive member '%s' may be bogus; not deleted"),
+ _("*** [%s] archive member '%s' may be bogus; not deleted"),
on_behalf_of, file->name);
else
OS (error, NILF,
- _("*** Archive member '%s' may be bogus; not deleted"),
+ _("*** archive member '%s' may be bogus; not deleted"),
file->name);
}
return;
@@ -636,9 +636,9 @@ delete_target (struct file *file, const char *on_behalf_of)
{
if (on_behalf_of)
OSS (error, NILF,
- _("*** [%s] Deleting file '%s'"), on_behalf_of, file->name);
+ _("*** [%s] deleting file '%s'"), on_behalf_of, file->name);
else
- OS (error, NILF, _("*** Deleting file '%s'"), file->name);
+ OS (error, NILF, _("*** deleting file '%s'"), file->name);
if (unlink (file->name) < 0
&& errno != ENOENT) /* It disappeared; so what. */
perror_with_name ("unlink: ", file->name);
diff --git a/src/expand.c b/src/expand.c
index a1efa831..3c97f387 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -193,7 +193,7 @@ recursively_expand_for_file (struct variable *v, struct file *file)
if (!v->exp_count)
/* Expanding V causes infinite recursion. Lose. */
OS (fatal, *expanding_var,
- _("Recursive variable '%s' references itself (eventually)"),
+ _("recursive variable '%s' references itself (eventually)"),
v->name);
--v->exp_count;
}
diff --git a/src/file.c b/src/file.c
index f8e4fb91..dc2ea2ae 100644
--- a/src/file.c
+++ b/src/file.c
@@ -269,19 +269,19 @@ rehash_file (struct file *from_file, const char *to_hname)
if (to_file->cmds->fileinfo.filenm != 0)
error (&from_file->cmds->fileinfo,
l + strlen (to_file->cmds->fileinfo.filenm) + INTSTR_LENGTH,
- _("Recipe was specified for file '%s' at %s:%lu,"),
+ _("recipe was specified for file '%s' at %s:%lu,"),
from_file->name, from_file->cmds->fileinfo.filenm,
from_file->cmds->fileinfo.lineno);
else
error (&from_file->cmds->fileinfo, l,
- _("Recipe for file '%s' was found by implicit rule search,"),
+ _("recipe for file '%s' was found by implicit rule search,"),
from_file->name);
l += strlen (to_hname);
error (&from_file->cmds->fileinfo, l,
- _("but '%s' is now considered the same file as '%s'."),
+ _("but '%s' is now considered the same file as '%s'"),
from_file->name, to_hname);
error (&from_file->cmds->fileinfo, l,
- _("Recipe for '%s' will be ignored in favor of the one for '%s'."),
+ _("recipe for '%s' will be ignored in favor of the one for '%s'"),
from_file->name, to_hname);
}
}
@@ -410,7 +410,7 @@ remove_intermediates (int sig)
{
if (sig)
OS (error, NILF,
- _("*** Deleting intermediate file '%s'"), f->name);
+ _("*** deleting intermediate file '%s'"), f->name);
else
{
if (! doneany)
@@ -949,7 +949,7 @@ file_timestamp_cons (const char *fname, time_t stamp, long int ns)
ts = s <= OLD_MTIME ? ORDINARY_MTIME_MIN : ORDINARY_MTIME_MAX;
file_timestamp_sprintf (buf, ts);
OSS (error, NILF,
- _("%s: Timestamp out of range; substituting %s"), f, buf);
+ _("%s: timestamp out of range: substituting %s"), f, buf);
}
return ts;
@@ -1199,7 +1199,7 @@ print_file_data_base (void)
do{ \
if (_p->_n && _p->_n[0] && !strcache_iscached (_p->_n)) \
error (NULL, strlen (_p->name) + CSTRLEN (# _n) + strlen (_p->_n), \
- _("%s: Field '%s' not cached: %s"), _p->name, # _n, _p->_n); \
+ _("%s: field '%s' not cached: %s"), _p->name, # _n, _p->_n); \
}while(0)
static void
diff --git a/src/function.c b/src/function.c
index 5ca28f85..d4636d73 100644
--- a/src/function.c
+++ b/src/function.c
@@ -1184,7 +1184,7 @@ func_error (char *o, char **argv, const char *funcname)
}
default:
- OS (fatal, *expanding_var, "Internal error: func_error: '%s'", funcname);
+ OS (fatal, *expanding_var, "INTERNAL: func_error: '%s'", funcname);
}
/* The warning function expands to the empty string. */
@@ -1669,7 +1669,7 @@ windows32_openpipe (int *pipedes, int errfd, pid_t *pid_p, char **command_argv,
if (hIn == INVALID_HANDLE_VALUE)
{
ON (error, NILF,
- _("windows32_openpipe: DuplicateHandle(In) failed (e=%lu)\n"), e);
+ _("windows32_openpipe: DuplicateHandle(In) failed (e=%lu)"), e);
return -1;
}
}
@@ -1693,14 +1693,14 @@ windows32_openpipe (int *pipedes, int errfd, pid_t *pid_p, char **command_argv,
if (hErr == INVALID_HANDLE_VALUE)
{
ON (error, NILF,
- _("windows32_openpipe: DuplicateHandle(Err) failed (e=%lu)\n"), e);
+ _("windows32_openpipe: DuplicateHandle(Err) failed (e=%lu)"), e);
return -1;
}
}
if (! CreatePipe (&hChildOutRd, &hChildOutWr, &saAttr, 0))
{
- ON (error, NILF, _("CreatePipe() failed (e=%lu)\n"), GetLastError());
+ ON (error, NILF, _("CreatePipe() failed (e=%lu)"), GetLastError());
return -1;
}
@@ -1708,7 +1708,7 @@ windows32_openpipe (int *pipedes, int errfd, pid_t *pid_p, char **command_argv,
if (!hProcess)
{
- O (error, NILF, _("windows32_openpipe(): process_init_fd() failed\n"));
+ O (error, NILF, _("windows32_openpipe(): process_init_fd() failed"));
return -1;
}
@@ -2706,17 +2706,17 @@ define_new_function (const floc *flocp, const char *name,
len = e - name;
if (len == 0)
- O (fatal, flocp, _("Empty function name"));
+ O (fatal, flocp, _("empty function name"));
if (*name == '.' || *e != '\0')
- OS (fatal, flocp, _("Invalid function name: %s"), name);
+ OS (fatal, flocp, _("invalid function name: %s"), name);
if (len > 255)
- OS (fatal, flocp, _("Function name too long: %s"), name);
+ OS (fatal, flocp, _("function name too long: %s"), name);
if (min > 255)
ONS (fatal, flocp,
- _("Invalid minimum argument count (%u) for function %s"), min, name);
+ _("invalid minimum argument count (%u) for function %s"), min, name);
if (max > 255 || (max && max < min))
ONS (fatal, flocp,
- _("Invalid maximum argument count (%u) for function %s"), max, name);
+ _("invalid maximum argument count (%u) for function %s"), max, name);
ent = xmalloc (sizeof (struct function_table_entry));
ent->name = strcache_add (name);
diff --git a/src/job.c b/src/job.c
index bca45529..4df75132 100644
--- a/src/job.c
+++ b/src/job.c
@@ -1110,7 +1110,7 @@ free_child (struct child *child)
output_close (&child->output);
if (!jobserver_tokens)
- ONS (fatal, NILF, "INTERNAL: Freeing child %p (%s) but no tokens left",
+ ONS (fatal, NILF, "INTERNAL: freeing child %p (%s) but no tokens left",
child, child->file->name);
/* If we're using the jobserver and this child is not the only outstanding
@@ -2242,7 +2242,7 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
if (save_fdin >= 0)
{
if (dup2 (save_fdin, FD_STDIN) != FD_STDIN)
- O (fatal, NILF, _("Could not restore stdin"));
+ O (fatal, NILF, _("could not restore stdin"));
else
close (save_fdin);
}
@@ -2250,7 +2250,7 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
if (save_fdout >= 0)
{
if (dup2 (save_fdout, FD_STDOUT) != FD_STDOUT)
- O (fatal, NILF, _("Could not restore stdout"));
+ O (fatal, NILF, _("could not restore stdout"));
else
close (save_fdout);
}
@@ -2258,7 +2258,7 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
if (save_fderr >= 0)
{
if (dup2 (save_fderr, FD_STDERR) != FD_STDERR)
- O (fatal, NILF, _("Could not restore stderr"));
+ O (fatal, NILF, _("could not restore stderr"));
else
close (save_fderr);
}
diff --git a/src/load.c b/src/load.c
index 0f8d1860..91200dfa 100644
--- a/src/load.c
+++ b/src/load.c
@@ -57,7 +57,7 @@ load_object (const floc *flocp, int noerror, const char *ldname,
if (! global_dl)
{
const char *err = dlerror ();
- OS (fatal, flocp, _("Failed to open global symbol table: %s"), err);
+ OS (fatal, flocp, _("failed to open global symbol table: %s"), err);
}
}
@@ -96,14 +96,14 @@ load_object (const floc *flocp, int noerror, const char *ldname,
symp = (load_func_t) dlsym (dlp, "plugin_is_GPL_compatible");
if (! symp)
OS (fatal, flocp,
- _("Loaded object %s is not declared to be GPL compatible"),
+ _("loaded object %s is not declared to be GPL compatible"),
ldname);
symp = (load_func_t) dlsym (dlp, symname);
if (! symp)
{
const char *err = dlerror ();
- OSSS (fatal, flocp, _("Failed to load symbol %s from %s: %s"),
+ OSSS (fatal, flocp, _("failed to load symbol %s from %s: %s"),
symname, ldname, err);
}
@@ -148,7 +148,7 @@ load_file (const floc *flocp, struct file *file, int noerror)
++fp;
if (fp == ep)
- OS (fatal, flocp, _("Empty symbol name for load: %s"), ldname);
+ OS (fatal, flocp, _("empty symbol name for load: %s"), ldname);
/* Make a copy of the ldname part. */
memcpy (new, ldname, l);
@@ -248,7 +248,7 @@ load_file (const floc *flocp, struct file *file UNUSED, int noerror)
{
if (! noerror)
O (fatal, flocp,
- _("The 'load' operation is not supported on this platform"));
+ _("'load' is not supported on this platform"));
return 0;
}
@@ -256,7 +256,7 @@ load_file (const floc *flocp, struct file *file UNUSED, int noerror)
int
unload_file (const char *name UNUSED)
{
- O (fatal, NILF, "INTERNAL: Cannot unload when load is not supported");
+ O (fatal, NILF, "INTERNAL: cannot unload when load is not supported");
}
#endif /* MAKE_LOAD */
diff --git a/src/main.c b/src/main.c
index f4250726..5d6b9e76 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1824,7 +1824,7 @@ main (int argc, char **argv, char **envp)
goto job_setup_complete;
/* Oops: we have jobserver-auth but it's invalid :(. */
- O (error, NILF, _("warning: jobserver unavailable: using -j1. Add '+' to parent make rule."));
+ O (error, NILF, _("warning: jobserver unavailable: using -j1 (add '+' to parent make rule)"));
arg_job_slots = 1;
}
@@ -1832,7 +1832,7 @@ main (int argc, char **argv, char **envp)
the master make of a new jobserver group. */
else if (!restarts)
ON (error, NILF,
- _("warning: -j%d forced in submake: resetting jobserver mode."),
+ _("warning: -j%d forced in submake: resetting jobserver mode"),
argv_slots);
/* We can't use our parent's jobserver, so reset. */
@@ -2082,7 +2082,7 @@ main (int argc, char **argv, char **envp)
Make us the master of a new jobserver group. */
if (!restarts)
ON (error, NILF,
- _("warning: -j%d forced in makefile: resetting jobserver mode."),
+ _("warning: -j%d forced in makefile: resetting jobserver mode"),
arg_job_slots);
/* We can't use our parent's jobserver, so reset. */
@@ -2178,8 +2178,8 @@ main (int argc, char **argv, char **envp)
)
{
O (error, NILF,
- _("Parallel jobs (-j) are not supported on this platform."));
- O (error, NILF, _("Resetting to single job (-j1) mode."));
+ _("parallel jobs (-j) are not supported on this platform"));
+ O (error, NILF, _("resetting to single job (-j1) mode"));
arg_job_slots = INVALID_JOB_SLOTS;
job_slots = 1;
}
@@ -2242,7 +2242,7 @@ main (int argc, char **argv, char **envp)
#ifndef MAKE_SYMLINKS
if (check_symlink_flag)
{
- O (error, NILF, _("Symbolic links not supported: disabling -L."));
+ O (error, NILF, _("symbolic links not supported: disabling -L"));
check_symlink_flag = 0;
}
#endif
@@ -2520,8 +2520,7 @@ main (int argc, char **argv, char **envp)
/* The update failed and this makefile was not
from the MAKEFILES variable, so we care. */
OS (error, &d->floc,
- _("Failed to remake makefile '%s'."),
- d->file->name);
+ _("failed to remake makefile '%s'"), d->file->name);
mtime = file_mtime_no_search (d->file);
any_remade |= (mtime != NONEXISTENT_MTIME
&& mtime != makefile_mtimes[i]);
@@ -2540,11 +2539,11 @@ main (int argc, char **argv, char **envp)
/* An included makefile. We don't need to die, but we
do want to complain. */
OS (error, &d->floc,
- _("Included makefile '%s' was not found."), dnm);
+ _("included makefile '%s' was not found"), dnm);
else
{
/* A normal makefile. We must die later. */
- OS (error, NILF, _("Makefile '%s' was not found"), dnm);
+ OS (error, NILF, _("makefile '%s' was not found"), dnm);
any_failed = 1;
}
}
@@ -2692,7 +2691,7 @@ main (int argc, char **argv, char **envp)
}
if (bad)
O (fatal, NILF,
- _("Couldn't change back to original directory"));
+ _("couldn't change back to original directory"));
}
++restarts;
@@ -2898,7 +2897,7 @@ main (int argc, char **argv, char **envp)
/* If we detected some clock skew, generate one last warning */
if (clock_skew_detected)
O (error, NILF,
- _("warning: Clock skew detected. Your build may be incomplete."));
+ _("warning: clock skew detected: your build may be incomplete"));
/* Exit. */
die (makefile_status);
@@ -3715,7 +3714,7 @@ clean_jobserver (int status)
{
if (status != 2)
ON (error, NILF,
- "INTERNAL: Exiting with %u jobserver tokens (should be 0)!",
+ "INTERNAL: exiting with %u jobserver tokens (should be 0)!",
jobserver_tokens);
else
/* Don't write back the "free" token */
@@ -3733,7 +3732,7 @@ clean_jobserver (int status)
if (tokens != master_job_slots)
ONN (error, NILF,
- "INTERNAL: Exiting with %u jobserver tokens available; should be %u!",
+ "INTERNAL: exiting with %u jobserver tokens available; should be %u!",
tokens, master_job_slots);
reset_jobserver ();
diff --git a/src/output.c b/src/output.c
index 2cf76072..5943370d 100644
--- a/src/output.c
+++ b/src/output.c
@@ -249,7 +249,7 @@ setup_tmpfile (struct output *out)
/* If we failed to create a temp file, disable output sync going forward. */
error:
O (error, NILF,
- _("cannot open output-sync lock file, suppressing output-sync."));
+ _("cannot open output-sync lock file: suppressing output-sync"));
output_close (out);
output_sync = OUTPUT_SYNC_NONE;
@@ -280,7 +280,7 @@ output_dump (struct output *out)
if (!osync_acquire ())
{
O (error, NILF,
- _("warning: Cannot acquire output lock, disabling output sync."));
+ _("warning: cannot acquire output lock: disabling output sync"));
osync_clear ();
}
diff --git a/src/read.c b/src/read.c
index 878a5620..91171081 100644
--- a/src/read.c
+++ b/src/read.c
@@ -1827,7 +1827,7 @@ record_target_var (struct nameseq *filenames, char *defn,
current_variable_set_list = f->variables;
v = try_variable_definition (flocp, defn, origin, 1);
if (!v)
- O (fatal, flocp, _("Malformed target-specific variable definition"));
+ O (fatal, flocp, _("malformed target-specific variable definition"));
current_variable_set_list = global;
}
diff --git a/src/remake.c b/src/remake.c
index dfe981c3..04daf49c 100644
--- a/src/remake.c
+++ b/src/remake.c
@@ -101,7 +101,7 @@ check_also_make (const struct file *file)
for (ad = file->also_make; ad; ad = ad->next)
if (ad->file->last_mtime == NONEXISTENT_MTIME)
OS (error, file->cmds ? &file->cmds->fileinfo : NILF,
- _("warning: pattern recipe did not update peer target '%s'."),
+ _("warning: pattern recipe did not update peer target '%s'"),
ad->file->name);
}
@@ -529,7 +529,7 @@ update_file_1 (struct file *file, unsigned int depth)
int ns = FILE_TIMESTAMP_NS (this_mtime);
if (ns != 0)
OS (error, NILF,
- _("*** Warning: .LOW_RESOLUTION_TIME file '%s' has a high resolution time stamp"),
+ _("*** warning: .LOW_RESOLUTION_TIME file '%s' has a high resolution time stamp"),
file->name);
this_mtime += FILE_TIMESTAMPS_PER_S - 1 - ns;
}
@@ -612,7 +612,7 @@ update_file_1 (struct file *file, unsigned int depth)
if (is_updating (d->file))
{
- OSS (error, NILF, _("Circular %s <- %s dependency dropped."),
+ OSS (error, NILF, _("circular %s <- %s dependency dropped"),
file->name, d->file->name);
if (lastd == 0)
@@ -1177,7 +1177,7 @@ check_dep (struct file *file, unsigned int depth,
if (is_updating (d->file))
{
- OSS (error, NILF, _("Circular %s <- %s dependency dropped."),
+ OSS (error, NILF, _("circular %s <- %s dependency dropped"),
file->name, d->file->name);
if (ld == 0)
{
@@ -1513,7 +1513,7 @@ f_mtime (struct file *file, int search)
else
sprintf (from_now_string, "%.2g", from_now);
OSS (error, NILF,
- _("Warning: File '%s' has modification time %s s in the future"),
+ _("warning: file '%s' has modification time %s s in the future"),
file->name, from_now_string);
clock_skew_detected = 1;
}
diff --git a/src/rule.c b/src/rule.c
index 85b65ff5..bdf04e19 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -616,7 +616,7 @@ print_rule_data_base (void)
/* This can happen if a fatal error was detected while reading the
makefiles and thus count_implicit_rule_limits wasn't called yet. */
if (num_pattern_rules != 0)
- ONN (fatal, NILF, _("BUG: num_pattern_rules is wrong! %u != %u"),
+ ONN (fatal, NILF, "INTERNAL: num_pattern_rules is wrong! %u != %u",
num_pattern_rules, rules);
}
}