diff options
author | Paul Smith <psmith@gnu.org> | 2007-11-04 21:54:00 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2007-11-04 21:54:00 +0000 |
commit | 43d81ff8669c3705ca3c61270af4a5c7218c2fe6 (patch) | |
tree | abaa4fc983ce53dc44d006bb66d76a9e99505329 /commands.c | |
parent | c1f71b0336fbeb105363a389dec27902ff9f280e (diff) | |
download | gunmake-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.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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'); } } |