summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/suff.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/suff.c')
-rw-r--r--usr.bin/make/suff.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index b5126a1..1980bae 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -505,7 +505,7 @@ SuffParseTransform(str, srcPtr, targPtr)
srcLn = NILLNODE;
singleLn = NILLNODE;
-
+
/*
* Loop looking first for a suffix that matches the start of the
* string and then for one that exactly matches the rest of it. If
@@ -605,7 +605,7 @@ Suff_AddTransform (line)
if (ln == NILLNODE) {
/*
* Make a new graph node for the transformation. It will be filled in
- * by the Parse module.
+ * by the Parse module.
*/
gn = Targ_NewGN (line);
(void)Lst_AtEnd (transforms, (ClientData)gn);
@@ -628,7 +628,7 @@ Suff_AddTransform (line)
(void)SuffParseTransform(line, &s, &t);
/*
- * link the two together in the proper relationship and order
+ * link the two together in the proper relationship and order
*/
if (DEBUG(SUFF)) {
printf("defining transformation from `%s' to `%s'\n",
@@ -663,7 +663,7 @@ Suff_EndTransform(gnp, dummy)
ClientData dummy; /* Node for transformation */
{
GNode *gn = (GNode *) gnp;
-
+
if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) &&
Lst_IsEmpty(gn->children))
{
@@ -812,7 +812,7 @@ Suff_AddSuffix (str)
* XXX: Only do this after a Suff_ClearSuffixes?
*/
Lst_ForEach (transforms, SuffRebuildGraph, (ClientData)s);
- }
+ }
}
/*-
@@ -995,7 +995,7 @@ SuffAddSrc (sp, lsp)
Src *targ; /* Target structure */
targ = ls->s;
-
+
if ((s->flags & SUFF_NULL) && (*s->name != '\0')) {
/*
* If the suffix has been marked as the NULL suffix, also create a Src
@@ -1325,7 +1325,7 @@ SuffExpandChildren(cgnp, pgnp)
* after the child
*/
prevLN = Lst_Member(pgn->children, (ClientData)cgn);
-
+
/*
* First do variable expansion -- this takes precedence over
* wildcard expansion. If the result contains wildcards, they'll be gotten
@@ -1340,7 +1340,7 @@ SuffExpandChildren(cgnp, pgnp)
if (cp != (char *)NULL) {
Lst members = Lst_Init(FALSE);
-
+
if (cgn->type & OP_ARCHV) {
/*
* Node was an archive(member) target, so we want to call
@@ -1361,7 +1361,7 @@ SuffExpandChildren(cgnp, pgnp)
char *start;
char *initcp = cp; /* For freeing... */
- for (start = cp; *start == ' ' || *start == '\t'; start++)
+ for (start = cp; *start == ' ' || *start == '\t'; start++)
continue;
for (cp = start; *cp != '\0'; cp++) {
if (*cp == ' ' || *cp == '\t') {
@@ -1468,7 +1468,7 @@ SuffExpandChildren(cgnp, pgnp)
if (DEBUG(SUFF)) {
printf("Wildcard expanding \"%s\"...", cgn->name);
}
-
+
if (ln != NILLNODE) {
Suff *s = (Suff *)Lst_Datum(ln);
@@ -1516,7 +1516,7 @@ SuffExpandChildren(cgnp, pgnp)
* Nuke what's left of the list
*/
Lst_Destroy(exp, NOFREE);
-
+
/*
* Now the source is expanded, remove it from the list of children to
* keep it from being processed.
@@ -1609,7 +1609,7 @@ SuffApplyTransform(tGn, sGn, t, s)
}
gn = (GNode *)Lst_Datum(ln);
-
+
if (DEBUG(SUFF)) {
printf("\tapplying %s -> %s to \"%s\"\n", s->name, t->name, tGn->name);
}
@@ -1618,7 +1618,7 @@ SuffApplyTransform(tGn, sGn, t, s)
* Record last child for expansion purposes
*/
ln = Lst_Last(tGn->children);
-
+
/*
* Pass the buck to Make_HandleUse to apply the rule
*/
@@ -1671,7 +1671,7 @@ SuffFindArchiveDeps(gn, slst)
int i; /* Index into copy and vals */
Suff *ms; /* Suffix descriptor for member */
char *name; /* Start of member's name */
-
+
/*
* The node is an archive(member) pair. so we must find a
* suffix for both of them.
@@ -1683,7 +1683,7 @@ SuffFindArchiveDeps(gn, slst)
*eoarch = '\0'; /* So a suffix can be found */
name = eoarch + 1;
-
+
/*
* To simplify things, call Suff_FindDeps recursively on the member now,
* so we can simply compare the member's .PREFIX and .TARGET variables
@@ -1702,7 +1702,7 @@ SuffFindArchiveDeps(gn, slst)
(void)Lst_AtEnd(mem->parents, (ClientData)gn);
gn->unmade += 1;
}
-
+
/*
* Copy in the variables from the member node to this one.
*/
@@ -1815,7 +1815,7 @@ SuffFindNormalDeps(gn, slst)
eoname = gn->name + strlen(gn->name);
sopref = gn->name;
-
+
/*
* Begin at the beginning...
*/
@@ -1850,7 +1850,7 @@ SuffFindNormalDeps(gn, slst)
if (ln != NILLNODE) {
int prefLen; /* Length of the prefix */
Src *targ;
-
+
/*
* Allocate a Src structure to which things can be transformed
*/
@@ -1864,7 +1864,7 @@ SuffFindNormalDeps(gn, slst)
#ifdef DEBUG_SRC
targ->cp = Lst_Init(FALSE);
#endif
-
+
/*
* Allocate room for the prefix, whose end is found by subtracting
* the length of the suffix from the end of the name.
@@ -1898,7 +1898,7 @@ SuffFindNormalDeps(gn, slst)
if (DEBUG(SUFF)) {
printf("\tNo known suffix on %s. Using .NULL suffix\n", gn->name);
}
-
+
targ = (Src *)emalloc(sizeof (Src));
targ->file = strdup(gn->name);
targ->suff = suffNull;
@@ -1914,7 +1914,7 @@ SuffFindNormalDeps(gn, slst)
SuffAddLevel(srcs, targ);
(void)Lst_AtEnd(targs, (ClientData)targ);
}
-
+
/*
* Using the list of possible sources built up from the target suffix(es),
* try and find an existing file/target that matches.
@@ -1956,7 +1956,7 @@ SuffFindNormalDeps(gn, slst)
* that still contain variables or wildcards in their names.
*/
Lst_ForEach(gn->children, SuffExpandChildren, (ClientData)gn);
-
+
if (targ == NULL) {
if (DEBUG(SUFF)) {
printf("\tNo valid suffix on %s\n", gn->name);
@@ -2023,7 +2023,7 @@ sfnd_abort:
free(gn->path);
gn->path = strdup(gn->name);
}
-
+
goto sfnd_return;
}
@@ -2073,12 +2073,12 @@ sfnd_abort:
* suffix. Note that this causes the commands list of the original
* node, gn, to be replaced by the commands of the final
* transformation rule. Also, the unmade field of gn is incremented.
- * Etc.
+ * Etc.
*/
if (bottom->node == NILGNODE) {
bottom->node = Targ_FindNode(bottom->file, TARG_CREATE);
}
-
+
for (src = bottom; src->parent != (Src *)NULL; src = src->parent) {
targ = src->parent;
@@ -2107,7 +2107,7 @@ sfnd_abort:
targ->node->type |= OP_DEPS_FOUND;
Var_Set(PREFIX, targ->pref, targ->node);
-
+
Var_Set(TARGET, targ->node->name, targ->node);
}
}
@@ -2139,8 +2139,8 @@ sfnd_return:
Lst_Concat(slst, srcs, LST_CONCLINK);
Lst_Concat(slst, targs, LST_CONCLINK);
}
-
-
+
+
/*-
*-----------------------------------------------------------------------
* Suff_FindDeps --
@@ -2173,7 +2173,7 @@ void
Suff_FindDeps(gn)
GNode *gn;
{
-
+
SuffFindDeps(gn, srclist);
while (SuffRemoveSrc(srclist))
continue;
@@ -2193,11 +2193,11 @@ SuffFindDeps (gn, slst)
} else {
gn->type |= OP_DEPS_FOUND;
}
-
+
if (DEBUG(SUFF)) {
printf ("SuffFindDeps (%s)\n", gn->name);
}
-
+
if (gn->type & OP_ARCHV) {
SuffFindArchiveDeps(gn, slst);
} else if (gn->type & OP_LIB) {
@@ -2211,7 +2211,7 @@ SuffFindDeps (gn, slst)
*/
LstNode ln;
Suff *s;
-
+
ln = Lst_Find (sufflist, (ClientData)LIBSUFF, SuffSuffHasNameP);
if (gn->suffix)
gn->suffix->refCount--;
@@ -2362,7 +2362,7 @@ SuffPrintSuff (sp, dummy)
int flag;
printf ("# `%s' [%d] ", s->name, s->refCount);
-
+
flags = s->flags;
if (flags) {
fputs (" (", stdout);
OpenPOWER on IntegriCloud