summaryrefslogtreecommitdiff
path: root/job.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 /job.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 'job.c')
-rw-r--r--job.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/job.c b/job.c
index c877dca..6fc3054 100644
--- a/job.c
+++ b/job.c
@@ -1724,13 +1724,13 @@ new_job (struct file *file)
++jobserver_tokens;
/* The job is now primed. Start it running.
- (This will notice if there are in fact no commands.) */
+ (This will notice if there is in fact no recipe.) */
if (cmds->fileinfo.filenm)
- DB (DB_BASIC, (_("Invoking commands from %s:%lu to update target `%s'.\n"),
+ DB (DB_BASIC, (_("Invoking recipe from %s:%lu to update target `%s'.\n"),
cmds->fileinfo.filenm, cmds->fileinfo.lineno,
c->file->name));
else
- DB (DB_BASIC, (_("Invoking builtin commands to update target `%s'.\n"),
+ DB (DB_BASIC, (_("Invoking builtin recipe to update target `%s'.\n"),
c->file->name));
@@ -2461,9 +2461,6 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
*(ap++) = *(p++);
*(ap++) = *p;
}
- /* If there's a command prefix char here, skip it. */
- if (p[1] == cmd_prefix)
- ++p;
}
else if (*p == '\n' && restp != NULL)
{
@@ -2511,11 +2508,6 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
/* Throw out the backslash and newline. */
++p;
- /* If there is a command prefix after a backslash-newline,
- remove it. */
- if (p[1] == cmd_prefix)
- ++p;
-
/* If there's nothing in this argument yet, skip any
whitespace before the start of the next word. */
if (ap == new_argv[i])
@@ -2743,9 +2735,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
}
else if (*p == '\\' && p[1] == '\n')
{
- /* POSIX says we keep the backslash-newline, but throw out
- the next char if it's a TAB. If we don't have a POSIX
- shell on DOS/Windows/OS2, mimic the pre-POSIX behavior
+ /* POSIX says we keep the backslash-newline. If we don't have a
+ POSIX shell on DOS/Windows/OS2, mimic the pre-POSIX behavior
and remove the backslash/newline. */
#if defined (__MSDOS__) || defined (__EMX__) || defined (WINDOWS32)
# define PRESERVE_BSNL unixy_shell
@@ -2758,11 +2749,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
*(ap++) = '\\';
*(ap++) = '\n';
}
-
++p;
- if (p[1] == cmd_prefix)
- ++p;
-
continue;
}
@@ -2849,12 +2836,7 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
while (*q != '\0')
{
if (q[0] == '\\' && q[1] == '\n')
- {
- q += 2; /* remove '\\' and '\n' */
- /* Remove any command prefix in the next line */
- if (q[0] == cmd_prefix)
- q++;
- }
+ q += 2; /* remove '\\' and '\n' */
else
*p++ = *q++;
}