| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: make.c,v 1.251 2022/01/08 09:53:44 rillig Exp $ */ | | 1 | /* $NetBSD: make.c,v 1.252 2022/01/09 15:48:30 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. |
| @@ -94,47 +94,47 @@ | | | @@ -94,47 +94,47 @@ |
94 | * GNode_IsOODate Determine if a target is out-of-date. | | 94 | * GNode_IsOODate Determine if a target is out-of-date. |
95 | * | | 95 | * |
96 | * Make_HandleUse See if a child is a .USE node for a parent | | 96 | * Make_HandleUse See if a child is a .USE node for a parent |
97 | * and perform the .USE actions if so. | | 97 | * and perform the .USE actions if so. |
98 | * | | 98 | * |
99 | * Make_ExpandUse Expand .USE nodes | | 99 | * Make_ExpandUse Expand .USE nodes |
100 | */ | | 100 | */ |
101 | | | 101 | |
102 | #include "make.h" | | 102 | #include "make.h" |
103 | #include "dir.h" | | 103 | #include "dir.h" |
104 | #include "job.h" | | 104 | #include "job.h" |
105 | | | 105 | |
106 | /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ | | 106 | /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ |
107 | MAKE_RCSID("$NetBSD: make.c,v 1.251 2022/01/08 09:53:44 rillig Exp $"); | | 107 | MAKE_RCSID("$NetBSD: make.c,v 1.252 2022/01/09 15:48:30 rillig Exp $"); |
108 | | | 108 | |
109 | /* Sequence # to detect recursion. */ | | 109 | /* Sequence # to detect recursion. */ |
110 | static unsigned int checked_seqno = 1; | | 110 | static unsigned int checked_seqno = 1; |
111 | | | 111 | |
112 | /* | | 112 | /* |
113 | * The current fringe of the graph. | | 113 | * The current fringe of the graph. |
114 | * These are nodes which await examination by MakeOODate. | | 114 | * These are nodes which await examination by MakeOODate. |
115 | * It is added to by Make_Update and subtracted from by MakeStartJobs | | 115 | * It is added to by Make_Update and subtracted from by MakeStartJobs |
116 | */ | | 116 | */ |
117 | static GNodeList toBeMade = LST_INIT; | | 117 | static GNodeList toBeMade = LST_INIT; |
118 | | | 118 | |
119 | | | 119 | |
120 | void | | 120 | void |
121 | debug_printf(const char *fmt, ...) | | 121 | debug_printf(const char *fmt, ...) |
122 | { | | 122 | { |
123 | va_list args; | | 123 | va_list ap; |
124 | | | 124 | |
125 | va_start(args, fmt); | | 125 | va_start(ap, fmt); |
126 | vfprintf(opts.debug_file, fmt, args); | | 126 | vfprintf(opts.debug_file, fmt, ap); |
127 | va_end(args); | | 127 | va_end(ap); |
128 | } | | 128 | } |
129 | | | 129 | |
130 | MAKE_ATTR_DEAD static void | | 130 | MAKE_ATTR_DEAD static void |
131 | make_abort(GNode *gn, int lineno) | | 131 | make_abort(GNode *gn, int lineno) |
132 | { | | 132 | { |
133 | | | 133 | |
134 | debug_printf("make_abort from line %d\n", lineno); | | 134 | debug_printf("make_abort from line %d\n", lineno); |
135 | Targ_PrintNode(gn, 2); | | 135 | Targ_PrintNode(gn, 2); |
136 | Targ_PrintNodes(&toBeMade, 2); | | 136 | Targ_PrintNodes(&toBeMade, 2); |
137 | Targ_PrintGraph(3); | | 137 | Targ_PrintGraph(3); |
138 | abort(); | | 138 | abort(); |
139 | } | | 139 | } |
140 | | | 140 | |