Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): remove comment decoration



details:   https://anonhg.NetBSD.org/src/rev/8a86d3ad0556
branches:  trunk
changeset: 946718:8a86d3ad0556
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Dec 06 18:13:17 2020 +0000

description:
make(1): remove comment decoration

diffstat:

 usr.bin/make/arch.c |  20 ++++++++------------
 usr.bin/make/dir.c  |  25 +++++++++----------------
 usr.bin/make/job.c  |  50 ++++++++++++++++++++------------------------------
 usr.bin/make/make.c |  24 ++++++++++--------------
 usr.bin/make/var.c  |  41 ++++++++++++++++-------------------------
 5 files changed, 63 insertions(+), 97 deletions(-)

diffs (truncated from 368 to 300 lines):

diff -r 40853cc98c97 -r 8a86d3ad0556 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Sun Dec 06 17:41:52 2020 +0000
+++ b/usr.bin/make/arch.c       Sun Dec 06 18:13:17 2020 +0000
@@ -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 @@
 }
 
 #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)
diff -r 40853cc98c97 -r 8a86d3ad0556 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sun Dec 06 17:41:52 2020 +0000
+++ b/usr.bin/make/dir.c        Sun Dec 06 18:13:17 2020 +0000
@@ -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 @@
        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)
diff -r 40853cc98c97 -r 8a86d3ad0556 usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sun Dec 06 17:41:52 2020 +0000
+++ b/usr.bin/make/job.c        Sun Dec 06 18:13:17 2020 +0000
@@ -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 @@
     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 @@
     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 @@
  *     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 @@
     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 @@
  *                     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)
diff -r 40853cc98c97 -r 8a86d3ad0556 usr.bin/make/make.c
--- a/usr.bin/make/make.c       Sun Dec 06 17:41:52 2020 +0000
+++ b/usr.bin/make/make.c       Sun Dec 06 18:13:17 2020 +0000
@@ -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 @@
     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 @@
  *     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)
diff -r 40853cc98c97 -r 8a86d3ad0556 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sun Dec 06 17:41:52 2020 +0000
+++ b/usr.bin/make/var.c        Sun Dec 06 18:13:17 2020 +0000
@@ -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 @@
                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 @@
  *     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 @@



Home | Main Index | Thread Index | Old Index