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: fix mistakes, spelling and typos in comme...
details: https://anonhg.NetBSD.org/src/rev/31b8db7cee9b
branches: trunk
changeset: 361104:31b8db7cee9b
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Feb 09 21:09:24 2022 +0000
description:
make: fix mistakes, spelling and typos in comments and manual page
No binary change for -DNDEBUG.
diffstat:
usr.bin/make/cond.c | 6 ++--
usr.bin/make/hash.c | 6 ++--
usr.bin/make/make.1 | 14 ++++----
usr.bin/make/parse.c | 19 ++++++------
usr.bin/make/unit-tests/Makefile | 4 +-
usr.bin/make/unit-tests/directive-elifdef.mk | 4 +-
usr.bin/make/unit-tests/directive-ifmake.mk | 4 +-
usr.bin/make/unit-tests/meta-cmd-cmp.mk | 6 ++--
usr.bin/make/unit-tests/objdir-writable.mk | 3 +-
usr.bin/make/unit-tests/opt-debug-parse.mk | 4 +-
usr.bin/make/unit-tests/suff-use.mk | 16 +++++-----
usr.bin/make/unit-tests/var-op-sunsh.mk | 4 +-
usr.bin/make/unit-tests/var-scope-local.mk | 37 ++++++++++++++----------
usr.bin/make/unit-tests/varmod-assign.mk | 9 +++--
usr.bin/make/unit-tests/varmod-order-numeric.mk | 6 ++--
usr.bin/make/unit-tests/varmod-to-separator.mk | 4 +-
usr.bin/make/unit-tests/varname.mk | 4 +-
17 files changed, 78 insertions(+), 72 deletions(-)
diffs (truncated from 505 to 300 lines):
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/cond.c
--- a/usr.bin/make/cond.c Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/cond.c Wed Feb 09 21:09:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.328 2022/02/09 21:03:13 rillig Exp $ */
+/* $NetBSD: cond.c,v 1.329 2022/02/09 21:09:24 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
#include "dir.h"
/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: cond.c,v 1.328 2022/02/09 21:03:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.329 2022/02/09 21:09:24 rillig Exp $");
/*
* Conditional expressions conform to this grammar:
@@ -286,7 +286,7 @@
return res;
}
-/* Test whether the given variable is defined. */
+/* See if the given variable is defined. */
static bool
FuncDefined(const char *var)
{
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/hash.c
--- a/usr.bin/make/hash.c Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/hash.c Wed Feb 09 21:09:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hash.c,v 1.71 2022/01/27 11:00:07 rillig Exp $ */
+/* $NetBSD: hash.c,v 1.72 2022/02/09 21:09:24 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -74,7 +74,7 @@
#include "make.h"
/* "@(#)hash.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: hash.c,v 1.71 2022/01/27 11:00:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: hash.c,v 1.72 2022/02/09 21:09:24 rillig Exp $");
/*
* The ratio of # entries to # buckets at which we rebuild the table to
@@ -283,7 +283,7 @@
HashEntry_Set(he, value);
}
-/* Delete the entry from the table and free the associated memory. */
+/* Delete the entry from the table, don't free the value of the entry. */
void
HashTable_DeleteEntry(HashTable *t, HashEntry *he)
{
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/make.1
--- a/usr.bin/make/make.1 Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/make.1 Wed Feb 09 21:09:24 2022 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.304 2022/01/29 20:54:58 sjg Exp $
+.\" $NetBSD: make.1,v 1.305 2022/02/09 21:09:24 rillig Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -692,15 +692,15 @@
.El
.Pp
Local variables can be set on a dependency line, if
-.Va .MAKE.TARGET_LOCAL_VARIABLES ,
+.Va .MAKE.TARGET_LOCAL_VARIABLES
is not set to
.Ql false .
The rest of the line
-(which will already have had Global variables expanded),
+(which will already have had global variables expanded)
is the variable value.
For example:
.Bd -literal -offset indent
-COMPILER_WRAPPERS+= ccache distcc icecc
+COMPILER_WRAPPERS= ccache distcc icecc
${OBJS}: .MAKE.META.CMP_FILTER=${COMPILER_WRAPPERS:S,^,N,}
.Ed
@@ -708,17 +708,17 @@
Only the targets
.Ql ${OBJS}
will be impacted by that filter (in "meta" mode) and
-simply enabling/disabling any of the wrappers will not render all
+simply enabling/disabling any of the compiler wrappers will not render all
of those targets out-of-date.
.Pp
.Em NOTE :
-target local variable assignments behave differently in that;
+target-local variable assignments behave differently in that;
.Bl -tag -width Ds -offset indent
.It Ic \&+=
Only appends to a previous local assignment
for the same target and variable.
.It Ic \&:=
-Is redundant with respect to Global variables,
+Is redundant with respect to global variables,
which have already been expanded.
.El
.Pp
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/parse.c Wed Feb 09 21:09:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.664 2022/02/09 21:03:13 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.665 2022/02/09 21:09:24 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.664 2022/02/09 21:03:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.665 2022/02/09 21:09:24 rillig Exp $");
/*
* A file being read.
@@ -753,14 +753,15 @@
Global_Append(".TARGETS", src);
}
+/*
+ * For the sources of a .ORDER target, create predecessor/successor links
+ * between the previous source and the current one.
+ */
static void
ApplyDependencySourceOrder(const char *src)
{
GNode *gn;
- /*
- * Create proper predecessor/successor links between the previous
- * source and the current one.
- */
+
gn = Targ_GetNode(src);
if (doing_depend)
RememberLocation(gn);
@@ -1078,9 +1079,7 @@
* shouldn't be empty.
*/
case SP_NOT:
- /*
- * Nothing special here -- targets can be empty if it wants.
- */
+ /* Nothing special here -- targets may be empty. */
break;
default:
Parse_Error(PARSE_WARNING,
@@ -1541,7 +1540,7 @@
cpp_skip_hspace(&p); /* Skip to variable name */
/*
- * During parsing, the '+' of the '+=' operator is initially parsed
+ * During parsing, the '+' of the operator '+=' is initially parsed
* as part of the variable name. It is later corrected, as is the
* ':sh' modifier. Of these two (nameEnd and eq), the earlier one
* determines the actual end of the variable name.
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/unit-tests/Makefile Wed Feb 09 21:09:24 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.305 2022/02/09 20:52:06 rillig Exp $
+# $NetBSD: Makefile,v 1.306 2022/02/09 21:09:24 rillig Exp $
#
# Unit tests for make(1)
#
@@ -665,7 +665,7 @@
.endif
LIMIT_RESOURCES?= :
-# Each test is run in a sub-make, to keep the tests for interfering with
+# Each test is run in a sub-make, to keep the tests from interfering with
# each other, and because they use different environment variables and
# command line options.
.SUFFIXES: .mk .rawout .out
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/unit-tests/directive-elifdef.mk
--- a/usr.bin/make/unit-tests/directive-elifdef.mk Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/unit-tests/directive-elifdef.mk Wed Feb 09 21:09:24 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: directive-elifdef.mk,v 1.3 2022/01/22 16:23:56 rillig Exp $
+# $NetBSD: directive-elifdef.mk,v 1.4 2022/02/09 21:09:24 rillig Exp $
#
# Tests for the .elifdef directive, which is seldom used. Instead of writing
-# '.elifdef VAR', the usual form is the more versatile '.elif defined(VAR)'.
+# '.elifdef VAR', the usual form is the more general '.elif defined(VAR)'.
# At this point, VAR is not defined, so the condition evaluates to false.
.if 0
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/unit-tests/directive-ifmake.mk
--- a/usr.bin/make/unit-tests/directive-ifmake.mk Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/unit-tests/directive-ifmake.mk Wed Feb 09 21:09:24 2022 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: directive-ifmake.mk,v 1.9 2022/01/22 16:23:56 rillig Exp $
+# $NetBSD: directive-ifmake.mk,v 1.10 2022/02/09 21:09:24 rillig Exp $
#
# Tests for the .ifmake directive, which provides a shortcut for asking
# whether a certain target is requested to be made from the command line.
#
# TODO: Describe why the shortcut may be useful (if it's useful at all),
-# instead of using the more versatile '.if make(target)'.
+# instead of using the more general '.if make(target)'.
.MAKEFLAGS: first second
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/unit-tests/meta-cmd-cmp.mk
--- a/usr.bin/make/unit-tests/meta-cmd-cmp.mk Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/unit-tests/meta-cmd-cmp.mk Wed Feb 09 21:09:24 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: meta-cmd-cmp.mk,v 1.4 2022/01/27 06:02:59 sjg Exp $
+# $NetBSD: meta-cmd-cmp.mk,v 1.5 2022/02/09 21:09:24 rillig Exp $
#
# Tests META_MODE command line comparison
#
@@ -36,7 +36,7 @@
@echo FLAGS2=${FLAGS2:Uempty} > $@
@echo This line not compared FLAGS=${FLAGS:Uempty} ${.OODATE:MNOMETA_CMP}
-COMPILER_WRAPPERS+= ccache distcc icecc
+COMPILER_WRAPPERS= ccache distcc icecc
WRAPPER?= ccache
.ifdef WITH_CMP_FILTER
.MAKE.META.CMP_FILTER+= ${COMPILER_WRAPPERS:S,^,N,}
@@ -49,7 +49,7 @@
${tf}.filter:
@echo ${WRAPPER} cc -c foo.c > $@
-# these do the same
+# these do the same
one two: .PHONY
@echo $@:
@${.MAKE} -dM -r -C ${.CURDIR} -f ${MAKEFILE} ${tests}
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/unit-tests/objdir-writable.mk
--- a/usr.bin/make/unit-tests/objdir-writable.mk Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/unit-tests/objdir-writable.mk Wed Feb 09 21:09:24 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: objdir-writable.mk,v 1.5 2021/07/04 01:28:54 sjg Exp $
+# $NetBSD: objdir-writable.mk,v 1.6 2022/02/09 21:09:24 rillig Exp $
# test checking for writable objdir
@@ -29,4 +29,3 @@
explicit-objdir:
@MAKEOBJDIR=${TMPDIR} ${.MAKE} -r -f ${MAKEFILE:tA} -C ${TMPDIR} do-objdir -V .OBJDIR
.endif
-
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/unit-tests/opt-debug-parse.mk
--- a/usr.bin/make/unit-tests/opt-debug-parse.mk Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/unit-tests/opt-debug-parse.mk Wed Feb 09 21:09:24 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: opt-debug-parse.mk,v 1.6 2022/01/08 23:52:26 rillig Exp $
+# $NetBSD: opt-debug-parse.mk,v 1.7 2022/02/09 21:09:24 rillig Exp $
#
# Tests for the -dp command line option, which adds debug logging about
# makefile parsing.
@@ -20,7 +20,7 @@
.info trace with multi-line .for loop head
.endfor
-# Before parse.c 1.461 from 2022-01-08, the debug log said it returned to
+# Before parse.c 1.641 from 2022-01-08, the debug log said it returned to
# the line of the '.include' instead of the line following it.
.include "/dev/null"
diff -r 015d1a8b8cc5 -r 31b8db7cee9b usr.bin/make/unit-tests/suff-use.mk
--- a/usr.bin/make/unit-tests/suff-use.mk Wed Feb 09 21:03:13 2022 +0000
+++ b/usr.bin/make/unit-tests/suff-use.mk Wed Feb 09 21:09:24 2022 +0000
@@ -1,28 +1,28 @@
-# $NetBSD: suff-use.mk,v 1.1 2022/02/07 22:43:50 rillig Exp $
+# $NetBSD: suff-use.mk,v 1.2 2022/02/09 21:09:24 rillig Exp $
#
# This test combines a .USE node with suffix rules, trying to add an
# additional command before and after successful compilation of a .c file.
#
# History:
-# bin/make-2001.11.12.21.58.18-plain
+# make-2001.11.12.21.58.18
# | : 'Making demo.c out of nothing'
# | make: don't know how to make demo.o. Stop
# |
-# | make: stopped in /home/rillig/proj/make-archive
+# | make: stopped in <curdir>
# | exit status 2
-# bin/make-2007.10.11.21.19.28-plain
+# make-2007.10.11.21.19.28
#
-# bin/make-2014.08.23.15.05.40-plain
+# make-2014.08.23.15.05.40
# | : 'Making demo.c out of nothing'
# | : 'Compiling demo.c to demo.o'
# | exit status 0
-# bin/make-2014.09.05.06.57.20-plain
+# make-2014.09.05.06.57.20
#
-# bin/make-2014.09.07.20.55.34-plain
+# make-2014.09.07.20.55.34
# | : 'Making demo.c out of nothing'
Home |
Main Index |
Thread Index |
Old Index