version 1.19, 1999/05/04 16:44:45 |
version 1.20, 1999/10/05 22:06:24 |
|
|
#define CONTINUE 1 |
#define CONTINUE 1 |
#define DONE 0 |
#define DONE 0 |
static Lst targets; /* targets we're working on */ |
static Lst targets; /* targets we're working on */ |
|
#ifdef CLEANUP |
static Lst targCmds; /* command lines for targets */ |
static Lst targCmds; /* command lines for targets */ |
|
#endif |
static Boolean inLine; /* true if currently in a dependency |
static Boolean inLine; /* true if currently in a dependency |
* line or its commands */ |
* line or its commands */ |
typedef struct { |
typedef struct { |
|
|
* commands of all targets in the dependency spec |
* commands of all targets in the dependency spec |
*/ |
*/ |
Lst_ForEach (targets, ParseAddCmd, cp); |
Lst_ForEach (targets, ParseAddCmd, cp); |
|
#ifdef CLEANUP |
Lst_AtEnd(targCmds, (ClientData) line); |
Lst_AtEnd(targCmds, (ClientData) line); |
|
#endif |
continue; |
continue; |
} else { |
} else { |
Parse_Error (PARSE_FATAL, |
Parse_Error (PARSE_FATAL, |
|
|
parseIncPath = Lst_Init (FALSE); |
parseIncPath = Lst_Init (FALSE); |
sysIncPath = Lst_Init (FALSE); |
sysIncPath = Lst_Init (FALSE); |
includes = Lst_Init (FALSE); |
includes = Lst_Init (FALSE); |
|
#ifdef CLEANUP |
targCmds = Lst_Init (FALSE); |
targCmds = Lst_Init (FALSE); |
|
#endif |
} |
} |
|
|
void |
void |
Parse_End() |
Parse_End() |
{ |
{ |
|
#ifdef CLEANUP |
Lst_Destroy(targCmds, (void (*) __P((ClientData))) free); |
Lst_Destroy(targCmds, (void (*) __P((ClientData))) free); |
if (targets) |
if (targets) |
Lst_Destroy(targets, NOFREE); |
Lst_Destroy(targets, NOFREE); |
Lst_Destroy(sysIncPath, Dir_Destroy); |
Lst_Destroy(sysIncPath, Dir_Destroy); |
Lst_Destroy(parseIncPath, Dir_Destroy); |
Lst_Destroy(parseIncPath, Dir_Destroy); |
Lst_Destroy(includes, NOFREE); /* Should be empty now */ |
Lst_Destroy(includes, NOFREE); /* Should be empty now */ |
|
#endif |
} |
} |
|
|
|
|