Module Name: src Committed By: rillig Date: Sun Apr 4 10:05:09 UTC 2021
Modified Files: src/usr.bin/make: compat.c job.c main.c make.c make.h meta.c nonints.h suff.c Log Message: make: rename a few functions to be more descriptive No functional change. To generate a diff of this commit: cvs rdiff -u -r1.225 -r1.226 src/usr.bin/make/compat.c cvs rdiff -u -r1.423 -r1.424 src/usr.bin/make/job.c cvs rdiff -u -r1.534 -r1.535 src/usr.bin/make/main.c cvs rdiff -u -r1.243 -r1.244 src/usr.bin/make/make.c cvs rdiff -u -r1.259 -r1.260 src/usr.bin/make/make.h cvs rdiff -u -r1.180 -r1.181 src/usr.bin/make/meta.c cvs rdiff -u -r1.208 -r1.209 src/usr.bin/make/nonints.h cvs rdiff -u -r1.349 -r1.350 src/usr.bin/make/suff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/compat.c diff -u src/usr.bin/make/compat.c:1.225 src/usr.bin/make/compat.c:1.226 --- src/usr.bin/make/compat.c:1.225 Sat Apr 3 11:08:40 2021 +++ src/usr.bin/make/compat.c Sun Apr 4 10:05:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.225 2021/04/03 11:08:40 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.226 2021/04/04 10:05:08 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -96,7 +96,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.225 2021/04/03 11:08:40 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.226 2021/04/04 10:05:08 rillig Exp $"); static GNode *curTarg = NULL; static pid_t compatChild; @@ -536,7 +536,7 @@ MakeUnmade(GNode *gn, GNode *pgn) * We need to be re-made. * Ensure that $? (.OODATE) and $> (.ALLSRC) are both set. */ - Make_DoAllVar(gn); + GNode_SetLocalVars(gn); /* * Alter our type to tell if errors should be ignored or things Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.423 src/usr.bin/make/job.c:1.424 --- src/usr.bin/make/job.c:1.423 Sun Apr 4 09:58:51 2021 +++ src/usr.bin/make/job.c Sun Apr 4 10:05:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.423 2021/04/04 09:58:51 rillig Exp $ */ +/* $NetBSD: job.c,v 1.424 2021/04/04 10:05:08 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -142,7 +142,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.423 2021/04/04 09:58:51 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.424 2021/04/04 10:05:08 rillig Exp $"); /* * A shell defines how the commands are run. All commands for a target are @@ -441,7 +441,7 @@ enum { static sigset_t caught_signals; /* Set of signals we handle */ static volatile sig_atomic_t caught_sigchld; -static void JobDoOutput(Job *, bool); +static void CollectOutput(Job *, bool); static void JobInterrupt(bool, int) MAKE_ATTR_DEAD; static void JobRestartJobs(void); static void JobSigReset(void); @@ -1053,7 +1053,7 @@ JobClosePipes(Job *job) (void)close(job->outPipe); job->outPipe = -1; - JobDoOutput(job, true); + CollectOutput(job, true); (void)close(job->inPipe); job->inPipe = -1; } @@ -1780,7 +1780,7 @@ PrintOutput(char *cp, char *endp) /* XXX * for this job */ static void -JobDoOutput(Job *job, bool finish) +CollectOutput(Job *job, bool finish) { bool gotNL; /* true if got a newline */ bool fbuf; /* true if our buffer filled up */ @@ -1800,7 +1800,7 @@ again: if (errno == EAGAIN) return; if (DEBUG(JOB)) { - perror("JobDoOutput(piperead)"); + perror("CollectOutput(piperead)"); } nr = 0; } else { @@ -2078,7 +2078,7 @@ Job_CatchOutput(void) continue; job = jobByFdIndex[i]; if (job->status == JOB_ST_RUNNING) - JobDoOutput(job, false); + CollectOutput(job, false); #if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV) /* * With meta mode, we may have activity on the job's filemon Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.534 src/usr.bin/make/main.c:1.535 --- src/usr.bin/make/main.c:1.534 Sat Apr 3 11:08:40 2021 +++ src/usr.bin/make/main.c Sun Apr 4 10:05:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.534 2021/04/03 11:08:40 rillig Exp $ */ +/* $NetBSD: main.c,v 1.535 2021/04/04 10:05:08 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.534 2021/04/03 11:08:40 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.535 2021/04/04 10:05:08 rillig Exp $"); #if defined(MAKE_NATIVE) && !defined(lint) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -1588,7 +1588,7 @@ main_PrepareMaking(void) * Now that all search paths have been read for suffixes et al, it's * time to add the default search path to their lists... */ - Suff_DoPaths(); + Suff_ExtendPaths(); /* * Propagate attributes through :: dependency lists. Index: src/usr.bin/make/make.c diff -u src/usr.bin/make/make.c:1.243 src/usr.bin/make/make.c:1.244 --- src/usr.bin/make/make.c:1.243 Sat Apr 3 11:08:40 2021 +++ src/usr.bin/make/make.c Sun Apr 4 10:05:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.243 2021/04/03 11:08:40 rillig Exp $ */ +/* $NetBSD: make.c,v 1.244 2021/04/04 10:05:08 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -85,7 +85,8 @@ * Update the node's youngestChild field based on the * child's modification time. * - * Make_DoAllVar Set up the various local variables for a + * GNode_SetLocalVars + * Set up the various local variables for a * target, including the .ALLSRC variable, making * sure that any variable that needs to exist * at the very least has the empty value. @@ -103,7 +104,7 @@ #include "job.h" /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: make.c,v 1.243 2021/04/03 11:08:40 rillig Exp $"); +MAKE_RCSID("$NetBSD: make.c,v 1.244 2021/04/04 10:05:08 rillig Exp $"); /* Sequence # to detect recursion. */ static unsigned int checked_seqno = 1; @@ -868,7 +869,7 @@ MakeAddAllSrc(GNode *cgn, GNode *pgn) * match its ALLSRC variable. */ void -Make_DoAllVar(GNode *gn) +GNode_SetLocalVars(GNode *gn) { GNodeListNode *ln; @@ -1023,7 +1024,7 @@ MakeStartJobs(void) DEBUG0(MAKE, "out-of-date\n"); if (opts.queryFlag) return true; - Make_DoAllVar(gn); + GNode_SetLocalVars(gn); Job_Make(gn); have_token = false; } else { @@ -1037,7 +1038,7 @@ MakeStartJobs(void) * for .TARGET when building up the local * variables of its parent(s)... */ - Make_DoAllVar(gn); + GNode_SetLocalVars(gn); } Make_Update(gn); } Index: src/usr.bin/make/make.h diff -u src/usr.bin/make/make.h:1.259 src/usr.bin/make/make.h:1.260 --- src/usr.bin/make/make.h:1.259 Sat Apr 3 15:22:23 2021 +++ src/usr.bin/make/make.h Sun Apr 4 10:05:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.259 2021/04/03 15:22:23 rillig Exp $ */ +/* $NetBSD: make.h,v 1.260 2021/04/04 10:05:08 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -675,7 +675,7 @@ void Make_ExpandUse(GNodeList *); time_t Make_Recheck(GNode *); void Make_HandleUse(GNode *, GNode *); void Make_Update(GNode *); -void Make_DoAllVar(GNode *); +void GNode_SetLocalVars(GNode *); bool Make_Run(GNodeList *); bool shouldDieQuietly(GNode *, int); void PrintOnError(GNode *, const char *); Index: src/usr.bin/make/meta.c diff -u src/usr.bin/make/meta.c:1.180 src/usr.bin/make/meta.c:1.181 --- src/usr.bin/make/meta.c:1.180 Sat Apr 3 11:08:40 2021 +++ src/usr.bin/make/meta.c Sun Apr 4 10:05:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.180 2021/04/03 11:08:40 rillig Exp $ */ +/* $NetBSD: meta.c,v 1.181 2021/04/04 10:05:08 rillig Exp $ */ /* * Implement 'meta' mode. @@ -1116,7 +1116,7 @@ meta_oodate(GNode *gn, bool oodate) * requires that all variables are set in the same way that they * would be if the target needs to be re-built. */ - Make_DoAllVar(gn); + GNode_SetLocalVars(gn); meta_name(fname, sizeof fname, dname.str, tname, dname.str); Index: src/usr.bin/make/nonints.h diff -u src/usr.bin/make/nonints.h:1.208 src/usr.bin/make/nonints.h:1.209 --- src/usr.bin/make/nonints.h:1.208 Sat Apr 3 14:39:02 2021 +++ src/usr.bin/make/nonints.h Sun Apr 4 10:05:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.208 2021/04/03 14:39:02 rillig Exp $ */ +/* $NetBSD: nonints.h,v 1.209 2021/04/04 10:05:08 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -283,7 +283,7 @@ GNode *Suff_AddTransform(const char *); void Suff_EndTransform(GNode *); void Suff_AddSuffix(const char *, GNode **); SearchPath *Suff_GetPath(const char *); -void Suff_DoPaths(void); +void Suff_ExtendPaths(void); void Suff_AddInclude(const char *); void Suff_AddLib(const char *); void Suff_FindDeps(GNode *); Index: src/usr.bin/make/suff.c diff -u src/usr.bin/make/suff.c:1.349 src/usr.bin/make/suff.c:1.350 --- src/usr.bin/make/suff.c:1.349 Sat Apr 3 11:08:40 2021 +++ src/usr.bin/make/suff.c Sun Apr 4 10:05:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.349 2021/04/03 11:08:40 rillig Exp $ */ +/* $NetBSD: suff.c,v 1.350 2021/04/04 10:05:08 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -77,7 +77,8 @@ * * Suff_End Clean up the module. * - * Suff_DoPaths Extend the search path of each suffix to include the + * Suff_ExtendPaths + * Extend the search path of each suffix to include the * default search path. * * Suff_ClearSuffixes @@ -114,7 +115,7 @@ #include "dir.h" /* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */ -MAKE_RCSID("$NetBSD: suff.c,v 1.349 2021/04/03 11:08:40 rillig Exp $"); +MAKE_RCSID("$NetBSD: suff.c,v 1.350 2021/04/04 10:05:08 rillig Exp $"); typedef List SuffixList; typedef ListNode SuffixListNode; @@ -876,7 +877,7 @@ Suff_GetPath(const char *sname) * ".LIBS" and the flag is '-L'. */ void -Suff_DoPaths(void) +Suff_ExtendPaths(void) { SuffixListNode *ln; char *flags;