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
commit3870944eb57702d6de534183d9ff77f94fcf0c5d (patch)
treeabaa4fc983ce53dc44d006bb66d76a9e99505329 /commands.c
parent70e8a8dd37d6acc81a64869f872c1f8185a73506 (diff)
downloadmake-3870944eb57702d6de534183d9ff77f94fcf0c5d.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 f522e9e1..93d2e39a 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');
}
}