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: rename Compat_Run to Compat_MakeAll



details:   https://anonhg.NetBSD.org/src/rev/52a5e65455b1
branches:  trunk
changeset: 365978:52a5e65455b1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat May 07 08:01:20 2022 +0000

description:
make: rename Compat_Run to Compat_MakeAll

No functional change.

diffstat:

 usr.bin/make/compat.c                               |  23 +++++---------------
 usr.bin/make/job.c                                  |   6 ++--
 usr.bin/make/main.c                                 |  10 ++------
 usr.bin/make/make.h                                 |   4 +-
 usr.bin/make/unit-tests/compat-error.mk             |   4 +-
 usr.bin/make/unit-tests/deptgt-begin.mk             |  10 ++++----
 usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk |   4 +-
 usr.bin/make/unit-tests/deptgt-end-fail.mk          |   4 +-
 8 files changed, 25 insertions(+), 40 deletions(-)

diffs (212 lines):

diff -r 23bc5bf97787 -r 52a5e65455b1 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Sat May 07 07:26:27 2022 +0000
+++ b/usr.bin/make/compat.c     Sat May 07 08:01:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.238 2022/01/22 18:59:23 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.239 2022/05/07 08:01:20 rillig Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,16 +70,11 @@
  */
 
 /*
- * compat.c --
- *     The routines in this file implement the full-compatibility
- *     mode of PMake. Most of the special functionality of PMake
- *     is available in this mode. Things not supported:
- *         - different shells.
- *         - friendly variable substitution.
+ * This file implements the full-compatibility mode of make, which makes the
+ * targets without parallelism and without a custom shell.
  *
  * Interface:
- *     Compat_Run      Initialize things for this module and recreate
- *                     thems as need creatin'
+ *     Compat_MakeAll  Initialize this module and make the given targets.
  */
 
 #include <sys/types.h>
@@ -96,7 +91,7 @@
 #include "pathnames.h"
 
 /*     "@(#)compat.c   8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.238 2022/01/22 18:59:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.239 2022/05/07 08:01:20 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -689,14 +684,8 @@
                bmake_signal(SIGQUIT, CompatInterrupt);
 }
 
-/*
- * Initialize this module and start making.
- *
- * Input:
- *     targs           The target nodes to re-create
- */
 void
-Compat_Run(GNodeList *targs)
+Compat_MakeAll(GNodeList *targs)
 {
        GNode *errorNode = NULL;
 
diff -r 23bc5bf97787 -r 52a5e65455b1 usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sat May 07 07:26:27 2022 +0000
+++ b/usr.bin/make/job.c        Sat May 07 08:01:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.452 2022/02/12 11:14:48 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.453 2022/05/07 08:01:20 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.452 2022/02/12 11:14:48 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.453 2022/05/07 08:01:20 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -2303,7 +2303,7 @@
        (void)Job_RunTarget(".BEGIN", NULL);
        /*
         * Create the .END node now, even though no code in the unit tests
-        * depends on it.  See also Targ_GetEndNode in Compat_Run.
+        * depends on it.  See also Targ_GetEndNode in Compat_MakeAll.
         */
        (void)Targ_GetEndNode();
 }
diff -r 23bc5bf97787 -r 52a5e65455b1 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sat May 07 07:26:27 2022 +0000
+++ b/usr.bin/make/main.c       Sat May 07 08:01:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.580 2022/04/18 15:06:27 rillig Exp $        */
+/*     $NetBSD: main.c,v 1.581 2022/05/07 08:01:20 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.580 2022/04/18 15:06:27 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.581 2022/05/07 08:01:20 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
            "The Regents of the University of California.  "
@@ -903,11 +903,7 @@
                /* Traverse the graph, checking on all the targets */
                outOfDate = Make_Run(&targs);
        } else {
-               /*
-                * Compat_Init will take care of creating all the
-                * targets as well as initializing the module.
-                */
-               Compat_Run(&targs);
+               Compat_MakeAll(&targs);
                outOfDate = false;
        }
        Lst_Done(&targs);       /* Don't free the targets themselves. */
diff -r 23bc5bf97787 -r 52a5e65455b1 usr.bin/make/make.h
--- a/usr.bin/make/make.h       Sat May 07 07:26:27 2022 +0000
+++ b/usr.bin/make/make.h       Sat May 07 08:01:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.300 2022/04/18 15:06:27 rillig Exp $        */
+/*     $NetBSD: make.h,v 1.301 2022/05/07 08:01:20 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -788,7 +788,7 @@
 
 /* compat.c */
 bool Compat_RunCommand(const char *, GNode *, StringListNode *);
-void Compat_Run(GNodeList *);
+void Compat_MakeAll(GNodeList *);
 void Compat_Make(GNode *, GNode *);
 
 /* cond.c */
diff -r 23bc5bf97787 -r 52a5e65455b1 usr.bin/make/unit-tests/compat-error.mk
--- a/usr.bin/make/unit-tests/compat-error.mk   Sat May 07 07:26:27 2022 +0000
+++ b/usr.bin/make/unit-tests/compat-error.mk   Sat May 07 08:01:20 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: compat-error.mk,v 1.3 2020/12/13 19:33:53 rillig Exp $
+# $NetBSD: compat-error.mk,v 1.4 2022/05/07 08:01:20 rillig Exp $
 #
 # Test detailed error handling in compat mode.
 #
@@ -11,7 +11,7 @@
 # XXX: As of 2020-12-13, .ERROR_CMD is empty, which is wrong.
 #
 # See also:
-#      Compat_Run
+#      Compat_MakeAll
 #
 #      The commit that added the NULL command to gn->commands:
 #              CVS: 1994.06.06.22.45.??
diff -r 23bc5bf97787 -r 52a5e65455b1 usr.bin/make/unit-tests/deptgt-begin.mk
--- a/usr.bin/make/unit-tests/deptgt-begin.mk   Sat May 07 07:26:27 2022 +0000
+++ b/usr.bin/make/unit-tests/deptgt-begin.mk   Sat May 07 08:01:20 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: deptgt-begin.mk,v 1.5 2020/11/15 22:28:08 rillig Exp $
+# $NetBSD: deptgt-begin.mk,v 1.6 2022/05/07 08:01:20 rillig Exp $
 #
 # Tests for the special target .BEGIN in dependency declarations,
 # which is a container for commands that are run before any other
@@ -25,8 +25,8 @@
 
 # Another way is to define a custom target and make that a .USE dependency.
 # For the .BEGIN target, .USE dependencies do not work though, since in
-# Compat_Run, the .USE and .USEBEFORE nodes are expanded right after the
-# .BEGIN target has been run, which is too late.
+# Compat_MakeAll, the .USE and .USEBEFORE nodes are expanded right after the
+# .BEGIN target has been made, which is too late.
 .BEGIN: use
 use: .USE .NOTMAIN
        : Making $@ from a .USE dependency.
@@ -35,8 +35,8 @@
 # .BEGIN target.
 #
 # For the .BEGIN target, .USEBEFORE dependencies do not work though, since in
-# Compat_Run, the .USE and .USEBEFORE nodes are expanded right after the
-# .BEGIN target has been run, which is too late.
+# Compat_MakeAll, the .USE and .USEBEFORE nodes are expanded right after the
+# .BEGIN target has been made, which is too late.
 .BEGIN: use-before
 use-before: .USEBEFORE .NOTMAIN
        : Making $@ from a .USEBEFORE dependency.
diff -r 23bc5bf97787 -r 52a5e65455b1 usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk
--- a/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk       Sat May 07 07:26:27 2022 +0000
+++ b/usr.bin/make/unit-tests/deptgt-end-fail-indirect.mk       Sat May 07 08:01:20 2022 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: deptgt-end-fail-indirect.mk,v 1.2 2020/12/06 21:22:04 rillig Exp $
+# $NetBSD: deptgt-end-fail-indirect.mk,v 1.3 2022/05/07 08:01:20 rillig Exp $
 #
 # Tests for an error in a dependency of the .END node.
 #
 # Before 2020-11-25, an error in the .END target did not print the "Stop."
 # and exited with status 0.  The cause for this was a missing condition in
-# Compat_Run in the handling of the .END node.
+# Compat_MakeAll in the handling of the .END node.
 
 all:
        : $@
diff -r 23bc5bf97787 -r 52a5e65455b1 usr.bin/make/unit-tests/deptgt-end-fail.mk
--- a/usr.bin/make/unit-tests/deptgt-end-fail.mk        Sat May 07 07:26:27 2022 +0000
+++ b/usr.bin/make/unit-tests/deptgt-end-fail.mk        Sat May 07 08:01:20 2022 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: deptgt-end-fail.mk,v 1.6 2020/12/07 01:04:07 rillig Exp $
+# $NetBSD: deptgt-end-fail.mk,v 1.7 2022/05/07 08:01:20 rillig Exp $
 #
 # Tests for an errors in the main target, its dependencies,
 # the .END node and its dependencies.
 #
 # Before 2020-11-25, an error in the .END target did not print the "Stop.",
 # even though this was intended.  The cause for this was a missing condition
-# in Compat_Run, in the code handling the .END node.
+# in Compat_MakeAll, in the code handling the .END node.
 
 test: .PHONY
 



Home | Main Index | Thread Index | Old Index