make(1): migrate Lst_IsEmpty to Lst_IsEmptyS
This commit is contained in:
parent
5be8116c2e
commit
74fd7ff4cd
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $ */
|
/* $NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
@ -69,14 +69,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $";
|
static char rcsid[] = "$NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
|
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: arch.c,v 1.98 2020/08/27 06:13:53 rillig Exp $");
|
__RCSID("$NetBSD: arch.c,v 1.99 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -396,7 +396,7 @@ Arch_ParseArchive(char **linePtr, Lst nodeLst, GNode *ctxt)
|
|||||||
|
|
||||||
Buf_Init(&nameBuf, 0);
|
Buf_Init(&nameBuf, 0);
|
||||||
Dir_Expand(memName, dirSearchPath, members);
|
Dir_Expand(memName, dirSearchPath, members);
|
||||||
while (!Lst_IsEmpty(members)) {
|
while (!Lst_IsEmptyS(members)) {
|
||||||
char *member = Lst_DequeueS(members);
|
char *member = Lst_DequeueS(members);
|
||||||
|
|
||||||
Buf_Empty(&nameBuf);
|
Buf_Empty(&nameBuf);
|
||||||
@ -1252,9 +1252,9 @@ Arch_LibOODate(GNode *gn)
|
|||||||
|
|
||||||
if (gn->type & OP_PHONY) {
|
if (gn->type & OP_PHONY) {
|
||||||
oodate = TRUE;
|
oodate = TRUE;
|
||||||
} else if (OP_NOP(gn->type) && Lst_IsEmpty(gn->children)) {
|
} else if (OP_NOP(gn->type) && Lst_IsEmptyS(gn->children)) {
|
||||||
oodate = FALSE;
|
oodate = FALSE;
|
||||||
} else if ((!Lst_IsEmpty(gn->children) && gn->cmgn == NULL) ||
|
} else if ((!Lst_IsEmptyS(gn->children) && gn->cmgn == NULL) ||
|
||||||
(gn->mtime > now) ||
|
(gn->mtime > now) ||
|
||||||
(gn->cmgn != NULL && gn->mtime < gn->cmgn->mtime)) {
|
(gn->cmgn != NULL && gn->mtime < gn->cmgn->mtime)) {
|
||||||
oodate = TRUE;
|
oodate = TRUE;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $ */
|
/* $NetBSD: compat.c,v 1.131 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||||
@ -70,14 +70,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $";
|
static char rcsid[] = "$NetBSD: compat.c,v 1.131 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
|
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: compat.c,v 1.130 2020/08/27 06:53:57 rillig Exp $");
|
__RCSID("$NetBSD: compat.c,v 1.131 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -747,7 +747,7 @@ Compat_Run(Lst targs)
|
|||||||
* could not be made due to errors.
|
* could not be made due to errors.
|
||||||
*/
|
*/
|
||||||
errors = 0;
|
errors = 0;
|
||||||
while (!Lst_IsEmpty(targs)) {
|
while (!Lst_IsEmptyS(targs)) {
|
||||||
gn = Lst_DequeueS(targs);
|
gn = Lst_DequeueS(targs);
|
||||||
Compat_Make(gn, gn);
|
Compat_Make(gn, gn);
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: cond.c,v 1.100 2020/08/23 16:58:02 rillig Exp $ */
|
/* $NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||||
@ -70,14 +70,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: cond.c,v 1.100 2020/08/23 16:58:02 rillig Exp $";
|
static char rcsid[] = "$NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94";
|
static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: cond.c,v 1.100 2020/08/23 16:58:02 rillig Exp $");
|
__RCSID("$NetBSD: cond.c,v 1.101 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -326,7 +326,7 @@ CondDoCommands(int argLen MAKE_ATTR_UNUSED, const char *arg)
|
|||||||
GNode *gn;
|
GNode *gn;
|
||||||
|
|
||||||
gn = Targ_FindNode(arg, TARG_NOCREATE);
|
gn = Targ_FindNode(arg, TARG_NOCREATE);
|
||||||
return gn != NULL && !OP_NOP(gn->type) && !Lst_IsEmpty(gn->commands);
|
return gn != NULL && !OP_NOP(gn->type) && !Lst_IsEmptyS(gn->commands);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: dir.c,v 1.114 2020/08/27 07:00:29 rillig Exp $ */
|
/* $NetBSD: dir.c,v 1.115 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||||
@ -70,14 +70,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: dir.c,v 1.114 2020/08/27 07:00:29 rillig Exp $";
|
static char rcsid[] = "$NetBSD: dir.c,v 1.115 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
|
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: dir.c,v 1.114 2020/08/27 07:00:29 rillig Exp $");
|
__RCSID("$NetBSD: dir.c,v 1.115 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -1478,7 +1478,7 @@ Dir_MTime(GNode *gn, Boolean recheck)
|
|||||||
else {
|
else {
|
||||||
fullName = Dir_FindFile(gn->name, Suff_FindPath(gn));
|
fullName = Dir_FindFile(gn->name, Suff_FindPath(gn));
|
||||||
if (fullName == NULL && gn->flags & FROM_DEPEND &&
|
if (fullName == NULL && gn->flags & FROM_DEPEND &&
|
||||||
!Lst_IsEmpty(gn->iParents)) {
|
!Lst_IsEmptyS(gn->iParents)) {
|
||||||
char *cp;
|
char *cp;
|
||||||
|
|
||||||
cp = strrchr(gn->name, '/');
|
cp = strrchr(gn->name, '/');
|
||||||
@ -1733,7 +1733,7 @@ Dir_Destroy(void *pp)
|
|||||||
void
|
void
|
||||||
Dir_ClearPath(Lst path)
|
Dir_ClearPath(Lst path)
|
||||||
{
|
{
|
||||||
while (!Lst_IsEmpty(path)) {
|
while (!Lst_IsEmptyS(path)) {
|
||||||
Path *p = Lst_DequeueS(path);
|
Path *p = Lst_DequeueS(path);
|
||||||
Dir_Destroy(p);
|
Dir_Destroy(p);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: job.c,v 1.218 2020/08/27 07:00:29 rillig Exp $ */
|
/* $NetBSD: job.c,v 1.219 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||||
@ -70,14 +70,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: job.c,v 1.218 2020/08/27 07:00:29 rillig Exp $";
|
static char rcsid[] = "$NetBSD: job.c,v 1.219 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
|
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: job.c,v 1.218 2020/08/27 07:00:29 rillig Exp $");
|
__RCSID("$NetBSD: job.c,v 1.219 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -1234,13 +1234,13 @@ Job_Touch(GNode *gn, Boolean silent)
|
|||||||
Boolean
|
Boolean
|
||||||
Job_CheckCommands(GNode *gn, void (*abortProc)(const char *, ...))
|
Job_CheckCommands(GNode *gn, void (*abortProc)(const char *, ...))
|
||||||
{
|
{
|
||||||
if (OP_NOP(gn->type) && Lst_IsEmpty(gn->commands) &&
|
if (OP_NOP(gn->type) && Lst_IsEmptyS(gn->commands) &&
|
||||||
((gn->type & OP_LIB) == 0 || Lst_IsEmpty(gn->children))) {
|
((gn->type & OP_LIB) == 0 || Lst_IsEmptyS(gn->children))) {
|
||||||
/*
|
/*
|
||||||
* No commands. Look for .DEFAULT rule from which we might infer
|
* No commands. Look for .DEFAULT rule from which we might infer
|
||||||
* commands
|
* commands
|
||||||
*/
|
*/
|
||||||
if ((DEFAULT != NULL) && !Lst_IsEmpty(DEFAULT->commands) &&
|
if ((DEFAULT != NULL) && !Lst_IsEmptyS(DEFAULT->commands) &&
|
||||||
(gn->type & OP_SPECIAL) == 0) {
|
(gn->type & OP_SPECIAL) == 0) {
|
||||||
char *p1;
|
char *p1;
|
||||||
/*
|
/*
|
||||||
@ -2671,8 +2671,8 @@ int
|
|||||||
Job_Finish(void)
|
Job_Finish(void)
|
||||||
{
|
{
|
||||||
if (postCommands != NULL &&
|
if (postCommands != NULL &&
|
||||||
(!Lst_IsEmpty(postCommands->commands) ||
|
(!Lst_IsEmptyS(postCommands->commands) ||
|
||||||
!Lst_IsEmpty(postCommands->children))) {
|
!Lst_IsEmptyS(postCommands->children))) {
|
||||||
if (errors) {
|
if (errors) {
|
||||||
Error("Errors reported so .END ignored");
|
Error("Errors reported so .END ignored");
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 rillig Exp $ */
|
/* $NetBSD: lst.c,v 1.47 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
@ -37,11 +37,11 @@
|
|||||||
#include "make.h"
|
#include "make.h"
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 rillig Exp $";
|
static char rcsid[] = "$NetBSD: lst.c,v 1.47 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
__RCSID("$NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 rillig Exp $");
|
__RCSID("$NetBSD: lst.c,v 1.47 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -390,13 +390,6 @@ Lst_DatumS(LstNode node)
|
|||||||
* Functions for entire lists
|
* Functions for entire lists
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Return TRUE if the given list is empty or invalid. */
|
|
||||||
Boolean
|
|
||||||
Lst_IsEmpty(Lst list)
|
|
||||||
{
|
|
||||||
return !LstIsValid(list) || LstIsEmpty(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return TRUE if the given list is empty. */
|
/* Return TRUE if the given list is empty. */
|
||||||
Boolean
|
Boolean
|
||||||
Lst_IsEmptyS(Lst list)
|
Lst_IsEmptyS(Lst list)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: lst.h,v 1.48 2020/08/27 07:00:29 rillig Exp $ */
|
/* $NetBSD: lst.h,v 1.49 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||||
@ -106,7 +106,6 @@ Lst Lst_CopyS(Lst, LstCopyProc);
|
|||||||
void Lst_FreeS(Lst);
|
void Lst_FreeS(Lst);
|
||||||
void Lst_DestroyS(Lst, LstFreeProc);
|
void Lst_DestroyS(Lst, LstFreeProc);
|
||||||
/* True if list is empty */
|
/* True if list is empty */
|
||||||
Boolean Lst_IsEmpty(Lst);
|
|
||||||
Boolean Lst_IsEmptyS(Lst);
|
Boolean Lst_IsEmptyS(Lst);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: main.c,v 1.316 2020/08/27 07:00:29 rillig Exp $ */
|
/* $NetBSD: main.c,v 1.317 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
@ -69,7 +69,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: main.c,v 1.316 2020/08/27 07:00:29 rillig Exp $";
|
static char rcsid[] = "$NetBSD: main.c,v 1.317 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
|
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: main.c,v 1.316 2020/08/27 07:00:29 rillig Exp $");
|
__RCSID("$NetBSD: main.c,v 1.317 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -1275,7 +1275,7 @@ main(int argc, char **argv)
|
|||||||
* created. If none specified, make the variable empty -- the parser
|
* created. If none specified, make the variable empty -- the parser
|
||||||
* will fill the thing in with the default or .MAIN target.
|
* will fill the thing in with the default or .MAIN target.
|
||||||
*/
|
*/
|
||||||
if (!Lst_IsEmpty(create)) {
|
if (!Lst_IsEmptyS(create)) {
|
||||||
LstNode ln;
|
LstNode ln;
|
||||||
|
|
||||||
for (ln = Lst_First(create); ln != NULL; ln = Lst_SuccS(ln)) {
|
for (ln = Lst_First(create); ln != NULL; ln = Lst_SuccS(ln)) {
|
||||||
@ -1325,9 +1325,9 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
sysMkPath = Lst_Init();
|
sysMkPath = Lst_Init();
|
||||||
Dir_Expand(_PATH_DEFSYSMK,
|
Dir_Expand(_PATH_DEFSYSMK,
|
||||||
Lst_IsEmpty(sysIncPath) ? defIncPath : sysIncPath,
|
Lst_IsEmptyS(sysIncPath) ? defIncPath : sysIncPath,
|
||||||
sysMkPath);
|
sysMkPath);
|
||||||
if (Lst_IsEmpty(sysMkPath))
|
if (Lst_IsEmptyS(sysMkPath))
|
||||||
Fatal("%s: no system rules (%s).", progname,
|
Fatal("%s: no system rules (%s).", progname,
|
||||||
_PATH_DEFSYSMK);
|
_PATH_DEFSYSMK);
|
||||||
ln = Lst_Find(sysMkPath, ReadMakefile, NULL);
|
ln = Lst_Find(sysMkPath, ReadMakefile, NULL);
|
||||||
@ -1336,7 +1336,7 @@ main(int argc, char **argv)
|
|||||||
(char *)Lst_DatumS(ln));
|
(char *)Lst_DatumS(ln));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Lst_IsEmpty(makefiles)) {
|
if (!Lst_IsEmptyS(makefiles)) {
|
||||||
LstNode ln;
|
LstNode ln;
|
||||||
|
|
||||||
ln = Lst_Find(makefiles, ReadAllMakefiles, NULL);
|
ln = Lst_Find(makefiles, ReadAllMakefiles, NULL);
|
||||||
@ -1544,7 +1544,7 @@ ReadMakefile(const void *p, const void *q MAKE_ATTR_UNUSED)
|
|||||||
name = Dir_FindFile(fname, parseIncPath);
|
name = Dir_FindFile(fname, parseIncPath);
|
||||||
if (!name)
|
if (!name)
|
||||||
name = Dir_FindFile(fname,
|
name = Dir_FindFile(fname,
|
||||||
Lst_IsEmpty(sysIncPath) ? defIncPath : sysIncPath);
|
Lst_IsEmptyS(sysIncPath) ? defIncPath : sysIncPath);
|
||||||
if (!name || (fd = open(name, O_RDONLY)) == -1) {
|
if (!name || (fd = open(name, O_RDONLY)) == -1) {
|
||||||
free(name);
|
free(name);
|
||||||
free(path);
|
free(path);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: make.c,v 1.126 2020/08/27 06:53:57 rillig Exp $ */
|
/* $NetBSD: make.c,v 1.127 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
@ -69,14 +69,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: make.c,v 1.126 2020/08/27 06:53:57 rillig Exp $";
|
static char rcsid[] = "$NetBSD: make.c,v 1.127 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: make.c,v 1.126 2020/08/27 06:53:57 rillig Exp $");
|
__RCSID("$NetBSD: make.c,v 1.127 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -474,7 +474,7 @@ Make_HandleUse(GNode *cgn, GNode *pgn)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((cgn->type & (OP_USE|OP_USEBEFORE)) || Lst_IsEmpty(pgn->commands)) {
|
if ((cgn->type & (OP_USE|OP_USEBEFORE)) || Lst_IsEmptyS(pgn->commands)) {
|
||||||
if (cgn->type & OP_USEBEFORE) {
|
if (cgn->type & OP_USEBEFORE) {
|
||||||
/* .USEBEFORE */
|
/* .USEBEFORE */
|
||||||
Lst_PrependAllS(pgn->commands, cgn->commands);
|
Lst_PrependAllS(pgn->commands, cgn->commands);
|
||||||
@ -614,7 +614,7 @@ Make_Recheck(GNode *gn)
|
|||||||
* To force things that depend on FRC to be made, so we have to
|
* To force things that depend on FRC to be made, so we have to
|
||||||
* check for gn->children being empty as well...
|
* check for gn->children being empty as well...
|
||||||
*/
|
*/
|
||||||
if (!Lst_IsEmpty(gn->commands) || Lst_IsEmpty(gn->children)) {
|
if (!Lst_IsEmptyS(gn->commands) || Lst_IsEmptyS(gn->children)) {
|
||||||
gn->mtime = now;
|
gn->mtime = now;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -724,7 +724,7 @@ Make_Update(GNode *cgn)
|
|||||||
* which is where all parents are linked.
|
* which is where all parents are linked.
|
||||||
*/
|
*/
|
||||||
if ((centurion = cgn->centurion) != NULL) {
|
if ((centurion = cgn->centurion) != NULL) {
|
||||||
if (!Lst_IsEmpty(cgn->parents))
|
if (!Lst_IsEmptyS(cgn->parents))
|
||||||
Punt("%s%s: cohort has parents", cgn->name, cgn->cohort_num);
|
Punt("%s%s: cohort has parents", cgn->name, cgn->cohort_num);
|
||||||
centurion->unmade_cohorts -= 1;
|
centurion->unmade_cohorts -= 1;
|
||||||
if (centurion->unmade_cohorts < 0)
|
if (centurion->unmade_cohorts < 0)
|
||||||
@ -1087,7 +1087,7 @@ MakeStartJobs(void)
|
|||||||
GNode *gn;
|
GNode *gn;
|
||||||
int have_token = 0;
|
int have_token = 0;
|
||||||
|
|
||||||
while (!Lst_IsEmpty(toBeMade)) {
|
while (!Lst_IsEmptyS(toBeMade)) {
|
||||||
/* Get token now to avoid cycling job-list when we only have 1 token */
|
/* Get token now to avoid cycling job-list when we only have 1 token */
|
||||||
if (!have_token && !Job_TokenWithdraw())
|
if (!have_token && !Job_TokenWithdraw())
|
||||||
break;
|
break;
|
||||||
@ -1438,7 +1438,7 @@ Make_ProcessWait(Lst targs)
|
|||||||
examine = Lst_Init();
|
examine = Lst_Init();
|
||||||
Lst_AppendS(examine, pgn);
|
Lst_AppendS(examine, pgn);
|
||||||
|
|
||||||
while (!Lst_IsEmpty(examine)) {
|
while (!Lst_IsEmptyS(examine)) {
|
||||||
pgn = Lst_DequeueS(examine);
|
pgn = Lst_DequeueS(examine);
|
||||||
|
|
||||||
/* We only want to process each child-list once */
|
/* We only want to process each child-list once */
|
||||||
@ -1536,7 +1536,7 @@ Make_Run(Lst targs)
|
|||||||
* Note that the Job module will exit if there were any errors unless the
|
* Note that the Job module will exit if there were any errors unless the
|
||||||
* keepgoing flag was given.
|
* keepgoing flag was given.
|
||||||
*/
|
*/
|
||||||
while (!Lst_IsEmpty(toBeMade) || jobTokensRunning > 0) {
|
while (!Lst_IsEmptyS(toBeMade) || jobTokensRunning > 0) {
|
||||||
Job_CatchOutput();
|
Job_CatchOutput();
|
||||||
(void)MakeStartJobs();
|
(void)MakeStartJobs();
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: meta.c,v 1.102 2020/08/27 07:00:29 rillig Exp $ */
|
/* $NetBSD: meta.c,v 1.103 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Implement 'meta' mode.
|
* Implement 'meta' mode.
|
||||||
@ -416,7 +416,7 @@ meta_needed(GNode *gn, const char *dname, const char *tname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check if there are no commands to execute. */
|
/* Check if there are no commands to execute. */
|
||||||
if (Lst_IsEmpty(gn->commands)) {
|
if (Lst_IsEmptyS(gn->commands)) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
fprintf(debug_file, "Skipping meta for %s: no commands\n",
|
fprintf(debug_file, "Skipping meta for %s: no commands\n",
|
||||||
gn->name);
|
gn->name);
|
||||||
@ -1332,7 +1332,7 @@ meta_oodate(GNode *gn, Boolean oodate)
|
|||||||
DEQUOTE(move_target);
|
DEQUOTE(move_target);
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case 'D': /* unlink */
|
case 'D': /* unlink */
|
||||||
if (*p == '/' && !Lst_IsEmpty(missingFiles)) {
|
if (*p == '/' && !Lst_IsEmptyS(missingFiles)) {
|
||||||
/* remove any missingFiles entries that match p */
|
/* remove any missingFiles entries that match p */
|
||||||
ln = Lst_Find(missingFiles, path_match, p);
|
ln = Lst_Find(missingFiles, path_match, p);
|
||||||
if (ln != NULL) {
|
if (ln != NULL) {
|
||||||
@ -1390,7 +1390,7 @@ meta_oodate(GNode *gn, Boolean oodate)
|
|||||||
if (*p != '/')
|
if (*p != '/')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (Lst_IsEmpty(metaBailiwick))
|
if (Lst_IsEmptyS(metaBailiwick))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* ignore cwd - normal dependencies handle those */
|
/* ignore cwd - normal dependencies handle those */
|
||||||
@ -1595,7 +1595,7 @@ meta_oodate(GNode *gn, Boolean oodate)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
if (!Lst_IsEmpty(missingFiles)) {
|
if (!Lst_IsEmptyS(missingFiles)) {
|
||||||
if (DEBUG(META))
|
if (DEBUG(META))
|
||||||
fprintf(debug_file, "%s: missing files: %s...\n",
|
fprintf(debug_file, "%s: missing files: %s...\n",
|
||||||
fname, (char *)Lst_DatumS(Lst_First(missingFiles)));
|
fname, (char *)Lst_DatumS(Lst_First(missingFiles)));
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 rillig Exp $ */
|
/* $NetBSD: parse.c,v 1.267 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
@ -69,14 +69,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 rillig Exp $";
|
static char rcsid[] = "$NetBSD: parse.c,v 1.267 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
|
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 rillig Exp $");
|
__RCSID("$NetBSD: parse.c,v 1.267 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -852,7 +852,7 @@ ParseLinkSrc(void *pgnp, void *cgnp)
|
|||||||
GNode *pgn = (GNode *)pgnp;
|
GNode *pgn = (GNode *)pgnp;
|
||||||
GNode *cgn = (GNode *)cgnp;
|
GNode *cgn = (GNode *)cgnp;
|
||||||
|
|
||||||
if ((pgn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(pgn->cohorts))
|
if ((pgn->type & OP_DOUBLEDEP) && !Lst_IsEmptyS(pgn->cohorts))
|
||||||
pgn = Lst_DatumS(Lst_LastS(pgn->cohorts));
|
pgn = Lst_DatumS(Lst_LastS(pgn->cohorts));
|
||||||
Lst_AppendS(pgn->children, cgn);
|
Lst_AppendS(pgn->children, cgn);
|
||||||
if (specType == Not)
|
if (specType == Not)
|
||||||
@ -1360,7 +1360,7 @@ ParseDoDependency(char *line)
|
|||||||
Lst_AppendS(paths, dirSearchPath);
|
Lst_AppendS(paths, dirSearchPath);
|
||||||
break;
|
break;
|
||||||
case Main:
|
case Main:
|
||||||
if (!Lst_IsEmpty(create)) {
|
if (!Lst_IsEmptyS(create)) {
|
||||||
specType = Not;
|
specType = Not;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1447,7 +1447,7 @@ ParseDoDependency(char *line)
|
|||||||
|
|
||||||
/* Apply the targets. */
|
/* Apply the targets. */
|
||||||
|
|
||||||
while(!Lst_IsEmpty(curTargs)) {
|
while(!Lst_IsEmptyS(curTargs)) {
|
||||||
char *targName = Lst_DequeueS(curTargs);
|
char *targName = Lst_DequeueS(curTargs);
|
||||||
|
|
||||||
if (!Suff_IsTransform (targName)) {
|
if (!Suff_IsTransform (targName)) {
|
||||||
@ -1500,7 +1500,7 @@ ParseDoDependency(char *line)
|
|||||||
Lst_FreeS(curTargs);
|
Lst_FreeS(curTargs);
|
||||||
curTargs = NULL;
|
curTargs = NULL;
|
||||||
|
|
||||||
if (!Lst_IsEmpty(targets)) {
|
if (targets != NULL && !Lst_IsEmptyS(targets)) {
|
||||||
switch(specType) {
|
switch(specType) {
|
||||||
default:
|
default:
|
||||||
Parse_Error(PARSE_WARNING, "Special and mundane targets don't mix. Mundane ones ignored");
|
Parse_Error(PARSE_WARNING, "Special and mundane targets don't mix. Mundane ones ignored");
|
||||||
@ -1725,7 +1725,7 @@ ParseDoDependency(char *line)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!Lst_IsEmpty(sources)) {
|
while (!Lst_IsEmptyS(sources)) {
|
||||||
gn = Lst_DequeueS(sources);
|
gn = Lst_DequeueS(sources);
|
||||||
ParseDoSrc(tOp, gn->name);
|
ParseDoSrc(tOp, gn->name);
|
||||||
}
|
}
|
||||||
@ -2087,7 +2087,7 @@ ParseAddCmd(void *gnp, void *cmd)
|
|||||||
GNode *gn = (GNode *)gnp;
|
GNode *gn = (GNode *)gnp;
|
||||||
|
|
||||||
/* Add to last (ie current) cohort for :: targets */
|
/* Add to last (ie current) cohort for :: targets */
|
||||||
if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(gn->cohorts))
|
if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmptyS(gn->cohorts))
|
||||||
gn = Lst_DatumS(Lst_LastS(gn->cohorts));
|
gn = Lst_DatumS(Lst_LastS(gn->cohorts));
|
||||||
|
|
||||||
/* if target already supplied, ignore commands */
|
/* if target already supplied, ignore commands */
|
||||||
@ -2139,7 +2139,7 @@ static void
|
|||||||
ParseHasCommands(void *gnp)
|
ParseHasCommands(void *gnp)
|
||||||
{
|
{
|
||||||
GNode *gn = (GNode *)gnp;
|
GNode *gn = (GNode *)gnp;
|
||||||
if (!Lst_IsEmpty(gn->commands)) {
|
if (!Lst_IsEmptyS(gn->commands)) {
|
||||||
gn->type |= OP_HAS_COMMANDS;
|
gn->type |= OP_HAS_COMMANDS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2262,7 +2262,7 @@ Parse_include_file(char *file, Boolean isSystem, Boolean depinc, int silent)
|
|||||||
* Look for it on the system path
|
* Look for it on the system path
|
||||||
*/
|
*/
|
||||||
fullname = Dir_FindFile(file,
|
fullname = Dir_FindFile(file,
|
||||||
Lst_IsEmpty(sysIncPath) ? defIncPath : sysIncPath);
|
Lst_IsEmptyS(sysIncPath) ? defIncPath : sysIncPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullname == NULL) {
|
if (fullname == NULL) {
|
||||||
@ -2749,7 +2749,7 @@ ParseEOF(void)
|
|||||||
free(curFile->P_str);
|
free(curFile->P_str);
|
||||||
free(curFile);
|
free(curFile);
|
||||||
|
|
||||||
if (Lst_IsEmpty(includes)) {
|
if (Lst_IsEmptyS(includes)) {
|
||||||
curFile = NULL;
|
curFile = NULL;
|
||||||
/* We've run out of input */
|
/* We've run out of input */
|
||||||
Var_Delete(".PARSEDIR", VAR_GLOBAL);
|
Var_Delete(".PARSEDIR", VAR_GLOBAL);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 rillig Exp $ */
|
/* $NetBSD: suff.c,v 1.121 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
@ -69,14 +69,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 rillig Exp $";
|
static char rcsid[] = "$NetBSD: suff.c,v 1.121 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
|
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 rillig Exp $");
|
__RCSID("$NetBSD: suff.c,v 1.121 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -229,7 +229,6 @@ static int SuffScanTargets(void *, void *);
|
|||||||
static int SuffAddSrc(void *, void *);
|
static int SuffAddSrc(void *, void *);
|
||||||
static int SuffRemoveSrc(Lst);
|
static int SuffRemoveSrc(Lst);
|
||||||
static void SuffAddLevel(Lst, Src *);
|
static void SuffAddLevel(Lst, Src *);
|
||||||
static Src *SuffFindThem(Lst, Lst);
|
|
||||||
static Src *SuffFindCmds(Src *, Lst);
|
static Src *SuffFindCmds(Src *, Lst);
|
||||||
static void SuffExpandChildren(LstNode, GNode *);
|
static void SuffExpandChildren(LstNode, GNode *);
|
||||||
static void SuffExpandWildcards(LstNode, GNode *);
|
static void SuffExpandWildcards(LstNode, GNode *);
|
||||||
@ -775,10 +774,10 @@ Suff_EndTransform(void *gnp, void *dummy MAKE_ATTR_UNUSED)
|
|||||||
{
|
{
|
||||||
GNode *gn = (GNode *)gnp;
|
GNode *gn = (GNode *)gnp;
|
||||||
|
|
||||||
if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(gn->cohorts))
|
if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmptyS(gn->cohorts))
|
||||||
gn = Lst_DatumS(Lst_LastS(gn->cohorts));
|
gn = Lst_DatumS(Lst_LastS(gn->cohorts));
|
||||||
if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) &&
|
if ((gn->type & OP_TRANSFORM) && Lst_IsEmptyS(gn->commands) &&
|
||||||
Lst_IsEmpty(gn->children))
|
Lst_IsEmptyS(gn->children))
|
||||||
{
|
{
|
||||||
Suff *s, *t;
|
Suff *s, *t;
|
||||||
|
|
||||||
@ -1071,7 +1070,7 @@ Suff_DoPaths(void)
|
|||||||
Lst_OpenS(sufflist);
|
Lst_OpenS(sufflist);
|
||||||
while ((ln = Lst_NextS(sufflist)) != NULL) {
|
while ((ln = Lst_NextS(sufflist)) != NULL) {
|
||||||
s = Lst_DatumS(ln);
|
s = Lst_DatumS(ln);
|
||||||
if (!Lst_IsEmpty (s->searchPath)) {
|
if (!Lst_IsEmptyS(s->searchPath)) {
|
||||||
#ifdef INCLUDES
|
#ifdef INCLUDES
|
||||||
if (s->flags & SUFF_INCLUDE) {
|
if (s->flags & SUFF_INCLUDE) {
|
||||||
Dir_Concat(inIncludes, s->searchPath);
|
Dir_Concat(inIncludes, s->searchPath);
|
||||||
@ -1354,7 +1353,7 @@ SuffFindThem(Lst srcs, Lst slst)
|
|||||||
|
|
||||||
rs = NULL;
|
rs = NULL;
|
||||||
|
|
||||||
while (!Lst_IsEmpty (srcs)) {
|
while (!Lst_IsEmptyS(srcs)) {
|
||||||
s = Lst_DequeueS(srcs);
|
s = Lst_DequeueS(srcs);
|
||||||
|
|
||||||
if (DEBUG(SUFF)) {
|
if (DEBUG(SUFF)) {
|
||||||
@ -1437,7 +1436,7 @@ SuffFindCmds(Src *targ, Lst slst)
|
|||||||
}
|
}
|
||||||
s = Lst_DatumS(ln);
|
s = Lst_DatumS(ln);
|
||||||
|
|
||||||
if (s->type & OP_OPTIONAL && Lst_IsEmpty(t->commands)) {
|
if (s->type & OP_OPTIONAL && Lst_IsEmptyS(t->commands)) {
|
||||||
/*
|
/*
|
||||||
* We haven't looked to see if .OPTIONAL files exist yet, so
|
* We haven't looked to see if .OPTIONAL files exist yet, so
|
||||||
* don't use one as the implicit source.
|
* don't use one as the implicit source.
|
||||||
@ -1531,7 +1530,7 @@ SuffExpandChildren(LstNode cln, GNode *pgn)
|
|||||||
GNode *gn; /* New source 8) */
|
GNode *gn; /* New source 8) */
|
||||||
char *cp; /* Expanded value */
|
char *cp; /* Expanded value */
|
||||||
|
|
||||||
if (!Lst_IsEmpty(cgn->order_pred) || !Lst_IsEmpty(cgn->order_succ))
|
if (!Lst_IsEmptyS(cgn->order_pred) || !Lst_IsEmptyS(cgn->order_succ))
|
||||||
/* It is all too hard to process the result of .ORDER */
|
/* It is all too hard to process the result of .ORDER */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1638,7 +1637,7 @@ SuffExpandChildren(LstNode cln, GNode *pgn)
|
|||||||
/*
|
/*
|
||||||
* Add all elements of the members list to the parent node.
|
* Add all elements of the members list to the parent node.
|
||||||
*/
|
*/
|
||||||
while(!Lst_IsEmpty(members)) {
|
while(!Lst_IsEmptyS(members)) {
|
||||||
gn = Lst_DequeueS(members);
|
gn = Lst_DequeueS(members);
|
||||||
|
|
||||||
if (DEBUG(SUFF)) {
|
if (DEBUG(SUFF)) {
|
||||||
@ -1688,7 +1687,7 @@ SuffExpandWildcards(LstNode cln, GNode *pgn)
|
|||||||
explist = Lst_Init();
|
explist = Lst_Init();
|
||||||
Dir_Expand(cgn->name, Suff_FindPath(cgn), explist);
|
Dir_Expand(cgn->name, Suff_FindPath(cgn), explist);
|
||||||
|
|
||||||
while (!Lst_IsEmpty(explist)) {
|
while (!Lst_IsEmptyS(explist)) {
|
||||||
/*
|
/*
|
||||||
* Fetch next expansion off the list and find its GNode
|
* Fetch next expansion off the list and find its GNode
|
||||||
*/
|
*/
|
||||||
@ -2139,7 +2138,7 @@ SuffFindNormalDeps(GNode *gn, Lst slst)
|
|||||||
/*
|
/*
|
||||||
* Handle target of unknown suffix...
|
* Handle target of unknown suffix...
|
||||||
*/
|
*/
|
||||||
if (Lst_IsEmpty(targs) && suffNull != NULL) {
|
if (Lst_IsEmptyS(targs) && suffNull != NULL) {
|
||||||
if (DEBUG(SUFF)) {
|
if (DEBUG(SUFF)) {
|
||||||
fprintf(debug_file, "\tNo known suffix on %s. Using .NULL suffix\n", gn->name);
|
fprintf(debug_file, "\tNo known suffix on %s. Using .NULL suffix\n", gn->name);
|
||||||
}
|
}
|
||||||
@ -2162,7 +2161,7 @@ SuffFindNormalDeps(GNode *gn, Lst slst)
|
|||||||
* not define suffix rules if the gnode had children but we
|
* not define suffix rules if the gnode had children but we
|
||||||
* don't do this anymore.
|
* don't do this anymore.
|
||||||
*/
|
*/
|
||||||
if (Lst_IsEmpty(gn->commands))
|
if (Lst_IsEmptyS(gn->commands))
|
||||||
SuffAddLevel(srcs, targ);
|
SuffAddLevel(srcs, targ);
|
||||||
else {
|
else {
|
||||||
if (DEBUG(SUFF))
|
if (DEBUG(SUFF))
|
||||||
@ -2186,7 +2185,7 @@ SuffFindNormalDeps(GNode *gn, Lst slst)
|
|||||||
* No known transformations -- use the first suffix found
|
* No known transformations -- use the first suffix found
|
||||||
* for setting the local variables.
|
* for setting the local variables.
|
||||||
*/
|
*/
|
||||||
if (!Lst_IsEmpty(targs)) {
|
if (!Lst_IsEmptyS(targs)) {
|
||||||
targ = Lst_DatumS(Lst_First(targs));
|
targ = Lst_DatumS(Lst_First(targs));
|
||||||
} else {
|
} else {
|
||||||
targ = NULL;
|
targ = NULL;
|
||||||
@ -2293,7 +2292,7 @@ sfnd_abort:
|
|||||||
/*
|
/*
|
||||||
* Check for overriding transformation rule implied by sources
|
* Check for overriding transformation rule implied by sources
|
||||||
*/
|
*/
|
||||||
if (!Lst_IsEmpty(gn->children)) {
|
if (!Lst_IsEmptyS(gn->children)) {
|
||||||
src = SuffFindCmds(targ, slst);
|
src = SuffFindCmds(targ, slst);
|
||||||
|
|
||||||
if (src != NULL) {
|
if (src != NULL) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: targ.c,v 1.74 2020/08/27 06:53:57 rillig Exp $ */
|
/* $NetBSD: targ.c,v 1.75 2020/08/27 19:15:35 rillig Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
@ -69,14 +69,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: targ.c,v 1.74 2020/08/27 06:53:57 rillig Exp $";
|
static char rcsid[] = "$NetBSD: targ.c,v 1.75 2020/08/27 19:15:35 rillig Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94";
|
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: targ.c,v 1.74 2020/08/27 06:53:57 rillig Exp $");
|
__RCSID("$NetBSD: targ.c,v 1.75 2020/08/27 19:15:35 rillig Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -660,7 +660,7 @@ Targ_PrintNode(void *gnp, void *passp)
|
|||||||
fprintf(debug_file, "# unmade\n");
|
fprintf(debug_file, "# unmade\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!Lst_IsEmpty (gn->iParents)) {
|
if (!Lst_IsEmptyS(gn->iParents)) {
|
||||||
fprintf(debug_file, "# implicit parents: ");
|
fprintf(debug_file, "# implicit parents: ");
|
||||||
Lst_ForEachS(gn->iParents, TargPrintName, NULL);
|
Lst_ForEachS(gn->iParents, TargPrintName, NULL);
|
||||||
fprintf(debug_file, "\n");
|
fprintf(debug_file, "\n");
|
||||||
@ -669,17 +669,17 @@ Targ_PrintNode(void *gnp, void *passp)
|
|||||||
if (gn->unmade)
|
if (gn->unmade)
|
||||||
fprintf(debug_file, "# %d unmade children\n", gn->unmade);
|
fprintf(debug_file, "# %d unmade children\n", gn->unmade);
|
||||||
}
|
}
|
||||||
if (!Lst_IsEmpty (gn->parents)) {
|
if (!Lst_IsEmptyS(gn->parents)) {
|
||||||
fprintf(debug_file, "# parents: ");
|
fprintf(debug_file, "# parents: ");
|
||||||
Lst_ForEachS(gn->parents, TargPrintName, NULL);
|
Lst_ForEachS(gn->parents, TargPrintName, NULL);
|
||||||
fprintf(debug_file, "\n");
|
fprintf(debug_file, "\n");
|
||||||
}
|
}
|
||||||
if (!Lst_IsEmpty (gn->order_pred)) {
|
if (!Lst_IsEmptyS(gn->order_pred)) {
|
||||||
fprintf(debug_file, "# order_pred: ");
|
fprintf(debug_file, "# order_pred: ");
|
||||||
Lst_ForEachS(gn->order_pred, TargPrintName, NULL);
|
Lst_ForEachS(gn->order_pred, TargPrintName, NULL);
|
||||||
fprintf(debug_file, "\n");
|
fprintf(debug_file, "\n");
|
||||||
}
|
}
|
||||||
if (!Lst_IsEmpty (gn->order_succ)) {
|
if (!Lst_IsEmptyS(gn->order_succ)) {
|
||||||
fprintf(debug_file, "# order_succ: ");
|
fprintf(debug_file, "# order_succ: ");
|
||||||
Lst_ForEachS(gn->order_succ, TargPrintName, NULL);
|
Lst_ForEachS(gn->order_succ, TargPrintName, NULL);
|
||||||
fprintf(debug_file, "\n");
|
fprintf(debug_file, "\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user