diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index ae92227f7055..627e654387f8 100644 --- a/usr.bin/make/dir.c +++ b/usr.bin/make/dir.c @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.271 2021/04/03 11:08:40 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.272 2021/04/04 10:13:09 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -138,7 +138,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.271 2021/04/03 11:08:40 rillig Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.272 2021/04/04 10:13:09 rillig Exp $"); /* * A search path is a list of CachedDir structures. A CachedDir has in it the @@ -217,7 +217,7 @@ struct CachedDir { * and "./." are different. * * Not sure what happens when .CURDIR is assigned a new value; see - * Parse_DoVar. + * Parse_Var. */ char *name; diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 0d18ddf6c9fd..b5b3dd00784e 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.535 2021/04/04 10:05:08 rillig Exp $ */ +/* $NetBSD: main.c,v 1.536 2021/04/04 10:13:09 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.535 2021/04/04 10:05:08 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.536 2021/04/04 10:13:09 rillig Exp $"); #if defined(MAKE_NATIVE) && !defined(lint) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -655,7 +655,7 @@ rearg: for (; argc > 1; argv++, argc--) { VarAssign var; if (Parse_IsVar(argv[1], &var)) { - Parse_DoVar(&var, SCOPE_CMDLINE); + Parse_Var(&var, SCOPE_CMDLINE); } else { if (argv[1][0] == '\0') Punt("illegal (null) argument."); diff --git a/usr.bin/make/nonints.h b/usr.bin/make/nonints.h index f499d4ebeb2e..2a3ebdb9e6ff 100644 --- a/usr.bin/make/nonints.h +++ b/usr.bin/make/nonints.h @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.209 2021/04/04 10:05:08 rillig Exp $ */ +/* $NetBSD: nonints.h,v 1.210 2021/04/04 10:13:09 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -159,7 +159,7 @@ typedef char *(*ReadMoreProc)(void *, size_t *); void Parse_Error(ParseErrorLevel, const char *, ...) MAKE_ATTR_PRINTFLIKE(2, 3); bool Parse_IsVar(const char *, VarAssign *out_var); -void Parse_DoVar(VarAssign *, GNode *); +void Parse_Var(VarAssign *, GNode *); void Parse_AddIncludeDir(const char *); void Parse_File(const char *, int); void Parse_SetInput(const char *, int, int, ReadMoreProc, void *); diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 7bc8cfc6cad0..152338a6ad00 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.555 2021/04/04 09:58:51 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.556 2021/04/04 10:13:09 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -109,7 +109,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.555 2021/04/04 09:58:51 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.556 2021/04/04 10:13:09 rillig Exp $"); /* types and constants */ @@ -876,7 +876,7 @@ ParseDependencySourceMain(const char *src) * list of things to create, but only if the user didn't specify a * target on the command line and .MAIN occurs for the first time. * - * See ParseDoDependencyTargetSpecial, branch SP_MAIN. + * See ParseDependencyTargetSpecial, branch SP_MAIN. * See unit-tests/cond-func-make-main.mk. */ Lst_Append(&opts.create, bmake_strdup(src)); @@ -1056,9 +1056,9 @@ ParseDependencyTargetWord(const char **pp, const char *lstart) /* Handle special targets like .PATH, .DEFAULT, .BEGIN, .ORDER. */ static void -ParseDoDependencyTargetSpecial(ParseSpecial *inout_specType, - const char *targetName, - SearchPathList **inout_paths) +ParseDependencyTargetSpecial(ParseSpecial *inout_specType, + const char *targetName, + SearchPathList **inout_paths) { switch (*inout_specType) { case SP_PATH: @@ -1122,8 +1122,8 @@ ParseDoDependencyTargetSpecial(ParseSpecial *inout_specType, * Call on the suffix module to give us a path to modify. */ static bool -ParseDoDependencyTargetPath(const char *suffixName, - SearchPathList **inout_paths) +ParseDependencyTargetPath(const char *suffixName, + SearchPathList **inout_paths) { SearchPath *path; @@ -1145,9 +1145,9 @@ ParseDoDependencyTargetPath(const char *suffixName, * See if it's a special target and if so set specType to match it. */ static bool -ParseDoDependencyTarget(const char *targetName, - ParseSpecial *inout_specType, - GNodeType *out_tOp, SearchPathList **inout_paths) +ParseDependencyTarget(const char *targetName, + ParseSpecial *inout_specType, + GNodeType *out_tOp, SearchPathList **inout_paths) { int keywd; @@ -1169,19 +1169,19 @@ ParseDoDependencyTarget(const char *targetName, *inout_specType = parseKeywords[keywd].spec; *out_tOp = parseKeywords[keywd].op; - ParseDoDependencyTargetSpecial(inout_specType, targetName, + ParseDependencyTargetSpecial(inout_specType, targetName, inout_paths); } else if (strncmp(targetName, ".PATH", 5) == 0) { *inout_specType = SP_PATH; - if (!ParseDoDependencyTargetPath(targetName + 5, inout_paths)) + if (!ParseDependencyTargetPath(targetName + 5, inout_paths)) return false; } return true; } static void -ParseDoDependencyTargetMundane(char *targetName, StringList *curTargs) +ParseDependencyTargetMundane(char *targetName, StringList *curTargs) { if (Dir_HasWildcards(targetName)) { /* @@ -1218,7 +1218,7 @@ ParseDoDependencyTargetMundane(char *targetName, StringList *curTargs) } static void -ParseDoDependencyTargetExtraWarn(char **pp, const char *lstart) +ParseDependencyTargetExtraWarn(char **pp, const char *lstart) { bool warning = false; char *cp = *pp; @@ -1237,7 +1237,7 @@ ParseDoDependencyTargetExtraWarn(char **pp, const char *lstart) } static void -ParseDoDependencyCheckSpec(ParseSpecial specType) +ParseDependencyCheckSpec(ParseSpecial specType) { switch (specType) { default: @@ -1262,7 +1262,7 @@ ParseDoDependencyCheckSpec(ParseSpecial specType) } static bool -ParseDoDependencyParseOp(char **pp, const char *lstart, GNodeType *out_op) +ParseDependencyParseOp(char **pp, const char *lstart, GNodeType *out_op) { const char *cp = *pp; @@ -1304,7 +1304,7 @@ ClearPaths(SearchPathList *paths) } static void -ParseDoDependencySourcesEmpty(ParseSpecial specType, SearchPathList *paths) +ParseDependencySourcesEmpty(ParseSpecial specType, SearchPathList *paths) { switch (specType) { case SP_SUFFIXES: @@ -1370,8 +1370,8 @@ AddToPaths(const char *dir, SearchPathList *paths) * and will cause make to do a new chdir to that path. */ static void -ParseDoDependencySourceSpecial(ParseSpecial specType, char *word, - SearchPathList *paths) +ParseDependencySourceSpecial(ParseSpecial specType, char *word, + SearchPathList *paths) { switch (specType) { case SP_SUFFIXES: @@ -1398,13 +1398,13 @@ ParseDoDependencySourceSpecial(ParseSpecial specType, char *word, } static bool -ParseDoDependencyTargets(char **inout_cp, - char **inout_line, - const char *lstart, - ParseSpecial *inout_specType, - GNodeType *inout_tOp, - SearchPathList **inout_paths, - StringList *curTargs) +ParseDependencyTargets(char **inout_cp, + char **inout_line, + const char *lstart, + ParseSpecial *inout_specType, + GNodeType *inout_tOp, + SearchPathList **inout_paths, + StringList *curTargs) { char *cp; char *tgt = *inout_line; @@ -1461,7 +1461,7 @@ ParseDoDependencyTargets(char **inout_cp, savec = *cp; *cp = '\0'; - if (!ParseDoDependencyTarget(tgt, inout_specType, inout_tOp, + if (!ParseDependencyTarget(tgt, inout_specType, inout_tOp, inout_paths)) return false; @@ -1470,7 +1470,7 @@ ParseDoDependencyTargets(char **inout_cp, * the end of the targets list */ if (*inout_specType == SP_NOT && *tgt != '\0') - ParseDoDependencyTargetMundane(tgt, curTargs); + ParseDependencyTargetMundane(tgt, curTargs); else if (*inout_specType == SP_PATH && *tgt != '.' && *tgt != '\0') Parse_Error(PARSE_WARNING, "Extra target (%s) ignored", @@ -1484,7 +1484,7 @@ ParseDoDependencyTargets(char **inout_cp, * we allow on this line. */ if (*inout_specType != SP_NOT && *inout_specType != SP_PATH) - ParseDoDependencyTargetExtraWarn(&cp, lstart); + ParseDependencyTargetExtraWarn(&cp, lstart); else pp_skip_whitespace(&cp); @@ -1502,8 +1502,8 @@ ParseDoDependencyTargets(char **inout_cp, } static void -ParseDoDependencySourcesSpecial(char *start, char *end, - ParseSpecial specType, SearchPathList *paths) +ParseDependencySourcesSpecial(char *start, char *end, + ParseSpecial specType, SearchPathList *paths) { char savec; @@ -1512,7 +1512,7 @@ ParseDoDependencySourcesSpecial(char *start, char *end, end++; savec = *end; *end = '\0'; - ParseDoDependencySourceSpecial(specType, start, paths); + ParseDependencySourceSpecial(specType, start, paths); *end = savec; if (savec != '\0') end++; @@ -1522,8 +1522,8 @@ ParseDoDependencySourcesSpecial(char *start, char *end, } static bool -ParseDoDependencySourcesMundane(char *start, char *end, - ParseSpecial specType, GNodeType tOp) +ParseDependencySourcesMundane(char *start, char *end, + ParseSpecial specType, GNodeType tOp) { while (*start != '\0') { /* @@ -1583,7 +1583,7 @@ ParseDoDependencySourcesMundane(char *start, char *end, * * The operator is applied to each node in the global 'targets' list, * which is where the nodes found for the targets are kept, by means of - * the ParseDoOp function. + * the ParseOp function. * * The sources are parsed in much the same way as the targets, except * that they are expanded using the wildcarding scheme of the C-Shell, @@ -1602,7 +1602,7 @@ ParseDoDependencySourcesMundane(char *start, char *end, * Upon return, the value of the line is unspecified. */ static void -ParseDoDependency(char *line) +ParseDependency(char *line) { char *cp; /* our current position */ GNodeType op; /* the operator on the line */ @@ -1620,7 +1620,7 @@ ParseDoDependency(char *line) */ ParseSpecial specType = SP_NOT; - DEBUG1(PARSE, "ParseDoDependency(%s)\n", line); + DEBUG1(PARSE, "ParseDependency(%s)\n", line); tOp = OP_NONE; paths = NULL; @@ -1629,7 +1629,7 @@ ParseDoDependency(char *line) * First, grind through the targets. */ /* XXX: don't use line as an iterator variable */ - if (!ParseDoDependencyTargets(&cp, &line, lstart, &specType, &tOp, + if (!ParseDependencyTargets(&cp, &line, lstart, &specType, &tOp, &paths, &curTargs)) goto out; @@ -1641,12 +1641,12 @@ ParseDoDependency(char *line) Lst_Init(&curTargs); if (!Lst_IsEmpty(targets)) - ParseDoDependencyCheckSpec(specType); + ParseDependencyCheckSpec(specType); /* * Have now parsed all the target names. Must parse the operator next. */ - if (!ParseDoDependencyParseOp(&cp, lstart, &op)) + if (!ParseDependencyParseOp(&cp, lstart, &op)) goto out; /* @@ -1675,7 +1675,7 @@ ParseDoDependency(char *line) * a .PATH removes all directories from the search path(s). */ if (line[0] == '\0') { - ParseDoDependencySourcesEmpty(specType, paths); + ParseDependencySourcesEmpty(specType, paths); } else if (specType == SP_MFLAGS) { /* * Call on functions in main.c to deal with these arguments and @@ -1700,7 +1700,7 @@ ParseDoDependency(char *line) if (specType == SP_SUFFIXES || specType == SP_PATH || specType == SP_INCLUDES || specType == SP_LIBS || specType == SP_NULL || specType == SP_OBJDIR) { - ParseDoDependencySourcesSpecial(line, cp, specType, paths); + ParseDependencySourcesSpecial(line, cp, specType, paths); if (paths != NULL) { Lst_Free(paths); paths = NULL; @@ -1709,7 +1709,7 @@ ParseDoDependency(char *line) Dir_SetPATH(); } else { assert(paths == NULL); - if (!ParseDoDependencySourcesMundane(line, cp, specType, tOp)) + if (!ParseDependencySourcesMundane(line, cp, specType, tOp)) goto out; } @@ -1989,7 +1989,7 @@ VarAssignSpecial(const char *name, const char *avalue) /* Perform the variable variable assignment in the given scope. */ void -Parse_DoVar(VarAssign *var, GNode *scope) +Parse_Var(VarAssign *var, GNode *scope) { FStr avalue; /* actual value (maybe expanded) */ @@ -2209,7 +2209,7 @@ IncludeFile(char *file, bool isSystem, bool depinc, bool silent) } static void -ParseDoInclude(char *directive) +ParseInclude(char *directive) { char endc; /* the character which ends the file spec */ char *cp; /* current position in file spec */ @@ -2994,7 +2994,7 @@ ParseDirective(char *line) pp_skip_whitespace(&cp); if (IsInclude(cp, false)) { - ParseDoInclude(cp); + ParseInclude(cp); return true; } @@ -3049,7 +3049,7 @@ ParseVarassign(const char *line) return false; FinishDependencyGroup(); - Parse_DoVar(&var, SCOPE_GLOBAL); + Parse_Var(&var, SCOPE_GLOBAL); return true; } @@ -3139,7 +3139,7 @@ ParseDependencyLine(char *line) Lst_Free(targets); targets = Lst_New(); - ParseDoDependency(expanded_line); + ParseDependency(expanded_line); free(expanded_line); if (shellcmd != NULL) diff --git a/usr.bin/make/unit-tests/cond-func-make-main.mk b/usr.bin/make/unit-tests/cond-func-make-main.mk index 31b370afabde..97b91f869991 100644 --- a/usr.bin/make/unit-tests/cond-func-make-main.mk +++ b/usr.bin/make/unit-tests/cond-func-make-main.mk @@ -1,4 +1,4 @@ -# $NetBSD: cond-func-make-main.mk,v 1.1 2020/11/22 19:37:27 rillig Exp $ +# $NetBSD: cond-func-make-main.mk,v 1.2 2021/04/04 10:13:09 rillig Exp $ # # Test how accurately the make() function in .if conditions reflects # what is actually made. @@ -33,7 +33,7 @@ first-main-target: # the line. This implies that several main targets can be set at the name # time, but they have to be in the same dependency group. # -# See ParseDoDependencyTargetSpecial, branch SP_MAIN. +# See ParseDependencyTargetSpecial, branch SP_MAIN. .MAIN: dot-main-target-1a dot-main-target-1b .if !make(dot-main-target-1a) @@ -47,7 +47,7 @@ dot-main-target-{1,2}{a,b}: : Making ${.TARGET}. # At this point, the list of targets to be made (opts.create) is not empty -# anymore. ParseDoDependencyTargetSpecial therefore treats the .MAIN as if +# anymore. ParseDependencyTargetSpecial therefore treats the .MAIN as if # it were an ordinary target. Since .MAIN is not listed as a dependency # anywhere, it is not made. .if target(.MAIN) diff --git a/usr.bin/make/unit-tests/counter-append.mk b/usr.bin/make/unit-tests/counter-append.mk index 1c4e00d6118c..d234835e5ec3 100644 --- a/usr.bin/make/unit-tests/counter-append.mk +++ b/usr.bin/make/unit-tests/counter-append.mk @@ -1,4 +1,4 @@ -# $NetBSD: counter-append.mk,v 1.4 2020/10/17 16:57:17 rillig Exp $ +# $NetBSD: counter-append.mk,v 1.5 2021/04/04 10:13:09 rillig Exp $ # # Demonstrates how to let make count the number of times a variable # is actually accessed, using the ::+= variable modifier. @@ -15,7 +15,7 @@ COUNTER= # zero NEXT= ${COUNTER::+=a}${COUNTER:[#]} # This variable is first set to empty and then expanded. -# See parse.c, function Parse_DoVar, keyword "!Var_Exists". +# See parse.c, function Parse_Var, keyword "!Var_Exists". A:= ${NEXT} B:= ${NEXT} C:= ${NEXT} diff --git a/usr.bin/make/unit-tests/counter.mk b/usr.bin/make/unit-tests/counter.mk index 3c75d7a5032a..7cf8fba72876 100644 --- a/usr.bin/make/unit-tests/counter.mk +++ b/usr.bin/make/unit-tests/counter.mk @@ -1,4 +1,4 @@ -# $NetBSD: counter.mk,v 1.5 2020/10/17 16:57:17 rillig Exp $ +# $NetBSD: counter.mk,v 1.6 2021/04/04 10:13:09 rillig Exp $ # # Demonstrates how to let make count the number of times a variable # is actually accessed, using the ::= variable modifier. @@ -15,7 +15,7 @@ COUNTER= # zero NEXT= ${COUNTER::=${COUNTER} a}${COUNTER:[#]} # This variable is first set to empty and then expanded. -# See parse.c, function Parse_DoVar, keyword "!Var_Exists". +# See parse.c, function Parse_Var, keyword "!Var_Exists". A:= ${NEXT} B:= ${NEXT} C:= ${NEXT} diff --git a/usr.bin/make/unit-tests/dep-var.mk b/usr.bin/make/unit-tests/dep-var.mk index 438a8a84a60d..4503424e31ab 100644 --- a/usr.bin/make/unit-tests/dep-var.mk +++ b/usr.bin/make/unit-tests/dep-var.mk @@ -1,4 +1,4 @@ -# $NetBSD: dep-var.mk,v 1.5 2020/09/13 20:04:26 rillig Exp $ +# $NetBSD: dep-var.mk,v 1.6 2021/04/04 10:13:09 rillig Exp $ # # Tests for variable references in dependency declarations. # @@ -79,7 +79,7 @@ all: $$$$) # undefined. # # Since 2020-09-13, this generates a parse error in lint mode (-dL), but not -# in normal mode since ParseDoDependency does not handle any errors after +# in normal mode since ParseDependency does not handle any errors after # calling Var_Parse. undef1 def2 a-def2-b 1-2-$$INDIRECT_2-2-1 ${:U\$)}: @echo ${.TARGET:Q} diff --git a/usr.bin/make/unit-tests/deptgt.exp b/usr.bin/make/unit-tests/deptgt.exp index d3f0095d90f7..bdac2aee3e6c 100644 --- a/usr.bin/make/unit-tests/deptgt.exp +++ b/usr.bin/make/unit-tests/deptgt.exp @@ -1,13 +1,13 @@ make: "deptgt.mk" line 10: warning: Extra target ignored make: "deptgt.mk" line 28: Unassociated shell command ": command3 # parse error, since targets == NULL" ParseReadLine (34): '${:U}: empty-source' -ParseDoDependency(: empty-source) +ParseDependency(: empty-source) ParseReadLine (35): ' : command for empty targets list' ParseReadLine (36): ': empty-source' -ParseDoDependency(: empty-source) +ParseDependency(: empty-source) ParseReadLine (37): ' : command for empty targets list' ParseReadLine (38): '.MAKEFLAGS: -d0' -ParseDoDependency(.MAKEFLAGS: -d0) +ParseDependency(.MAKEFLAGS: -d0) make: "deptgt.mk" line 46: Unknown modifier "Z" make: Fatal errors encountered -- cannot continue make: stopped in unit-tests diff --git a/usr.bin/make/unit-tests/deptgt.mk b/usr.bin/make/unit-tests/deptgt.mk index 09f381715e6d..15d7e59aeced 100644 --- a/usr.bin/make/unit-tests/deptgt.mk +++ b/usr.bin/make/unit-tests/deptgt.mk @@ -1,4 +1,4 @@ -# $NetBSD: deptgt.mk,v 1.10 2020/12/27 18:20:26 rillig Exp $ +# $NetBSD: deptgt.mk,v 1.11 2021/04/04 10:13:09 rillig Exp $ # # Tests for special targets like .BEGIN or .SUFFIXES in dependency # declarations. @@ -12,7 +12,7 @@ # The following lines demonstrate how 'targets' is set and reset during # parsing of dependencies. To see it in action, set breakpoints in: # -# ParseDoDependency at the beginning +# ParseDependency at the beginning # FinishDependencyGroup at "targets = NULL" # Parse_File at "Lst_Free(targets)" # Parse_File at "targets = Lst_New()" diff --git a/usr.bin/make/unit-tests/directive-export-impl.exp b/usr.bin/make/unit-tests/directive-export-impl.exp index f1a86df6d60f..539cd33656ae 100644 --- a/usr.bin/make/unit-tests/directive-export-impl.exp +++ b/usr.bin/make/unit-tests/directive-export-impl.exp @@ -9,7 +9,7 @@ Applying ${UT_VAR:N...} to "<>" (eval-defined, regular) Pattern[UT_VAR] for [<>] is [*] ModifyWords: split "<>" into 1 words Result of ${UT_VAR:N*} is "" (eval-defined, regular) -ParseDoDependency(: ) +ParseDependency(: ) CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>" Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined) Applying ${:!...} to "" (eval-defined, undefined) @@ -30,7 +30,7 @@ Applying ${UT_VAR:N...} to "<>" (eval-defined, regular) Pattern[UT_VAR] for [<>] is [*] ModifyWords: split "<>" into 1 words Result of ${UT_VAR:N*} is "" (eval-defined, regular) -ParseDoDependency(: ) +ParseDependency(: ) ParseReadLine (54): 'REF= defined' Global:REF = defined CondParser_Eval: ${:!echo "\$UT_VAR"!} != "" @@ -47,10 +47,10 @@ Var_Parse: ${REF}> (eval) Result of ${:!echo "\$UT_VAR"!} is "" (eval-defined, defined) lhs = "", rhs = "", op = != ParseReadLine (62): 'all:' -ParseDoDependency(all:) +ParseDependency(all:) Global:.ALLTARGETS = all ParseReadLine (63): '.MAKEFLAGS: -d0' -ParseDoDependency(.MAKEFLAGS: -d0) +ParseDependency(.MAKEFLAGS: -d0) Global:.MAKEFLAGS = -r -k -d cpv -d Global:.MAKEFLAGS = -r -k -d cpv -d 0 exit status 0 diff --git a/usr.bin/make/unit-tests/directive-for-errors.mk b/usr.bin/make/unit-tests/directive-for-errors.mk index cd190ddf424b..602ecbf32e4e 100644 --- a/usr.bin/make/unit-tests/directive-for-errors.mk +++ b/usr.bin/make/unit-tests/directive-for-errors.mk @@ -1,4 +1,4 @@ -# $NetBSD: directive-for-errors.mk,v 1.2 2021/04/04 09:58:51 rillig Exp $ +# $NetBSD: directive-for-errors.mk,v 1.3 2021/04/04 10:13:09 rillig Exp $ # # Tests for error handling in .for loops. @@ -13,8 +13,8 @@ # XXX: The error message is misleading though. As of 2020-12-31, it says # "Unknown directive "for"", but that directive is actually known. This is # because ForEval does not detect the .for loop as such, so parsing -# continues in ParseLine > ParseDependencyLine > ParseDoDependency > -# ParseDoDependencyTargets > ParseErrorNoDependency, and there the directive +# continues in ParseLine > ParseDependencyLine > ParseDependency > +# ParseDependencyTargets > ParseErrorNoDependency, and there the directive # name is parsed a bit differently. .for/i in 1 2 3 . warning ${i} diff --git a/usr.bin/make/unit-tests/include-main.exp b/usr.bin/make/unit-tests/include-main.exp index 61e716ad8ad7..c8a670a1c14a 100644 --- a/usr.bin/make/unit-tests/include-main.exp +++ b/usr.bin/make/unit-tests/include-main.exp @@ -9,7 +9,7 @@ make: "include-subsub.mk" line 5: subsub-ok in .for loop from include-sub.mk:29 in .include from include-main.mk:27 ParseReadLine (6): '.MAKEFLAGS: -d0' -ParseDoDependency(.MAKEFLAGS: -d0) +ParseDependency(.MAKEFLAGS: -d0) make: "include-sub.mk" line 38: sub-after-ok make: "include-sub.mk" line 45: sub-after-for-ok make: "include-main.mk" line 30: main-after-ok diff --git a/usr.bin/make/unit-tests/opt-file.mk b/usr.bin/make/unit-tests/opt-file.mk index 3ab8ef4e3c7d..b7a1c09e6d16 100644 --- a/usr.bin/make/unit-tests/opt-file.mk +++ b/usr.bin/make/unit-tests/opt-file.mk @@ -1,4 +1,4 @@ -# $NetBSD: opt-file.mk,v 1.11 2020/12/22 08:57:23 rillig Exp $ +# $NetBSD: opt-file.mk,v 1.12 2021/04/04 10:13:09 rillig Exp $ # # Tests for the -f command line option. @@ -28,10 +28,10 @@ all: file-containing-null-byte # ParseReadLine (1): 'VAR=value\' # Global:VAR = value\value\ # ParseReadLine (2): 'alue\' -# ParseDoDependency(alue\) +# ParseDependency(alue\) # make-2014.01.01.00.00.00: "(stdin)" line 2: Need an operator # ParseReadLine (3): 'ZZZZZZZZZZZZZZZZ' -# ParseDoDependency(ZZZZZZZZZZZZZZZZ) +# ParseDependency(ZZZZZZZZZZZZZZZZ) # file-ending-in-backslash: .PHONY @printf '%s' 'VAR=value\' \ diff --git a/usr.bin/make/unit-tests/suff-incomplete.exp b/usr.bin/make/unit-tests/suff-incomplete.exp index 23b959d4b4e5..2331436d378e 100644 --- a/usr.bin/make/unit-tests/suff-incomplete.exp +++ b/usr.bin/make/unit-tests/suff-incomplete.exp @@ -1,19 +1,19 @@ ParseReadLine (9): '.SUFFIXES:' -ParseDoDependency(.SUFFIXES:) +ParseDependency(.SUFFIXES:) Clearing all suffixes ParseReadLine (11): '.SUFFIXES: .a .b .c' -ParseDoDependency(.SUFFIXES: .a .b .c) +ParseDependency(.SUFFIXES: .a .b .c) Adding suffix ".a" Adding suffix ".b" Adding suffix ".c" ParseReadLine (17): '.a.b:' -ParseDoDependency(.a.b:) +ParseDependency(.a.b:) defining transformation from `.a' to `.b' inserting ".a" (1) at end of list inserting ".b" (2) at end of list ParseReadLine (21): '.a.c: ${.PREFIX}.dependency' deleting incomplete transformation from `.a' to `.b' -ParseDoDependency(.a.c: ${.PREFIX}.dependency) +ParseDependency(.a.c: ${.PREFIX}.dependency) defining transformation from `.a' to `.c' inserting ".a" (1) at end of list inserting ".c" (3) at end of list @@ -22,7 +22,7 @@ inserting ".c" (3) at end of list # ${.PREFIX}.dependency, unmade, type none, flags none ParseReadLine (23): '.DEFAULT:' transformation .a.c complete -ParseDoDependency(.DEFAULT:) +ParseDependency(.DEFAULT:) ParseReadLine (24): ' : Making ${.TARGET} from ${.IMPSRC} all ${.ALLSRC} by default.' transformation .DEFAULT complete Wildcard expanding "all"... diff --git a/usr.bin/make/unit-tests/suff-main-several.exp b/usr.bin/make/unit-tests/suff-main-several.exp index c9a0b0d31ad5..eb836b1ebbe8 100644 --- a/usr.bin/make/unit-tests/suff-main-several.exp +++ b/usr.bin/make/unit-tests/suff-main-several.exp @@ -1,12 +1,12 @@ ParseReadLine (8): '.1.2 .1.3 .1.4:' -ParseDoDependency(.1.2 .1.3 .1.4:) +ParseDependency(.1.2 .1.3 .1.4:) Setting main node to ".1.2" ParseReadLine (9): ' : Making ${.TARGET} from ${.IMPSRC}.' ParseReadLine (14): 'next-main:' -ParseDoDependency(next-main:) +ParseDependency(next-main:) ParseReadLine (15): ' : Making ${.TARGET}' ParseReadLine (19): '.SUFFIXES: .1 .2 .3 .4' -ParseDoDependency(.SUFFIXES: .1 .2 .3 .4) +ParseDependency(.SUFFIXES: .1 .2 .3 .4) Adding suffix ".1" Adding suffix ".2" Setting main node from ".1.2" back to null @@ -27,42 +27,42 @@ inserting ".1" (1) at end of list inserting ".4" (4) at end of list Setting main node to "next-main" ParseReadLine (24): '.SUFFIXES:' -ParseDoDependency(.SUFFIXES:) +ParseDependency(.SUFFIXES:) Clearing all suffixes ParseReadLine (32): '.SUFFIXES: .4 .3 .2 .1' -ParseDoDependency(.SUFFIXES: .4 .3 .2 .1) +ParseDependency(.SUFFIXES: .4 .3 .2 .1) Adding suffix ".4" Adding suffix ".3" Adding suffix ".2" Adding suffix ".1" ParseReadLine (33): '.SUFFIXES:' -ParseDoDependency(.SUFFIXES:) +ParseDependency(.SUFFIXES:) Clearing all suffixes ParseReadLine (34): '.SUFFIXES: .1 .2 .3 .4' -ParseDoDependency(.SUFFIXES: .1 .2 .3 .4) +ParseDependency(.SUFFIXES: .1 .2 .3 .4) Adding suffix ".1" Adding suffix ".2" Adding suffix ".3" Adding suffix ".4" ParseReadLine (35): '.SUFFIXES:' -ParseDoDependency(.SUFFIXES:) +ParseDependency(.SUFFIXES:) Clearing all suffixes ParseReadLine (36): '.SUFFIXES: .4 .3 .2 .1' -ParseDoDependency(.SUFFIXES: .4 .3 .2 .1) +ParseDependency(.SUFFIXES: .4 .3 .2 .1) Adding suffix ".4" Adding suffix ".3" Adding suffix ".2" Adding suffix ".1" ParseReadLine (38): 'suff-main-several.1:' -ParseDoDependency(suff-main-several.1:) +ParseDependency(suff-main-several.1:) ParseReadLine (39): ' : Making ${.TARGET} out of nothing.' ParseReadLine (40): 'next-main: suff-main-several.{2,3,4}' -ParseDoDependency(next-main: suff-main-several.{2,3,4}) +ParseDependency(next-main: suff-main-several.{2,3,4}) # LinkSource: added child next-main - suff-main-several.{2,3,4} # next-main, unmade, type OP_DEPENDS|OP_HAS_COMMANDS, flags none # suff-main-several.{2,3,4}, unmade, type none, flags none ParseReadLine (42): '.MAKEFLAGS: -d0 -dg1' -ParseDoDependency(.MAKEFLAGS: -d0 -dg1) +ParseDependency(.MAKEFLAGS: -d0 -dg1) #*** Input graph: # .1.2, unmade, type OP_TRANSFORM, flags none # .1.3, unmade, type OP_TRANSFORM, flags none diff --git a/usr.bin/make/unit-tests/suff-rebuild.exp b/usr.bin/make/unit-tests/suff-rebuild.exp index ccb423a6086a..7ef53ae2e151 100644 --- a/usr.bin/make/unit-tests/suff-rebuild.exp +++ b/usr.bin/make/unit-tests/suff-rebuild.exp @@ -1,38 +1,38 @@ ParseReadLine (10): '.SUFFIXES:' -ParseDoDependency(.SUFFIXES:) +ParseDependency(.SUFFIXES:) Clearing all suffixes ParseReadLine (12): '.SUFFIXES: .a .b .c' -ParseDoDependency(.SUFFIXES: .a .b .c) +ParseDependency(.SUFFIXES: .a .b .c) Adding suffix ".a" Adding suffix ".b" Adding suffix ".c" ParseReadLine (14): 'suff-rebuild-example.a:' -ParseDoDependency(suff-rebuild-example.a:) +ParseDependency(suff-rebuild-example.a:) Adding "suff-rebuild-example.a" to all targets. ParseReadLine (15): ' : Making ${.TARGET} out of nothing.' ParseReadLine (17): '.a.b:' -ParseDoDependency(.a.b:) +ParseDependency(.a.b:) defining transformation from `.a' to `.b' inserting ".a" (1) at end of list inserting ".b" (2) at end of list ParseReadLine (18): ' : Making ${.TARGET} from ${.IMPSRC}.' ParseReadLine (19): '.b.c:' transformation .a.b complete -ParseDoDependency(.b.c:) +ParseDependency(.b.c:) defining transformation from `.b' to `.c' inserting ".b" (2) at end of list inserting ".c" (3) at end of list ParseReadLine (20): ' : Making ${.TARGET} from ${.IMPSRC}.' ParseReadLine (21): '.c:' transformation .b.c complete -ParseDoDependency(.c:) +ParseDependency(.c:) defining transformation from `.c' to `' inserting ".c" (3) at end of list inserting "" (0) at end of list ParseReadLine (22): ' : Making ${.TARGET} from ${.IMPSRC}.' ParseReadLine (44): '.SUFFIXES: .c .b .a' transformation .c complete -ParseDoDependency(.SUFFIXES: .c .b .a) +ParseDependency(.SUFFIXES: .c .b .a) Adding ".END" to all targets. Wildcard expanding "all"... SuffFindDeps "all" diff --git a/usr.bin/make/unit-tests/var-eval-short.exp b/usr.bin/make/unit-tests/var-eval-short.exp index 439aa9f9639a..8ef77116763f 100644 --- a/usr.bin/make/unit-tests/var-eval-short.exp +++ b/usr.bin/make/unit-tests/var-eval-short.exp @@ -19,7 +19,7 @@ Modifier part: "${FAIL}then" Modifier part: "${FAIL}else" Result of ${DEFINED:?${FAIL}then:${FAIL}else} is "defined" (parse-only, regular) ParseReadLine (159): '.MAKEFLAGS: -d0' -ParseDoDependency(.MAKEFLAGS: -d0) +ParseDependency(.MAKEFLAGS: -d0) Global:.MAKEFLAGS = -r -k -d cpv -d Global:.MAKEFLAGS = -r -k -d cpv -d 0 make: Fatal errors encountered -- cannot continue diff --git a/usr.bin/make/unit-tests/var-op-append.mk b/usr.bin/make/unit-tests/var-op-append.mk index deb4af6a7384..420ee376b75d 100644 --- a/usr.bin/make/unit-tests/var-op-append.mk +++ b/usr.bin/make/unit-tests/var-op-append.mk @@ -1,4 +1,4 @@ -# $NetBSD: var-op-append.mk,v 1.8 2021/02/03 08:40:47 rillig Exp $ +# $NetBSD: var-op-append.mk,v 1.9 2021/04/04 10:13:09 rillig Exp $ # # Tests for the += variable assignment operator, which appends to a variable, # creating it if necessary. @@ -26,7 +26,7 @@ VAR+= # empty # '+=' assignment operator. As far as possible, the '+' is interpreted as # part of the assignment operator. # -# See Parse_DoVar +# See Parse_Var C++= value .if ${C+} != "value" || defined(C++) . error diff --git a/usr.bin/make/unit-tests/var-op-sunsh.mk b/usr.bin/make/unit-tests/var-op-sunsh.mk index 09796165eef1..0d15b8c88b92 100644 --- a/usr.bin/make/unit-tests/var-op-sunsh.mk +++ b/usr.bin/make/unit-tests/var-op-sunsh.mk @@ -1,4 +1,4 @@ -# $NetBSD: var-op-sunsh.mk,v 1.7 2021/02/07 17:17:25 rillig Exp $ +# $NetBSD: var-op-sunsh.mk,v 1.8 2021/04/04 10:13:09 rillig Exp $ # # Tests for the :sh= variable assignment operator, which runs its right-hand # side through the shell. It is a seldom-used alternative to the != @@ -50,7 +50,7 @@ VAR:shoe:shore= echo two-colons # The variable modifier ':sh' and the assignment operator modifier ':sh'. # Intuitively this variable name contains the variable modifier, but until # 2020-10-04, the parser regarded it as an assignment operator modifier, in -# Parse_DoVar. +# Parse_Var. VAR.${:Uecho 123:sh}= ok-123 .if ${VAR.123} != "ok-123" . error @@ -76,10 +76,10 @@ VAR.key:shift= Shift # # Well, the end result is correct but the way until there is rather # adventurous. This only works because the parser replaces each and every -# whitespace character that is not nested with '\0' (see Parse_DoVar). +# whitespace character that is not nested with '\0' (see Parse_Var). # The variable name therefore ends before the first ':sh', and the last # ':sh' turns the assignment operator into the shell command evaluation. -# Parse_DoVar completely trusts Parse_IsVar to properly verify the syntax. +# Parse_Var completely trusts Parse_IsVar to properly verify the syntax. # # The ':sh' is the only word that may occur between the variable name and # the assignment operator at nesting level 0. All other words would lead @@ -102,7 +102,7 @@ VAR :sh(Put a comment here)= comment in parentheses # The unintended comment can include multiple levels of nested braces and # parentheses, they don't even need to be balanced since they are only -# counted by Parse_IsVar and ignored by Parse_DoVar. +# counted by Parse_IsVar and ignored by Parse_Var. VAR :sh{Put}((((a}{comment}}}}{here}= comment in braces .if ${VAR} != "comment in braces" . error diff --git a/usr.bin/make/unit-tests/varmod-indirect.exp b/usr.bin/make/unit-tests/varmod-indirect.exp index 3d7b466b532d..8a3ec17bcdb8 100644 --- a/usr.bin/make/unit-tests/varmod-indirect.exp +++ b/usr.bin/make/unit-tests/varmod-indirect.exp @@ -53,7 +53,7 @@ Applying ${:U...} to "" (eval-keep-dollar-and-undefined, undefined) Result of ${:UZ} is "Z" (eval-keep-dollar-and-undefined, defined) Global:_ = before ${UNDEF:Z} after ParseReadLine (186): '.MAKEFLAGS: -d0' -ParseDoDependency(.MAKEFLAGS: -d0) +ParseDependency(.MAKEFLAGS: -d0) Global:.MAKEFLAGS = -r -k -d 0 -d pv -d Global:.MAKEFLAGS = -r -k -d 0 -d pv -d 0 make: Fatal errors encountered -- cannot continue diff --git a/usr.bin/make/unit-tests/varmod-loop.exp b/usr.bin/make/unit-tests/varmod-loop.exp index cc99042a60de..df46cbd36e7b 100644 --- a/usr.bin/make/unit-tests/varmod-loop.exp +++ b/usr.bin/make/unit-tests/varmod-loop.exp @@ -5,7 +5,7 @@ ParseReadLine (149): 'SUBST_CONTAINING_LOOP:= ${USE_8_DOLLARS}' CondParser_Eval: ${SUBST_CONTAINING_LOOP} != "\$\$ \$\$\$\$ \$\$\$\$" lhs = "$$ $$$$ $$$$", rhs = "$$ $$$$ $$$$", op = != ParseReadLine (174): '.MAKEFLAGS: -d0' -ParseDoDependency(.MAKEFLAGS: -d0) +ParseDependency(.MAKEFLAGS: -d0) :varname-overwriting-target: :x1y x2y x3y: :: mod-loop-resolve:w1d2d3w w2i3w w1i2d3 2i${RES3}w w1d2d3 2i${RES3} 1i${RES2}w: mod-loop-varname-dollar:(1) (2) (3). diff --git a/usr.bin/make/unit-tests/varname-dot-shell.exp b/usr.bin/make/unit-tests/varname-dot-shell.exp index 9c3f12ab0c58..ff5e0a127bac 100644 --- a/usr.bin/make/unit-tests/varname-dot-shell.exp +++ b/usr.bin/make/unit-tests/varname-dot-shell.exp @@ -11,7 +11,7 @@ Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined) Var_Parse: ${ORIG_SHELL} (eval-defined) lhs = "(details omitted)", rhs = "(details omitted)", op = != ParseReadLine (19): '.MAKEFLAGS: .SHELL+=appended' -ParseDoDependency(.MAKEFLAGS: .SHELL+=appended) +ParseDependency(.MAKEFLAGS: .SHELL+=appended) Ignoring append to .SHELL since it is read-only CondParser_Eval: ${.SHELL} != ${ORIG_SHELL} Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined) @@ -26,7 +26,7 @@ Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined) Var_Parse: ${ORIG_SHELL} (eval-defined) lhs = "(details omitted)", rhs = "(details omitted)", op = != ParseReadLine (33): '.MAKEFLAGS: -d0' -ParseDoDependency(.MAKEFLAGS: -d0) +ParseDependency(.MAKEFLAGS: -d0) Global:.MAKEFLAGS = -r -k -d cpv -d Global:.MAKEFLAGS = -r -k -d cpv -d 0 exit status 0 diff --git a/usr.bin/make/unit-tests/varname-empty.mk b/usr.bin/make/unit-tests/varname-empty.mk index 492f9f2618ba..f077d2ec07b4 100644 --- a/usr.bin/make/unit-tests/varname-empty.mk +++ b/usr.bin/make/unit-tests/varname-empty.mk @@ -1,4 +1,4 @@ -# $NetBSD: varname-empty.mk,v 1.8 2021/02/03 08:34:15 rillig Exp $ +# $NetBSD: varname-empty.mk,v 1.9 2021/04/04 10:13:09 rillig Exp $ # # Tests for the special variable with the empty name. # @@ -49,7 +49,7 @@ ${:U}+= appended indirectly .MAKEFLAGS: -d0 # Before 2020-08-22, the simple assignment operator '=' after an empty -# variable name had an off-by-one bug in Parse_DoVar. The code that was +# variable name had an off-by-one bug in Parse_Var. The code that was # supposed to "skip to operator character" started its search _after_ the # assignment operator, assuming that the variable name would be at least # one character long. It then looked for the next occurrence of a '=', which