make(1): format #include directives consistentlydiff -r1.150 -r1.151 src/usr.bin/make/arch.c
(rillig)
--- src/usr.bin/make/arch.c 2020/10/31 11:54:33 1.150
+++ src/usr.bin/make/arch.c 2020/10/31 18:41:07 1.151
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: arch.c,v 1.150 2020/10/31 11:54:33 rillig Exp $ */ | 1 | /* $NetBSD: arch.c,v 1.151 2020/10/31 18:41:07 rillig Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1988, 1989, 1990, 1993 | 4 | * Copyright (c) 1988, 1989, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * Adam de Boor. | 8 | * Adam de Boor. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -107,40 +107,40 @@ | @@ -107,40 +107,40 @@ | |||
107 | * | 107 | * | |
108 | * Arch_FindLib Search for a library along a path. The | 108 | * Arch_FindLib Search for a library along a path. The | |
109 | * library name in the GNode should be in | 109 | * library name in the GNode should be in | |
110 | * -l<name> format. | 110 | * -l<name> format. | |
111 | * | 111 | * | |
112 | * Arch_LibOODate Special function to decide if a library node | 112 | * Arch_LibOODate Special function to decide if a library node | |
113 | * is out-of-date. | 113 | * is out-of-date. | |
114 | * | 114 | * | |
115 | * Arch_Init Initialize this module. | 115 | * Arch_Init Initialize this module. | |
116 | * | 116 | * | |
117 | * Arch_End Clean up this module. | 117 | * Arch_End Clean up this module. | |
118 | */ | 118 | */ | |
119 | 119 | |||
120 | #include <sys/types.h> | 120 | #include <sys/types.h> | |
121 | #include <sys/stat.h> | 121 | #include <sys/stat.h> | |
122 | #include <sys/time.h> | 122 | #include <sys/time.h> | |
123 | #include <sys/param.h> | 123 | #include <sys/param.h> | |
124 | 124 | |||
125 | #include <ar.h> | 125 | #include <ar.h> | |
126 | #include <utime.h> | 126 | #include <utime.h> | |
127 | 127 | |||
128 | #include "make.h" | 128 | #include "make.h" | |
129 | #include "dir.h" | 129 | #include "dir.h" | |
130 | #include "config.h" | 130 | #include "config.h" | |
131 | 131 | |||
132 | /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ | 132 | /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ | |
133 | MAKE_RCSID("$NetBSD: arch.c,v 1.150 2020/10/31 11:54:33 rillig Exp $"); | 133 | MAKE_RCSID("$NetBSD: arch.c,v 1.151 2020/10/31 18:41:07 rillig Exp $"); | |
134 | 134 | |||
135 | #ifdef TARGET_MACHINE | 135 | #ifdef TARGET_MACHINE | |
136 | #undef MAKE_MACHINE | 136 | #undef MAKE_MACHINE | |
137 | #define MAKE_MACHINE TARGET_MACHINE | 137 | #define MAKE_MACHINE TARGET_MACHINE | |
138 | #endif | 138 | #endif | |
139 | #ifdef TARGET_MACHINE_ARCH | 139 | #ifdef TARGET_MACHINE_ARCH | |
140 | #undef MAKE_MACHINE_ARCH | 140 | #undef MAKE_MACHINE_ARCH | |
141 | #define MAKE_MACHINE_ARCH TARGET_MACHINE_ARCH | 141 | #define MAKE_MACHINE_ARCH TARGET_MACHINE_ARCH | |
142 | #endif | 142 | #endif | |
143 | 143 | |||
144 | typedef struct List ArchList; | 144 | typedef struct List ArchList; | |
145 | typedef struct ListNode ArchListNode; | 145 | typedef struct ListNode ArchListNode; | |
146 | 146 |
--- src/usr.bin/make/for.c 2020/10/26 07:37:52 1.111
+++ src/usr.bin/make/for.c 2020/10/31 18:41:07 1.112
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: for.c,v 1.111 2020/10/26 07:37:52 rillig Exp $ */ | 1 | /* $NetBSD: for.c,v 1.112 2020/10/31 18:41:07 rillig Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1992, The Regents of the University of California. | 4 | * Copyright (c) 1992, The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -47,30 +47,30 @@ | @@ -47,30 +47,30 @@ | |||
47 | * handled recursively in For_Eval when the enclosing .for loop is evaluated | 47 | * handled recursively in For_Eval when the enclosing .for loop is evaluated | |
48 | * in For_Run. | 48 | * in For_Run. | |
49 | * | 49 | * | |
50 | * When the .for loop has been parsed completely, the variable expressions | 50 | * When the .for loop has been parsed completely, the variable expressions | |
51 | * for the iteration variables are replaced with expressions of the form | 51 | * for the iteration variables are replaced with expressions of the form | |
52 | * ${:Uvalue}, and then this modified body is "included" as a special file. | 52 | * ${:Uvalue}, and then this modified body is "included" as a special file. | |
53 | * | 53 | * | |
54 | * Interface: | 54 | * Interface: | |
55 | * For_Eval Evaluate the loop in the passed line. | 55 | * For_Eval Evaluate the loop in the passed line. | |
56 | * | 56 | * | |
57 | * For_Run Run accumulated loop | 57 | * For_Run Run accumulated loop | |
58 | */ | 58 | */ | |
59 | 59 | |||
60 | #include "make.h" | 60 | #include "make.h" | |
61 | 61 | |||
62 | /* "@(#)for.c 8.1 (Berkeley) 6/6/93" */ | 62 | /* "@(#)for.c 8.1 (Berkeley) 6/6/93" */ | |
63 | MAKE_RCSID("$NetBSD: for.c,v 1.111 2020/10/26 07:37:52 rillig Exp $"); | 63 | MAKE_RCSID("$NetBSD: for.c,v 1.112 2020/10/31 18:41:07 rillig Exp $"); | |
64 | 64 | |||
65 | /* The .for loop substitutes the items as ${:U<value>...}, which means | 65 | /* The .for loop substitutes the items as ${:U<value>...}, which means | |
66 | * that characters that break this syntax must be backslash-escaped. */ | 66 | * that characters that break this syntax must be backslash-escaped. */ | |
67 | typedef enum ForEscapes { | 67 | typedef enum ForEscapes { | |
68 | FOR_SUB_ESCAPE_CHAR = 0x0001, | 68 | FOR_SUB_ESCAPE_CHAR = 0x0001, | |
69 | FOR_SUB_ESCAPE_BRACE = 0x0002, | 69 | FOR_SUB_ESCAPE_BRACE = 0x0002, | |
70 | FOR_SUB_ESCAPE_PAREN = 0x0004 | 70 | FOR_SUB_ESCAPE_PAREN = 0x0004 | |
71 | } ForEscapes; | 71 | } ForEscapes; | |
72 | 72 | |||
73 | static int forLevel = 0; /* Nesting level */ | 73 | static int forLevel = 0; /* Nesting level */ | |
74 | 74 | |||
75 | /* One of the variables to the left of the "in" in a .for loop. */ | 75 | /* One of the variables to the left of the "in" in a .for loop. */ | |
76 | typedef struct ForVar { | 76 | typedef struct ForVar { |
--- src/usr.bin/make/make.c 2020/10/31 11:54:33 1.184
+++ src/usr.bin/make/make.c 2020/10/31 18:41:07 1.185
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: make.c,v 1.184 2020/10/31 11:54:33 rillig Exp $ */ | 1 | /* $NetBSD: make.c,v 1.185 2020/10/31 18:41:07 rillig Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1988, 1989, 1990, 1993 | 4 | * Copyright (c) 1988, 1989, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * Adam de Boor. | 8 | * Adam de Boor. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -92,32 +92,32 @@ | @@ -92,32 +92,32 @@ | |||
92 | * Make_DoAllVar Set up the various local variables for a | 92 | * Make_DoAllVar Set up the various local variables for a | |
93 | * target, including the .ALLSRC variable, making | 93 | * target, including the .ALLSRC variable, making | |
94 | * sure that any variable that needs to exist | 94 | * sure that any variable that needs to exist | |
95 | * at the very least has the empty value. | 95 | * at the very least has the empty value. | |
96 | * | 96 | * | |
97 | * Make_OODate Determine if a target is out-of-date. | 97 | * Make_OODate Determine if a target is out-of-date. | |
98 | * | 98 | * | |
99 | * Make_HandleUse See if a child is a .USE node for a parent | 99 | * Make_HandleUse See if a child is a .USE node for a parent | |
100 | * and perform the .USE actions if so. | 100 | * and perform the .USE actions if so. | |
101 | * | 101 | * | |
102 | * Make_ExpandUse Expand .USE nodes | 102 | * Make_ExpandUse Expand .USE nodes | |
103 | */ | 103 | */ | |
104 | 104 | |||
105 | #include "make.h" | 105 | #include "make.h" | |
106 | #include "dir.h" | 106 | #include "dir.h" | |
107 | #include "job.h" | 107 | #include "job.h" | |
108 | 108 | |||
109 | /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ | 109 | /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ | |
110 | MAKE_RCSID("$NetBSD: make.c,v 1.184 2020/10/31 11:54:33 rillig Exp $"); | 110 | MAKE_RCSID("$NetBSD: make.c,v 1.185 2020/10/31 18:41:07 rillig Exp $"); | |
111 | 111 | |||
112 | /* Sequence # to detect recursion. */ | 112 | /* Sequence # to detect recursion. */ | |
113 | static unsigned int checked = 1; | 113 | static unsigned int checked = 1; | |
114 | 114 | |||
115 | /* The current fringe of the graph. | 115 | /* The current fringe of the graph. | |
116 | * These are nodes which await examination by MakeOODate. | 116 | * These are nodes which await examination by MakeOODate. | |
117 | * It is added to by Make_Update and subtracted from by MakeStartJobs */ | 117 | * It is added to by Make_Update and subtracted from by MakeStartJobs */ | |
118 | static GNodeList *toBeMade; | 118 | static GNodeList *toBeMade; | |
119 | 119 | |||
120 | static int MakeCheckOrder(void *, void *); | 120 | static int MakeCheckOrder(void *, void *); | |
121 | static int MakeBuildParent(void *, void *); | 121 | static int MakeBuildParent(void *, void *); | |
122 | 122 | |||
123 | void | 123 | void |
--- src/usr.bin/make/var.c 2020/10/31 18:17:08 1.629
+++ src/usr.bin/make/var.c 2020/10/31 18:41:07 1.630
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: var.c,v 1.629 2020/10/31 18:17:08 rillig Exp $ */ | 1 | /* $NetBSD: var.c,v 1.630 2020/10/31 18:41:07 rillig Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1988, 1989, 1990, 1993 | 4 | * Copyright (c) 1988, 1989, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * Adam de Boor. | 8 | * Adam de Boor. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -104,42 +104,42 @@ | @@ -104,42 +104,42 @@ | |||
104 | * Var_Export Export the variable to the environment of this process | 104 | * Var_Export Export the variable to the environment of this process | |
105 | * and its child processes. | 105 | * and its child processes. | |
106 | * | 106 | * | |
107 | * Var_UnExport Don't export the variable anymore. | 107 | * Var_UnExport Don't export the variable anymore. | |
108 | * | 108 | * | |
109 | * Debugging: | 109 | * Debugging: | |
110 | * Var_Stats Print out hashing statistics if in -dh mode. | 110 | * Var_Stats Print out hashing statistics if in -dh mode. | |
111 | * | 111 | * | |
112 | * Var_Dump Print out all variables defined in the given context. | 112 | * Var_Dump Print out all variables defined in the given context. | |
113 | * | 113 | * | |
114 | * XXX: There's a lot of duplication in these functions. | 114 | * XXX: There's a lot of duplication in these functions. | |
115 | */ | 115 | */ | |
116 | 116 | |||
117 | #include <sys/stat.h> | 117 | #include <sys/stat.h> | |
118 | #ifndef NO_REGEX | 118 | #ifndef NO_REGEX | |
119 | #include <sys/types.h> | 119 | #include <sys/types.h> | |
120 | #include <regex.h> | 120 | #include <regex.h> | |
121 | #endif | 121 | #endif | |
122 | #include <inttypes.h> | 122 | #include <inttypes.h> | |
123 | #include <limits.h> | 123 | #include <limits.h> | |
124 | #include <time.h> | 124 | #include <time.h> | |
125 | 125 | |||
126 | #include "make.h" | 126 | #include "make.h" | |
127 | #include "dir.h" | 127 | #include "dir.h" | |
128 | #include "job.h" | 128 | #include "job.h" | |
129 | #include "metachar.h" | 129 | #include "metachar.h" | |
130 | 130 | |||
131 | /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ | 131 | /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ | |
132 | MAKE_RCSID("$NetBSD: var.c,v 1.629 2020/10/31 18:17:08 rillig Exp $"); | 132 | MAKE_RCSID("$NetBSD: var.c,v 1.630 2020/10/31 18:41:07 rillig Exp $"); | |
133 | 133 | |||
134 | #define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1) | 134 | #define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1) | |
135 | #define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2) | 135 | #define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2) | |
136 | #define VAR_DEBUG3(fmt, arg1, arg2, arg3) DEBUG3(VAR, fmt, arg1, arg2, arg3) | 136 | #define VAR_DEBUG3(fmt, arg1, arg2, arg3) DEBUG3(VAR, fmt, arg1, arg2, arg3) | |
137 | #define VAR_DEBUG4(fmt, arg1, arg2, arg3, arg4) DEBUG4(VAR, fmt, arg1, arg2, arg3, arg4) | 137 | #define VAR_DEBUG4(fmt, arg1, arg2, arg3, arg4) DEBUG4(VAR, fmt, arg1, arg2, arg3, arg4) | |
138 | 138 | |||
139 | ENUM_FLAGS_RTTI_3(VarEvalFlags, | 139 | ENUM_FLAGS_RTTI_3(VarEvalFlags, | |
140 | VARE_UNDEFERR, VARE_WANTRES, VARE_ASSIGN); | 140 | VARE_UNDEFERR, VARE_WANTRES, VARE_ASSIGN); | |
141 | 141 | |||
142 | /* | 142 | /* | |
143 | * This lets us tell if we have replaced the original environ | 143 | * This lets us tell if we have replaced the original environ | |
144 | * (which we cannot free). | 144 | * (which we cannot free). | |
145 | */ | 145 | */ |