version 1.94, 2007/09/18 08:46:10 |
version 1.95, 2007/09/23 09:47:56 |
|
|
static void lookup_sysv_include(const char *, const char *); |
static void lookup_sysv_include(const char *, const char *); |
static void lookup_conditional_include(const char *, const char *); |
static void lookup_conditional_include(const char *, const char *); |
static bool parse_as_special_line(Buffer, Buffer, const char *); |
static bool parse_as_special_line(Buffer, Buffer, const char *); |
|
static int parse_operator(const char **); |
|
|
static const char *parse_do_targets(Lst, int *, const char *); |
static const char *parse_do_targets(Lst, int *, const char *); |
static void parse_target_line(struct growableArray *, const char *, |
static void parse_target_line(struct growableArray *, const char *, |
|
|
} |
} |
} |
} |
|
|
|
static int |
|
parse_operator(const char **pos) |
|
{ |
|
const char *cp = *pos; |
|
int op = OP_ERROR; |
|
|
|
if (*cp == '!') { |
|
op = OP_FORCE; |
|
} else if (*cp == ':') { |
|
if (cp[1] == ':') { |
|
op = OP_DOUBLEDEP; |
|
cp++; |
|
} else { |
|
op = OP_DEPENDS; |
|
} |
|
} else { |
|
Parse_Error(PARSE_FATAL, "Missing dependency operator"); |
|
return OP_ERROR; |
|
} |
|
|
|
cp++; /* Advance beyond operator */ |
|
|
|
/* Get to the first source */ |
|
while (isspace(*cp)) |
|
cp++; |
|
*pos = cp; |
|
return op; |
|
} |
|
|
/*- |
/*- |
*--------------------------------------------------------------------- |
*--------------------------------------------------------------------- |
* ParseDoDependency -- |
* ParseDoDependency -- |
|
|
if (cp == NULL || specType == SPECIAL_ERROR) |
if (cp == NULL || specType == SPECIAL_ERROR) |
return; |
return; |
|
|
/* Have now parsed all the target names. Must parse the operator next. |
op = parse_operator(&cp); |
* The result is left in op . */ |
if (op == OP_ERROR) |
if (*cp == '!') { |
|
op = OP_FORCE; |
|
} else if (*cp == ':') { |
|
if (cp[1] == ':') { |
|
op = OP_DOUBLEDEP; |
|
cp++; |
|
} else { |
|
op = OP_DEPENDS; |
|
} |
|
} else { |
|
Parse_Error(PARSE_FATAL, "Missing dependency operator"); |
|
return; |
return; |
} |
|
|
|
cp++; /* Advance beyond operator */ |
|
|
|
Array_FindP(>argets, ParseDoOp, op); |
Array_FindP(>argets, ParseDoOp, op); |
|
|
/* |
|
* Get to the first source |
|
*/ |
|
while (isspace(*cp)) |
|
cp++; |
|
line = cp; |
line = cp; |
|
|
/* |
/* |