make(1): remove comment decoration
This commit is contained in:
parent
16ad1eafba
commit
2069cc7bbf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: arch.c,v 1.186 2020/12/05 18:15:40 rillig Exp $ */
|
||||
/* $NetBSD: arch.c,v 1.187 2020/12/06 18:13:17 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -125,7 +125,7 @@
|
||||
#include "config.h"
|
||||
|
||||
/* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */
|
||||
MAKE_RCSID("$NetBSD: arch.c,v 1.186 2020/12/05 18:15:40 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: arch.c,v 1.187 2020/12/06 18:13:17 rillig Exp $");
|
||||
|
||||
typedef struct List ArchList;
|
||||
typedef struct ListNode ArchListNode;
|
||||
@ -593,22 +593,18 @@ badarch:
|
||||
}
|
||||
|
||||
#ifdef SVR4ARCHIVES
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* ArchSVR4Entry --
|
||||
* Parse an SVR4 style entry that begins with a slash.
|
||||
* If it is "//", then load the table of filenames
|
||||
* If it is "/<offset>", then try to substitute the long file name
|
||||
* from offset of a table previously read.
|
||||
* If a table is read, the file pointer is moved to the next archive
|
||||
* member.
|
||||
/*
|
||||
* Parse an SVR4 style entry that begins with a slash.
|
||||
* If it is "//", then load the table of filenames.
|
||||
* If it is "/<offset>", then try to substitute the long file name
|
||||
* from offset of a table previously read.
|
||||
* If a table is read, the file pointer is moved to the next archive member.
|
||||
*
|
||||
* Results:
|
||||
* -1: Bad data in archive
|
||||
* 0: A table was loaded from the file
|
||||
* 1: Name was successfully substituted from table
|
||||
* 2: Name was not successfully substituted from table
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
ArchSVR4Entry(Arch *ar, char *inout_name, size_t size, FILE *arch)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dir.c,v 1.250 2020/12/06 10:49:02 rillig Exp $ */
|
||||
/* $NetBSD: dir.c,v 1.251 2020/12/06 18:13:17 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||
@ -136,7 +136,7 @@
|
||||
#include "job.h"
|
||||
|
||||
/* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */
|
||||
MAKE_RCSID("$NetBSD: dir.c,v 1.250 2020/12/06 10:49:02 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: dir.c,v 1.251 2020/12/06 18:13:17 rillig Exp $");
|
||||
|
||||
/* A search path is a list of CachedDir structures. A CachedDir has in it the
|
||||
* name of the directory and the names of all the files in the directory.
|
||||
@ -1554,26 +1554,19 @@ Dir_CopyDirSearchPath(void)
|
||||
return path;
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* SearchPath_ToFlags --
|
||||
* Make a string by taking all the directories in the given search
|
||||
* path and preceding them by the given flag. Used by the suffix
|
||||
* module to create variables for compilers based on suffix search
|
||||
* paths.
|
||||
/*
|
||||
* Make a string by taking all the directories in the given search path and
|
||||
* preceding them by the given flag. Used by the suffix module to create
|
||||
* variables for compilers based on suffix search paths.
|
||||
*
|
||||
* Input:
|
||||
* flag flag which should precede each directory
|
||||
* path list of directories
|
||||
*
|
||||
* Results:
|
||||
* The string mentioned above. Note that there is no space between
|
||||
* the given flag and each directory. The empty string is returned if
|
||||
* Things don't go well.
|
||||
*
|
||||
* Side Effects:
|
||||
* None
|
||||
*-----------------------------------------------------------------------
|
||||
* The string mentioned above. Note that there is no space between the
|
||||
* given flag and each directory. The empty string is returned if things
|
||||
* don't go well.
|
||||
*/
|
||||
char *
|
||||
SearchPath_ToFlags(const char *flag, SearchPath *path)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: job.c,v 1.337 2020/12/05 18:15:40 rillig Exp $ */
|
||||
/* $NetBSD: job.c,v 1.338 2020/12/06 18:13:17 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
|
||||
@ -143,7 +143,7 @@
|
||||
#include "trace.h"
|
||||
|
||||
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: job.c,v 1.337 2020/12/05 18:15:40 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: job.c,v 1.338 2020/12/06 18:13:17 rillig Exp $");
|
||||
|
||||
/* A shell defines how the commands are run. All commands for a target are
|
||||
* written into a single file, which is then given to the shell to execute
|
||||
@ -708,26 +708,23 @@ JobPrintln(Job *job, const char *line)
|
||||
JobPrintf(job, "%s\n", line);
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* JobPrintCommand --
|
||||
* Put out another command for the given job. If the command starts
|
||||
* with an @ or a - we process it specially. In the former case,
|
||||
* so long as the -s and -n flags weren't given to make, we stick
|
||||
* a shell-specific echoOff command in the script. In the latter,
|
||||
* we ignore errors for the entire job, unless the shell has error
|
||||
* control.
|
||||
* If the command is just "..." we take all future commands for this
|
||||
* job to be commands to be executed once the entire graph has been
|
||||
* made and return non-zero to signal that the end of the commands
|
||||
* was reached. These commands are later attached to the .END
|
||||
* node and executed by Job_End when all things are done.
|
||||
/*
|
||||
* Put out another command for the given job. If the command starts with an
|
||||
* '@' or a '-' we process it specially. In the former case, so long as the
|
||||
* -s and -n flags weren't given to make, we stick a shell-specific echoOff
|
||||
* command in the script. In the latter, we ignore errors for the entire job,
|
||||
* unless the shell has error control.
|
||||
*
|
||||
* If the command is just "..." we take all future commands for this job to
|
||||
* be commands to be executed once the entire graph has been made and return
|
||||
* non-zero to signal that the end of the commands was reached. These commands
|
||||
* are later attached to the .END node and executed by Job_End when all things
|
||||
* are done.
|
||||
*
|
||||
* Side Effects:
|
||||
* If the command begins with a '-' and the shell has no error control,
|
||||
* the JOB_IGNERR flag is set in the job descriptor.
|
||||
* numCommands is incremented if the command is actually printed.
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
JobPrintCommand(Job *job, char *cmd)
|
||||
@ -1436,11 +1433,9 @@ JobMakeArgv(Job *job, char **argv)
|
||||
argv[argc] = NULL;
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* JobStart --
|
||||
* Start a target-creation process going for the target described
|
||||
* by the graph node gn.
|
||||
/*
|
||||
* Start a target-creation process going for the target described by the
|
||||
* graph node gn.
|
||||
*
|
||||
* Input:
|
||||
* gn target to create
|
||||
@ -1457,7 +1452,6 @@ JobMakeArgv(Job *job, char **argv)
|
||||
* jobs. PMake is forked and a child shell created.
|
||||
*
|
||||
* NB: The return value is ignored by everyone.
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
static JobStartResult
|
||||
JobStart(GNode *gn, JobFlags flags)
|
||||
@ -2192,11 +2186,9 @@ FindShellByName(const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* Job_ParseShell --
|
||||
* Parse a shell specification and set up commandShell, shellPath
|
||||
* and shellName appropriately.
|
||||
/*
|
||||
* Parse a shell specification and set up commandShell, shellPath and
|
||||
* shellName appropriately.
|
||||
*
|
||||
* Input:
|
||||
* line The shell spec
|
||||
@ -2236,8 +2228,6 @@ FindShellByName(const char *name)
|
||||
* is TRUE or template of command to execute a
|
||||
* command so as to ignore any errors it returns if
|
||||
* hasErrCtl is FALSE.
|
||||
*
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
Boolean
|
||||
Job_ParseShell(char *line)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: make.c,v 1.226 2020/11/28 23:50:58 rillig Exp $ */
|
||||
/* $NetBSD: make.c,v 1.227 2020/12/06 18:13:17 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -102,7 +102,7 @@
|
||||
#include "job.h"
|
||||
|
||||
/* "@(#)make.c 8.1 (Berkeley) 6/6/93" */
|
||||
MAKE_RCSID("$NetBSD: make.c,v 1.226 2020/11/28 23:50:58 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: make.c,v 1.227 2020/12/06 18:13:17 rillig Exp $");
|
||||
|
||||
/* Sequence # to detect recursion. */
|
||||
static unsigned int checked_seqno = 1;
|
||||
@ -1289,17 +1289,14 @@ Make_ProcessWait(GNodeList *targs)
|
||||
Lst_Done(&examine);
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* Make_Run --
|
||||
* Initialize the nodes to remake and the list of nodes which are
|
||||
* ready to be made by doing a breadth-first traversal of the graph
|
||||
* starting from the nodes in the given list. Once this traversal
|
||||
* is finished, all the 'leaves' of the graph are in the toBeMade
|
||||
* queue.
|
||||
* Using this queue and the Job module, work back up the graph,
|
||||
* calling on MakeStartJobs to keep the job table as full as
|
||||
* possible.
|
||||
/*
|
||||
* Initialize the nodes to remake and the list of nodes which are ready to
|
||||
* be made by doing a breadth-first traversal of the graph starting from the
|
||||
* nodes in the given list. Once this traversal is finished, all the 'leaves'
|
||||
* of the graph are in the toBeMade queue.
|
||||
*
|
||||
* Using this queue and the Job module, work back up the graph, calling on
|
||||
* MakeStartJobs to keep the job table as full as possible.
|
||||
*
|
||||
* Input:
|
||||
* targs the initial list of targets
|
||||
@ -1311,7 +1308,6 @@ Make_ProcessWait(GNodeList *targs)
|
||||
* The make field of all nodes involved in the creation of the given
|
||||
* targets is set to 1. The toBeMade list is set to contain all the
|
||||
* 'leaves' of these subgraphs.
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
Boolean
|
||||
Make_Run(GNodeList *targs)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: var.c,v 1.717 2020/12/06 17:41:52 rillig Exp $ */
|
||||
/* $NetBSD: var.c,v 1.718 2020/12/06 18:13:17 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -130,7 +130,7 @@
|
||||
#include "metachar.h"
|
||||
|
||||
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
|
||||
MAKE_RCSID("$NetBSD: var.c,v 1.717 2020/12/06 17:41:52 rillig Exp $");
|
||||
MAKE_RCSID("$NetBSD: var.c,v 1.718 2020/12/06 18:13:17 rillig Exp $");
|
||||
|
||||
/* A string that may need to be freed after use. */
|
||||
typedef struct FStr {
|
||||
@ -943,13 +943,11 @@ out:
|
||||
VarFreeEnv(v, TRUE);
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* Var_Set --
|
||||
* Set the variable name to the value val in the given context.
|
||||
/*
|
||||
* Set the variable name to the value val in the given context.
|
||||
*
|
||||
* If the variable doesn't yet exist, it is created.
|
||||
* Otherwise the new value overwrites and replaces the old value.
|
||||
* If the variable doesn't yet exist, it is created.
|
||||
* Otherwise the new value overwrites and replaces the old value.
|
||||
*
|
||||
* Input:
|
||||
* name name of the variable to set, is expanded once
|
||||
@ -965,7 +963,6 @@ out:
|
||||
* set, say, $(@) or $(<).
|
||||
* If the context is VAR_GLOBAL though, we check if the variable
|
||||
* was set in VAR_CMDLINE from the command line and skip it if so.
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
Var_Set(const char *name, const char *val, GNode *ctxt)
|
||||
@ -973,14 +970,12 @@ Var_Set(const char *name, const char *val, GNode *ctxt)
|
||||
Var_SetWithFlags(name, val, ctxt, VAR_SET_NONE);
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* Var_Append --
|
||||
* The variable of the given name has the given value appended to it in
|
||||
* the given context.
|
||||
/*
|
||||
* The variable of the given name has the given value appended to it in the
|
||||
* given context.
|
||||
*
|
||||
* If the variable doesn't exist, it is created. Otherwise the strings
|
||||
* are concatenated, with a space in between.
|
||||
* If the variable doesn't exist, it is created. Otherwise the strings are
|
||||
* concatenated, with a space in between.
|
||||
*
|
||||
* Input:
|
||||
* name name of the variable to modify, is expanded once
|
||||
@ -994,7 +989,6 @@ Var_Set(const char *name, const char *val, GNode *ctxt)
|
||||
* an actual target, it will only search that context since only
|
||||
* a local variable could be being appended to. This is actually
|
||||
* a big win and must be tolerated.
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
Var_Append(const char *name, const char *val, GNode *ctxt)
|
||||
@ -1080,11 +1074,9 @@ Var_Exists(const char *name, GNode *ctxt)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
* Var_Value --
|
||||
* Return the unexpanded value of the given variable in the given
|
||||
* context, or the usual contexts.
|
||||
/*
|
||||
* Return the unexpanded value of the given variable in the given context,
|
||||
* or the usual contexts.
|
||||
*
|
||||
* Input:
|
||||
* name name to find, is not expanded any further
|
||||
@ -1094,7 +1086,6 @@ Var_Exists(const char *name, GNode *ctxt)
|
||||
* The value if the variable exists, NULL if it doesn't.
|
||||
* If the returned value is not NULL, the caller must free
|
||||
* out_freeIt when the returned value is no longer needed.
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
const char *
|
||||
Var_Value(const char *name, GNode *ctxt, void **out_freeIt)
|
||||
@ -1628,7 +1619,8 @@ ModifyWord_Realpath(const char *word, SepBuf *buf, void *data MAKE_ATTR_UNUSED)
|
||||
SepBuf_AddStr(buf, word);
|
||||
}
|
||||
|
||||
/* Modify each of the words of the passed string using the given function.
|
||||
/*
|
||||
* Modify each of the words of the passed string using the given function.
|
||||
*
|
||||
* Input:
|
||||
* str String whose words should be modified
|
||||
@ -1637,7 +1629,6 @@ ModifyWord_Realpath(const char *word, SepBuf *buf, void *data MAKE_ATTR_UNUSED)
|
||||
*
|
||||
* Results:
|
||||
* A string of all the words modified appropriately.
|
||||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
static char *
|
||||
ModifyWords(const char *str,
|
||||
|
Loading…
Reference in New Issue
Block a user