summaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2007-11-04 21:54:00 +0000
committerPaul Smith <psmith@gnu.org>2007-11-04 21:54:00 +0000
commit43d81ff8669c3705ca3c61270af4a5c7218c2fe6 (patch)
treeabaa4fc983ce53dc44d006bb66d76a9e99505329 /commands.c
parentc1f71b0336fbeb105363a389dec27902ff9f280e (diff)
downloadgunmake-43d81ff8669c3705ca3c61270af4a5c7218c2fe6.tar.gz
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.
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/commands.c b/commands.c
index f522e9e..93d2e39 100644
--- a/commands.c
+++ b/commands.c
@@ -596,7 +596,7 @@ print_commands (const struct commands *cmds)
{
const char *s;
- fputs (_("# commands to execute"), stdout);
+ fputs (_("# recipe to execute"), stdout);
if (cmds->fileinfo.filenm == 0)
puts (_(" (built-in):"));
@@ -609,15 +609,12 @@ print_commands (const struct commands *cmds)
{
const char *end;
- while (isspace ((unsigned char)*s))
- ++s;
-
end = strchr (s, '\n');
if (end == 0)
end = s + strlen (s);
- printf ("\t%.*s\n", (int) (end - s), s);
+ printf ("%c%.*s\n", cmd_prefix, (int) (end - s), s);
- s = end;
+ s = end + (end[0] == '\n');
}
}