xref: /freebsd/contrib/bmake/ChangeLog (revision 00698711dee1d990d3db9c41bf58394e589eecfe)
12022-02-04  Simon J Gerraty  <sjg@beast.crufty.net>
2
3	* VERSION (_MAKE_VERSION): 20220204
4	Merge with NetBSD make, pick up
5	o use unsigned consistently for line numbers, avoid the need for %z
6	o parse.c: do not step off end of input in Parse_IsVar
7	when checking for target local variable assignments
8
92022-02-02  Simon J Gerraty  <sjg@beast.crufty.net>
10
11	* VERSION (_MAKE_VERSION): 20220202
12	Merge with NetBSD make, pick up
13	o remove redundant declaration of HashIter_Init
14	o make DEBUG0 simpler
15
162022-01-30  Simon J Gerraty  <sjg@beast.crufty.net>
17
18	* cast gn->lineno to avoid %z
19
20	* VERSION (_MAKE_VERSION): 20220130
21	Merge with NetBSD make, pick up
22	o more unit tests
23	o make GNode lineno unsigned to please lint
24	o print location of recursive variable references in commands
25	o print "stack trace" (makefile includes) on fatal errors
26	o make.1: refine documentation for target local assignments
27
282022-01-28  Simon J Gerraty  <sjg@beast.crufty.net>
29
30	* VERSION (_MAKE_VERSION): 20220128
31	Merge with NetBSD make, pick up
32	o inline functions called only once
33	o for.c: clean up AddEscape for building the body of a .for loop
34	o hash.c: merge duplicate code for finding an entry in a hash table
35	replace HashEntry_KeyEquals with strncmp
36	o make.1: document quirks of target local variable assignments.
37	o parse.c: cleanup white-space
38
392022-01-26  Simon J Gerraty  <sjg@beast.crufty.net>
40
41	* VERSION (_MAKE_VERSION): 20220126
42	Merge with NetBSD make, pick up
43	o allow setting target local variables
44	o more unit tests
45	o add missing newline after "cannot continue" message
46	o meta.c: clean up eat_dots
47	o parse.c: fix filename in warning about duplicate script
48	o var.c: when expanding nested variables, check simple things first
49
502022-01-16  Simon J Gerraty  <sjg@beast.crufty.net>
51
52	* VERSION (_MAKE_VERSION): 20220116
53	Merge with NetBSD make, pick up
54	o fix for unit-tests/varname-makeflags on non-BSD systems
55	o use Var_Exists rather than Var_Value where appropriate
56	o remove unnecessary functions for expanding variable names
57	o cond.c: inline EvalBare
58	o main.c: lint cleanup
59	o parse.c: condense code in Parse_IsVar
60	use islower for parsing directives (none have upper case)
61
622022-01-12  Simon J Gerraty  <sjg@beast.crufty.net>
63
64	* VERSION (_MAKE_VERSION): 20220112
65	Merge with NetBSD make, pick up
66	o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before
67	comparion, rarely needed but useful when it is.
68
692022-01-10  Simon J Gerraty  <sjg@beast.crufty.net>
70
71	* VERSION (_MAKE_VERSION): 20220110
72	Merge with NetBSD make, pick up
73	o inline Buf_Clear
74	o remove redundant braces
75	o rename and inline Targ_Precious
76	o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf
77	o for.c: clean up handling of .for loops
78	fix reported line numbers of continuation lines
79	add details about .for loop variables to stack traces
80	o job.c: reduce code for initializing error handling in shell
81	o main.c: in Cmd_Exec, return error message instead of format string
82	have as few statements as possible between va_start and va_end
83	add debug logging for capturing the output of external commands
84	o make.c: use consistent variable names for varargs
85	o make_malloc.c: remove duplicate code from bmake_strdup
86	o parse.c: add missing printflike annotations
87	remove redundant lines from stack traces
88	fix stack traces in -dp mode
89	reduce confusing code in ParseForLoop
90	fix line number in debug log after returning from a file
91	rename IFile and its fields to match their actual content
92	clean up ParseDependencySources
93	o var.c: shorten ApplyModifier_Assign
94	rename is_shell_metachar, fix character conversion warning
95	merge calls to ApplyModifier_Time
96	merge duplicate code for modifiers 'gmtime' and 'localtime'
97
982022-01-04  Simon J Gerraty  <sjg@beast.crufty.net>
99
100	* parse.c: loadfile restore extra byte in buffer.
101
1022022-01-01  Simon J Gerraty  <sjg@beast.crufty.net>
103
104	* VERSION (_MAKE_VERSION): 20220101
105	Merge with NetBSD make, pick up
106	o more unit-tests
107	o remove unnecessary words from command line options in CmdOpts
108	o rename eunlink to unlink_file
109	o cond.c: make ParseWord in condition parser simpler
110	internally return false for irrelevant leaves in conditions
111	replace table for function lookup in conditions with simple code
112	merge duplicate types CondEvalResult and CondResult
113	o for.c: clean up handling of .for loops and .include directives
114	o main.c: constify cached_realpath
115	clean up Cmd_Exec
116	o parse.c: sync API documentation
117	fix error message when reading more than 1 GB from stdin
118	clean up parsing of makefiles
119	fix line number in error message about open conditionals
120	unexport types VarAssignOp and VarAssign
121	clean up function names
122	remove redundant parameters in dependency parsing functions
123	reduce scope of the list of wildcard target names
124	extract OP_NOTARGET into separate function
125	clean up variable names for parsing dependency lines
126	make debug logging a bit more human-friendly
127	o var.c: condense code in ApplyModifier_Assign
128
1292021-12-21  Simon J Gerraty  <sjg@beast.crufty.net>
130
131	* VERSION (_MAKE_VERSION): 20211221
132	Merge with NetBSD make, pick up
133	o more unit-tests
134	o style cleanup
135	o in CLEANUP mode, free interned strings at the very end
136	o fix memory leak for filenames in .for loops
137	o buf.c: avoid memory leak
138	o cond.c: condense CondParser_ComparisonOp
139	o hash.c: change return type of HashTable_Set to void
140	o job.c: change return type of Compat_RunCommand from int to bool
141	o main.c: remove bmake_free
142	o parse.c: condense repetetive code in ParseDirective
143	remove dead code for handling traditional include directives
144	clean up parsing of variable assignments
145	remove unreachable code for parsing the dependency operator
146	clean up loading of files
147	fix memory leak in IncludeFile
148	o var.c: fix memory leak when parsing a variable name
149	fix memory leak from ${.SUFFIXES}
150	reduce memory allocation in modifier ':?' and ':C'
151	condense RegexReplace for the modifier ':C' and avoid strlen
152	merge duplicate code for memory handling in Var_Parse
153	distinguish between short-lived and environment variables
154	rename VarFreeEnv to VarFreeShortLived
155
1562021-12-15  Simon J Gerraty  <sjg@beast.crufty.net>
157
158	* cond.c: fix mem leak in CondParser_Leaf
159
1602021-12-12  Simon J Gerraty  <sjg@beast.crufty.net>
161
162	* VERSION (_MAKE_VERSION): 20211212
163	Merge with NetBSD make, pick up
164	o rename Parse_SetInput to Parse_PushInput
165	o remove remove period from end of error messages and warnings
166	to be more consistent
167	o arch.c: use simpler memory management for parsing archive members
168	o cond.c: rework and reduce recursion
169	o for.c: rename some functions to better reflect purpose
170	o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string.
171	o var.c: in parse errors, mark whitespace more clearly
172	inline ParseEmptyArg into CondParser_FuncCallEmpty
173	minimize calls to LazyBuf_Get in ParseVarnameLong
174	treat .SUFFIXES as a read-only variable
175
1762021-12-07  Simon J Gerraty  <sjg@beast.crufty.net>
177
178	* VERSION (_MAKE_VERSION): 20211207
179	Merge with NetBSD make, pick up
180	o inline HashIter_Init
181	o parse.c: inline common subexpression in ParseRawLine
182	o var.c: merge branches for modifiers ':D' and ':U'
183	extract common code into Expr_Words
184	extract common code into Expr_Str
185	move low-level implementation details out of Var_Parse
186
1872021-12-06  Simon J Gerraty  <sjg@beast.crufty.net>
188
189	* VERSION (_MAKE_VERSION): 20211206
190	Merge with NetBSD make, pick up
191	o add unit-tests/varmod-loop-delete
192	o for.c: inline Str_Words - reduce memory allocation
193	o parse.c: do not try to expand fixed variable names
194	only allocate the name of an included file if necessary
195	clean up ParseInclude
196	o var.c: fix use-after-free in modifier ':@'
197	save a memory allocation in each modifier ':O' and ':u'
198	save a memory allocation in the modifier ':[...]'
199	in UnexportVars, replace Str_Words with Substring_Words to
200	reduce allocations and copying.
201
2022021-12-04  Simon J Gerraty  <sjg@beast.crufty.net>
203
204	* VERSION (_MAKE_VERSION): 20211204
205	Merge with NetBSD make, pick up
206	o flesh out a number of tests
207	o replace enums with bitfields, this simplifies a lot of code.
208	o var.c: refactor ParseModifierPartSubst
209
2102021-10-24  Simon J Gerraty  <sjg@beast.crufty.net>
211
212	* VERSION (_MAKE_VERSION): 20211024
213	Merge with NetBSD make, pick up
214	o Punt on write errors - ENOSPC etc.
215
2162021-10-22  Simon J Gerraty  <sjg@beast.crufty.net>
217
218	* configure.in: use_defshell, set both DEFSHELL_INDEX
219	and defshell_path if appropriate.
220	This makes it easier to use say the KSH specification with
221	and alternate path for the shell.
222
223	* configure.in compat.c: for SCO we need to force UseShell
224
225	* configure.in: SCO /bin/sh is not usable, provide a list of
226	alternatives for use as .SHELL.
227	We still have to mark some tests as broken, plus more if we end up
228	with ksh as .SHELL.
229	Issue a warning about skipped tests.
230
231	* boot-strap: leave TOOL_DIFF to configure
232
233	* configure.in: on SCO native cc is not usable,
234	gcc is to be found in /usr/gnu/bin
235	and while ancient is at least able to compile bmake.
236	Thus we add /usr/gnu/bin to PATH if it exists, and later
237	check if $CC would have been found via $PATH.
238	If not we set CC to the full path of $CC.
239	Also gnu diff is known to support -u, so if it exists use it.
240
241	* configure.in: move getopt to AC_REPLACE_FUNCS
242	also add AC_C_INLINE - in an attempt to compile using
243	native cc on SCO.
244
245	* configure.in: check for stresep as well as strsep, since we
246	define the later to the former if necessary, and if we have to
247	provide stresep we also need to provide a prototype.
248
249	* configure.in: we no longer need to worry about
250	sys/cdefs.h providing __RCSID which simplifies things quite a bit.
251
252	* make.h: make sure we have __RCSID
253
254	* unit-tests/Makefile.config.in: add TOOL_DIFF so configure
255	can control it.
256
2572021-10-20  Simon J Gerraty  <sjg@beast.crufty.net>
258
259	* VERSION: 20211020
260	Merge with NetBSD make, pick up
261	o confirm sync of unit-tests
262
2632021-10-18  Simon J Gerraty  <sjg@beast.crufty.net>
264
265	* configure.in: check if timezone Europe/Berlin is supported
266	if not try UTC-1
267	* configure.in: if .OBJDIR is $srcdir/obj we need to create a
268	symlink unit-tests -> ../unit-tests/obj so that
269	unit-tests/Makefile.config is put in the right place.
270	* refine filtering of .OBJDIR in unit-tests
271
2722021-10-16  Simon J Gerraty  <sjg@beast.crufty.net>
273
274	* Fix unit-tests on Minix 3.2.0
275	o job.c: do not punt if read of token pipe fails for EAGAIN.
276	On Minix at least, we are not ready to read the childExitJob pipe
277	when poll says we are.
278	There should actually be no reason for this pipe to be
279	non-blocking, but while that works fine on {Net,Free}BSD it
280	breaks another test case on Minix.
281	o unit-tests/Makefile: deal with variants of error messages
282	  and use of obj as .OBJDIR
283
2842021-10-14  Simon J Gerraty  <sjg@beast.crufty.net>
285
286	* configure.in: add sigaction to AC_REPLACE_FUNCS
287	we also need to check for sigaddset etc just for the benefit of
288	sigact.c
289
290	* Add sigact.c as sigaction.c so this "just works".
291	This should have been done back when bmake_signal started using
292	sigaction (I only just noticed that sigact.c wasn't here ;-)
293	Note: I no longer have access to any system where this would matter.
294
2952021-10-13  Simon J Gerraty  <sjg@beast.crufty.net>
296
297	* VERSION (_MAKE_VERSION): 20211011
298
299	* Makefile: cleanup a little
300
301	* configure.in: check for sigsetmask
302
3032021-10-01  Simon J Gerraty  <sjg@beast.crufty.net>
304
305	* VERSION (_MAKE_VERSION): 20211001
306	Merge with NetBSD make, pick up
307	o reduce locations reducing text size
308	o remove unnecessary const
309	o cond.c: fix lint warning on i386
310	do not allow unquoted 'left == right' after modifier ':?'
311	o hash.c: fix build for DEBUG_HASH_LOOKUP
312	o var.c: fix memory leak in error case of the ':?' modifier
313
3142021-09-11  Simon J Gerraty  <sjg@beast.crufty.net>
315
316	* VERSION (_MAKE_VERSION): 20210911
317	Merge with NetBSD make, pick up
318	o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval
319
3202021-09-08  Simon J Gerraty  <sjg@beast.crufty.net>
321
322	* VERSION (_MAKE_VERSION): 20210906
323	Merge with NetBSD make, pick up
324	o more unit tests
325	o lint cleanup
326	o rename some functions to better fit purpose
327	o for.c: cleanup - remove unnecessary optimization
328	  fix embedded newlines
329	o parse.c: correct case for CVS/RCS
330
3312021-08-11  Simon J Gerraty  <sjg@beast.crufty.net>
332
333	* VERSION (_MAKE_VERSION): 20210808
334	Merge with NetBSD make, pick up
335	o var.c: remove redundant initialization in ApplyModifier_Order
336
337	* mk/options.mk: issue warning for incorrect usage
338
3392021-08-03  Simon J Gerraty  <sjg@beast.crufty.net>
340
341	* var.c: use long for :On if we don't have a 64bit int type
342
343	* VERSION (_MAKE_VERSION): 20210803
344	Merge with NetBSD make, pick up
345	o rework varmod-order tests to avoid qsort instability
346	o make.1: clarify :On entry
347
3482021-07-31  Simon J Gerraty  <sjg@beast.crufty.net>
349
350	* VERSION (_MAKE_VERSION): 20210731
351	Merge with NetBSD make, pick up
352	o fix some lint issues
353	o more unit tests
354	o var.c: rework of ApplyModifier_Order
355
3562021-07-30  Simon J Gerraty  <sjg@beast.crufty.net>
357
358	* util.c: add strto*l if HAVE_STRTO*L not defined
359
360	* VERSION (_MAKE_VERSION): 20210730
361	Merge with NetBSD make, pick up
362	o var.c: add :On and :Orn for numeric sort
363	  disabled if no 64bit type available.
364	o _strtol.h: to implement strto*l functions
365
3662021-07-04  Simon J Gerraty  <sjg@beast.crufty.net>
367
368	* VERSION (_MAKE_VERSION): 20210704
369	Merge with NetBSD make, pick up
370	o unit-tests: fix some tests to be more portable
371	- job-output-null not all shells do the same number of write calls
372	- objdir-writable if TMPDIR is set; /tmp may not be usable
373
3742021-07-01  Simon J Gerraty  <sjg@beast.crufty.net>
375
376	* VERSION (_MAKE_VERSION): 20210701
377	Merge with NetBSD make, pick up
378	o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped;
379	some tests just cannot work in some environments.
380	o buf.c: simpler upper bound for length in Buf_AddInt
381	o cond.c: fix grammar in error message for malformed conditional
382	o for.c: prevent newline injection (from ${.newline}) in .for loops
383	o var.c: use more practical data type in RegexReplace
384	(avoid need for %zu)
385	extract RegexReplace from ModifyWord_SubstRegex
386
3872021-06-21  Simon J Gerraty  <sjg@beast.crufty.net>
388
389	* VERSION (_MAKE_VERSION): 20210621
390	Merge with NetBSD make, pick up
391	o var.c: only report error for unmatched regex subexpression
392	when linting (-dL) since we cannot tell when an unmatched
393	subexpression is an expected result.
394	o move unmatched regex subexpression tests to
395	varmod-subst-regex.mk and enable strict (lint) mode
396
3972021-06-16  Simon J Gerraty  <sjg@beast.crufty.net>
398
399	* VERSION (_MAKE_VERSION): 20210616
400	Merge with NetBSD make, pick up
401	o more unit tests
402	o cond.c: rename If_Eval to EvalBare
403	improve function names for parsing conditions
404	o job.c: fix error handling of targets that cannot be made
405	o var.c: uncompress code in ApplyModifier_Unique
406
4072021-05-18  Simon J Gerraty  <sjg@beast.crufty.net>
408
409	* VERSION (_MAKE_VERSION): 20210518
410	Merge with NetBSD make, pick up
411	o fix unit-tests/opt-chdir to cope with /nonexistent existing.
412	o job.c: Print -de error information when running multiple jobs
413
4142021-04-20  Simon J Gerraty  <sjg@beast.crufty.net>
415
416	* VERSION (_MAKE_VERSION): 20210420
417	Merge with NetBSD make, pick up
418	o use C99 bool type
419	o convert VarEvalFlags back into an enum
420	o cond.c: do not complain when skipping the condition 'no >= 10'
421	o hash.c: avoid allocating memory for simple variable names
422	o job.c: use distinct wording for writing to the shell commands file
423	remove type name for the abort status in job handling
424	rename PrintOutput to PrintFilteredOutput to avoid confusion
425	o main.c: avoid double slash in name of temporary directory
426	o var.c: use straight quotes for error 'Bad conditional expression'
427	reduce memory allocations in the modifiers ':D' and ':U'
428	rename members of ModifyWord_LoopArgs
429	clean up pattern flags for the modifiers ':S' and ':C'
430	reduce memory allocation and strlen calls in modifier ':from=to'
431	in the ':Q' modifier, only allocate memory if necessary
432	improve performance for LazyBuf
433	remove redundant parameter from ParseVarnameLong
434	migrate ParseModifierPart to use Substring
435	avoid unnecessary calls to strlen when evaluating modifiers
436	migrate ModifyWord functions to use Substring
437	migrate handling of the modifier ':S,from,to,' to Substring
438	reduce debug logging and memory allocation for ${:U...}
439	reduce verbosity of the -dv debug logging for standard cases
440	clean up debug logging for ':M' and ':N'
441	disallow '$' in the variable name of the modifier ':@'
442	simplify access to the name of an expression during evaluation
443
4442021-03-30  Simon J Gerraty  <sjg@beast.crufty.net>
445
446	* VERSION (_MAKE_VERSION): 20210330
447	Merge with NetBSD make, pick up
448	o replace enum bit-field with struct bit-field for VarEvalFlags
449	o rename VARE_NONE to VARE_PARSE_ONLY
450	o var.c: rename ApplyModifiersState to ModChain
451	fix double varname expansion in the variable modifier '::='
452	change debug log for variable evaluation flags to lowercase
453
4542021-03-14  Simon J Gerraty  <sjg@beast.crufty.net>
455
456	* VERSION (_MAKE_VERSION): 20210314
457	Merge with NetBSD make, pick up
458	o var.c: avoid evaluating many modifiers in parse only mode
459	in strict mode (-dL) many variable references are parsed twice,
460	the first time just to report parse errors early, so we want to
461	avoid side effects and wasted effort to the extent possible.
462
4632021-02-26  Simon J Gerraty  <sjg@beast.crufty.net>
464
465	* VERSION (_MAKE_VERSION): 20210226
466	Merge with NetBSD make, pick up
467	o remove freestanding freeIt variables
468	link via FStr
469	o var.c: restructure code in ParseVarname to target human readers
470	improve error message for;
471	  bad modifier in variable expression
472	  unclosed modifier
473	  unknown modifier
474	remove redundant parameter of ApplySingleModifier
475	explain non-obvious code around indirect variable modifiers
476	quote ':S' in error message about missing delimiter
477	extract ParseModifier_Match into separate function
478	add context information to error message about ':range' modifier
479	add quotes around variable name in an error message
480	reorder code in ModifyWords
481	use more common parameter order for VarSelectWords
482	make ModifyWord_Subst a little easier to understand
483	do not expand variable name from the command line twice
484	extract ExistsInCmdline from Var_SetWithFlags
485	save a hash map lookup when defining a cmdline variable
486	clean up VarAdd, Var_Delete, Var_ReexportVars
487	use bit-shift expressions for VarFlags constants
488	rename constants for VarFlags
489	rename ExprDefined constants for debug logging
490	rename ExprStatus to ExprDefined
491	split parameters for evaluating variable expressions
492	reduce redundant code around ModifyWords
493	print error about failed shell command before overwriting variable
494	clean up ValidShortVarname, ParseVarnameShort
495	rename VarExprStatus to ExprStatus
496	add functions for assigning the value of an expression
497	rename ApplyModifiersState_Define to Expr_Define
498	condense the code for parsing :S and :C modifiers
499
5002021-02-06  Simon J Gerraty  <sjg@beast.crufty.net>
501
502	* VERSION (_MAKE_VERSION): 20210206
503	Merge with NetBSD make, pick up
504	o unit-tests: use private TMPDIR to avoid errors from other users
505
5062021-02-05  Simon J Gerraty  <sjg@beast.crufty.net>
507
508	* VERSION (_MAKE_VERSION): 20210205
509	Merge with NetBSD make, pick up
510	o avoid strdup in mkTempFile
511	o always use vfork
512	o rename context and ctxt to scope
513	o rename some VAR constants to SCOPE
514	o Var_ functions, move the scope to the front
515	o use shortcut functions Global_Set and Global_Append
516	o add shortcut Global_Delete for deleting a global variable
517	o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete
518	o compat.c: when exiting due to an error, print graph information
519	o enum.c: remove overengineered Enum_ValueToString
520	o make.c: remove unused INTERNAL flag
521	remove unused return type of MakeBuildParent
522	o parse.c: replace parse error "Need an operator" with better message
523	o var.c: improve documentation about variable scopes
524	rename Var_ValueDirect to GNode_ValueDirect
525	rename old Var_SetWithFlags to Var_SetExpandWithFlags
526	merge SetVar into Var_SetWithFlags
527	split Var_Exists into plain Var_Exists and Var_ExistsExpand
528	split Var_Append into Var_Append and Var_AppendExpand
529	replace enum bit-set with bit-field
530	o unit-tests/var-op-shell: use kill rather than kill -14
531	which broke on darwin with recent update.
532
5332021-02-01  Simon J Gerraty  <sjg@beast.crufty.net>
534
535	* configure.in: check for sig_atomic_t and define it as 'int'
536	if missing.
537
538	* VERSION (_MAKE_VERSION): 20210201
539	Merge with NetBSD make, pick up
540	o use sig_atomic_t for caught_sigchld
541
5422021-01-30  Simon J Gerraty  <sjg@beast.crufty.net>
543
544	* VERSION (_MAKE_VERSION): 20210130
545	Merge with NetBSD make, pick up
546	o more unit tests
547	o convert SearchPath to struct
548	o split Buf_Destroy into Buf_Done and Buf_DoneData
549	o for.c: split For_Eval into separate functions
550	rename struct For to struct ForLoop
551	o job.c: do not create empty shell files in jobs mode
552	rename JobOpenTmpFile to JobWriteShellCommands
553	reduce unnecessary calls to waitpid
554	o parse.c: in -dp mode, print stack trace with each diagnostic
555
5562021-01-23  Simon J Gerraty  <sjg@beast.crufty.net>
557
558	* VERSION (_MAKE_VERSION): 20210123
559	Merge with NetBSD make, pick up
560	o rename Dir_Expand to SearchPath_Expand
561	o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags
562	o cond.c: fix debug output for comparison operators in conditionals
563	o dir.c: split Dir_FindFile into separate functions
564
5652021-01-20  Simon J Gerraty  <sjg@beast.crufty.net>
566
567	* VERSION (_MAKE_VERSION): 20210120
568	Merge with NetBSD make, pick up
569	o fix some more lint nits
570	o refine some unit tests for portability
571	o cond.c: rework parsing
572
5732021-01-10  Simon J Gerraty  <sjg@beast.crufty.net>
574
575	* VERSION (_MAKE_VERSION): 20210110
576	Merge with NetBSD make, pick up
577	o fix lint warnings
578	o consistently use boolean expressions in conditions
579
5802021-01-08  Simon J Gerraty  <sjg@beast.crufty.net>
581
582	* VERSION (_MAKE_VERSION): 20210108
583	Merge with NetBSD make, pick up
584	o job.c: back to polling token pipe if we want a token
585	o main.c: always print 'stopped in' on first call
586	The execption is if we bail because of an abort token
587	in which case just exit 6.
588
5892021-01-01  Simon J Gerraty  <sjg@beast.crufty.net>
590
591	* VERSION (_MAKE_VERSION): 20210101
592	Merge with NetBSD make, pick up
593	o Happy New Year!
594	o rename CmdOpts.lint to strict
595	o exit 2 on technical errors
596	o replace pointers in controlling conditions with booleans
597	o replace global preserveUndefined with VARE_KEEP_UNDEF
598	o compat.c: re-export variables from the actual make process
599	if using vfork this is the effect anyway
600	o cond.c: clean up VarParseResult constants
601	o for.c: fix undefined behavior in SubstVarLong
602	make control flow in SubstVarLong of .for loops more obvious
603	clean up SubstVarShort in .for loops
604	extract ForSubstBody from ForReadMore
605	clean up ForReadMore
606	simplify termination condition for .for loop
607	add error handling for .for loop items
608	job.c: re-export variables from the actual make process
609	parse.c: remove mmap for loading files, only allow files < 1 GiB
610	fix edge case in := with undefined in variable name
611	skip variable expansion in ParseDependencyTargetWord
612	var.c: split ExportVar into separate functions
613	clean up code in extracted ExportVar functions
614	remove dead code from ApplyModifiersIndirect
615	split Var_Subst into easily understandable functions
616	clean up VarParseResult constants
617
6182020-12-25  Simon J Gerraty  <sjg@beast.crufty.net>
619
620	* main.c: use .MAKE.DEPENDFILE as set by makefiles
621
6222020-12-22  Simon J Gerraty  <sjg@beast.crufty.net>
623
624	* VERSION (_MAKE_VERSION): 20201222
625	Merge with NetBSD make, pick up
626	o make DEBUG macro return boolean
627	o parse.c: fix assertion failure for files without trailing newline
628	o var.c: allow .undef to undefine multiple variables at once
629	remove excess newline from parse errors
630
6312020-12-21  Simon J Gerraty  <sjg@beast.crufty.net>
632
633	* VERSION (_MAKE_VERSION): 20201221
634	Merge with NetBSD make, pick up
635	o some unit-test updates
636
6372020-12-20  Simon J Gerraty  <sjg@beast.crufty.net>
638
639	* VERSION (_MAKE_VERSION): 20201220
640	Merge with NetBSD make, pick up
641	o more unit tests
642	o return FStr from Var_Parse and Var_Value
643	o spell nonexistent consistently
644	o add str_basename to reduce duplicate code
645	o compat.c: fix .ERROR_TARGET in compat -k mode
646	extract InitSignals from Compat_Run
647	extract UseShell from Compat_RunCommand
648	o cond.c: error out if an '.endif' or '.else' contain extraneous text
649	o for.c: rename ForIterate to ForReadMore
650	o hash.c: clean up hash function for HashTable
651	o lst.c: rename Vector.priv_cap to cap
652	o main.c: remove constant parameter from MakeMode
653	o make.c: use symbolic time for 0 in Make_Recheck
654	extract MakeChildren from MakeStartJobs
655	o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar
656	fix error message for .info/.warning/.error without argument
657	extract Var_Undef from ParseDirective
658	extract ParseSkippedBranches, ParseForLoop from ParseReadLine
659	rename mode constants for ParseGetLine to be more expressive
660	reduce debugging details in Parse_SetInput
661	fix line numbers in .for loops
662	split ParseGetLine into separate functions
663	fix garbled output for failed shell command
664	var.c: remove redundant assignment in ApplyModifier_SysV
665	error out on unknown variable modifiers at parse time
666	remove wrong error message for indirect modifier in lint mode
667	extract ApplySingleModifier from ApplyModifiers
668	use FStr for memory management in Var_SetWithFlags
669	extract SetVar from Var_SetWithFlags
670	use FStr in VarNew
671	extract string functions from ApplyModifier_To
672	error out if .undef has not exactly 1 argument
673	extract Var_DeleteVar from Var_Delete
674	extract Var_Undef from ParseDirective
675	clean up memory management for expanding variable expressions
676
6772020-12-12  Simon J Gerraty  <sjg@beast.crufty.net>
678
679	* avoid %zu
680
681	* lst.c: avoid anonymous union
682
683	* VERSION (_MAKE_VERSION): 20201212
684	Merge with NetBSD make, pick up
685	o more unit tests
686	o inline Targ_Ignore and Targ_Silent
687	o split JobFlags into separate fields
688	o remove const from function parameters (left overs from refactoring)
689	o eliminate boolean argument of Var_Export
690	o make API of Buf_Init simpler
691	o rename ParseRunOptions to ParseCommandFlags
692	o replace *line with line[0]
693	o compat.c: fix wrong exit status for multiple failed main targets
694	refactor Compat_Run to show the error condition more clearly
695	don't make .END if the main targets already failed (-k mode)
696	fix exit status in -k mode if a dependency fails
697	o for.c: clean up Buf_AddEscaped in .for loops
698	o job.c: extract ShellWriter_ErrOn from JobPrintCommand
699	make Job_Touch simpler
700	refactor JobFinish
701	rename Shell.exitFlag to errFlag
702	move Job.xtraced to ShellWriter
703	make printing of shell commands independent from the job
704	rename shell flags in struct Shell
705	extract JobOpenTmpFile from JobStart
706	rename RunFlags to CommandFlags
707	split various Job.* into separate fields
708	rename commandShell to shell
709	extract InitShellNameAndPath from Shell_Init
710	replace signal handling macros with local functions
711	replace macro MESSAGE with local function
712	parse.c: error out on null bytes in makefiles
713	error out on misspelled directives
714	rename IFile.nextbuf to readMore
715	fix undefined behavior in ParseEOF
716	str.c: remove redundant call to strlen in Str_Words
717	var.c: error out on misspelled .unexport-env
718	error out on misspelled .export directives
719	extract ExportVars from Var_Export
720	extract ExportVarsExpand from Var_Export
721	eliminate boolean argument of Var_Export
722	fix undefined behavior when exporting ${:U }
723	rename Var_ExportVars to Var_ReexportVars
724	rename Var_Export1 to ExportVar
725
7262020-12-06  Simon J Gerraty  <sjg@beast.crufty.net>
727
728	* VERSION (_MAKE_VERSION): 20201206
729	Merge with NetBSD make, pick up
730	o more unit tests
731	o inline macros for debug logging
732	o use consistent variable names for list nodes
733	o define constants for enum zero-values
734	o dir.c: use fixed format for debug output of the directory cache
735	remove Dir_InitDir
736	o lst.c: inline Lst_Enqueue, Vector_Done
737	o meta.c: remove unused parameter from meta_needed
738	o parse.c: rename parse functions
739	o suff.c: extract ExpandChildrenRegular from ExpandChildren
740	o targ.c: don't concatenate identifiers in Targ_PrintType
741	o var.c: remove comment decoration
742	extract UnexportVars from Var_UnExport
743	extract GetVarnamesToUnexport from Var_UnExport
744	extract UnexportEnv from Var_UnExport
745	extract UnexportVar from Var_UnExport
746	move CleanEnv to UnexportVars
747	replace pointer comparisons with enum
748	add FStr to var.c to make memory handling simpler
749	use FStr in Var_UnExport
750	move type definitions in var.c to the top
751	extract FreeEnvVar from Var_Parse
752	extract ShuffleStrings from ApplyModifier_Order
753
7542020-11-30  Simon J Gerraty  <sjg@beast.crufty.net>
755
756	* VERSION (_MAKE_VERSION): 20201130
757	Merge with NetBSD make, pick up
758	o add unit tests for META MODE
759	o reduce memory allocation for dirSearchPath, GNode.parents,
760	GNode.children, OpenDirs
761	o reduce pointer indirection for GNode.cohorts and
762	GNode.implicitParents
763	o remove pointer indirection from GNode.commands
764	o inline Lst_ForEachUntil in meta mode
765	o dir.c: fix memory leak for lstat cache in -DCLEANUP mode
766	clean up memory management for CachedDirs
767	fix the reference count of dotLast going negative
768	add debug logging for OpenDirs_Done
769	extract CacheNewDir from Dir_AddDir
770	add debug logging for reference counting of CachedDir
771	rename some Dir functions to SearchPath
772	o job.c: rename some global variables
773	o main.c: reduce memory allocation in ReadBuiltinRules
774	reduce memory allocation in CmdOpts.create, CmdOpts.variables,
775	CmdOpts.makefiles
776	Add .MAKE.UID and .MAKE.GID
777	o make.c: reduce memory allocation for/in toBeMade,
778	Make_ProcessWait, Make_ExpandUse
779	o meta.c: reduce memory allocation in meta_oodate
780	o parse.c: reduce memory allocations for parsing dependencies and
781	targets
782	o suff.c: reduce memory allocation in suffix handling
783
7842020-11-24  Simon J Gerraty  <sjg@beast.crufty.net>
785
786	* VERSION (_MAKE_VERSION): 20201124
787	Merge with NetBSD make, pick up
788	o .MAKE.{UID,GID} represent uid and gid running make.
789	o fix error handling for .BEGIN and .END dependency in -k mode
790	o fix missing "Stop." after failed .END node in -k mode
791	o use properly typed comparisons in boolean contexts
792	o replace a few HashTable_CreateEntry with HashTable_Set
793	o add HashSet type
794	o compat.c: split Compat_Make into smaller functions
795	extract DebugFailedTarget from Compat_RunCommand
796	o dir.c: refactor Dir_UpdateMTime
797	migrate CachedDir.files from HashTable to HashSet
798	o make.c: add high-level API for GNode.made
799
8002020-11-22  Simon J Gerraty  <sjg@beast.crufty.net>
801
802	* VERSION (_MAKE_VERSION): 20201122
803	Merge with NetBSD make, pick up
804	o rename GNode.context to vars
805	o suff.c: cleanup and refactor
806	rename some functions and vars to better reflect usage
807	add high-level API for CandidateSearcher
808	o targ.c: add more debug logging for suffix handling
809	o more unit tests
810	o add debug logging for setting and resetting the main target
811
8122020-11-17  Simon J Gerraty  <sjg@beast.crufty.net>
813
814	* VERSION (_MAKE_VERSION): 20201117
815	Merge with NetBSD make, pick up
816	o fix some unit-tests when .SHELL is dash
817	o rename Targ_NewGN to GNode_New
818	o make some GNode functions const
819	o main.c: call Targ_Init before Var_Init
820	cleanup PrintOnError, getTmpdir and ParseBoolean
821	o var.c: fix error message of failed :!cmd! modifier
822
8232020-11-14  Simon J Gerraty  <sjg@beast.crufty.net>
824
825	* VERSION (_MAKE_VERSION): 20201114
826	Merge with NetBSD make, pick up
827	o replace a few HashTable_CreateEntry with HashTable_Set
828	o clean up cached_stats
829	o rename DEFAULT to defaultNode
830	o remove redundant struct make_stat
831	o cond.c: in lint mode, check for ".else <cond>"
832	use bitset for IfState
833	replace large switch with if-else in Cond_EvalLine
834	o job.c: clean up JobExec, JobStart, JobDoOutput
835	use stderr for error message about failed touch
836	clean up Job_Touch
837	replace macro DBPRINTF with JobPrintln
838	rename JobState to JobStatus
839	main.c: switch cache for realpath from GNode to HashTable
840	clean up Fatal
841	clean up InitDefSysIncPath
842	use progname instead of hard-coded 'make' in warning
843	rename Main_SetVarObjdir to SetVarObjdir
844	make.1: document the -S option
845	make.c: fix debug output for GNode details
846	use symbolic names in debug output of GNodes
847
8482020-11-12  Simon J Gerraty  <sjg@beast.crufty.net>
849
850	* configure.in: fix --with-force-machine-arch
851
852	* VERSION (_MAKE_VERSION): 20201112
853	Merge with NetBSD make, pick up
854	o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
855	checks in InitObjdir.  Explicit .OBJDIR target always allows
856	read-only directory.
857	o cond.c: clean up Cond_EvalLine
858
8592020-11-11  Simon J Gerraty  <sjg@beast.crufty.net>
860
861	* VERSION (_MAKE_VERSION): 20201111
862	Merge with NetBSD make, pick up
863	o more unit-tests
864	o style cleanup
865	remove redundant parentheses from sizeof operator
866	replace character literal 0 with '\0'.
867	replace pointer literal 0 with NULL.
868	remove redundant parentheses.
869	replace (expr & mask) == 0 with !(expr & mask).
870	use strict typing in conditions of the form !var
871	o rename Make_OODate to GNode_IsOODate
872	o rename Make_TimeStamp to GNode_UpdateYoungestChild
873	o rename Var_Set_with_flags to Var_SetWithFlags
874	o rename dieQuietly to shouldDieQuietly
875	o buf.c: make API of Buf_Init simpler
876	o compat.c: clean up Compat_Make, Compat_RunCommand,
877	CompatDeleteTarget and CompatInterrupt
878	o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|'
879	clean up CondParser_Comparison
880	o main.c: rename getBoolean and s2Boolean
881	rename MAKEFILE_PREFERENCE for consistency
882	o parse.c: replace strstr in ParseMaybeSubMake with optimized code
883	o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR
884	replace emptyString with allocated empty string
885	error out on unclosed expressions after the colon
886
8872020-11-01  Simon J Gerraty  <sjg@beast.crufty.net>
888
889	* VERSION (_MAKE_VERSION): 20201101
890	Merge with NetBSD make, pick up
891	o negate NoExecute to GNode_ShouldExecute
892	o job.c: rename JobMatchShell to FindShellByName
893	extract EscapeShellDblQuot from JobPrintCommand
894	extract ParseRunOptions from JobPrintCommand
895	o var.c: extract ApplyModifiersIndirect from ApplyModifiers
896	treat malformed :range, :ts and :[...] as errors
897	add tests for the variable modifiers :[words] and :range
898
8992020-10-31  Simon J Gerraty  <sjg@beast.crufty.net>
900
901	* VERSION (_MAKE_VERSION): 20201031
902	Merge with NetBSD make, pick up
903	o format #include directives consistently
904	o do not look up local variables like .TARGET anywhere else
905	o main.c: Main_SetObjdir is first called for curdir which may be
906	readonly
907	reduce the scope where recursive expressions are detected
908	remove redundant :tl from getBoolean
909	clean up mkTempFile
910	o meta.c: simplify memory allocation in meta_create and meta_oodate
911	o parse.c: extract loadedfile_mmap from loadfile
912	o trace.c: document possible undefined behavior with .CURDIR
913	o var.c: make parsing of the :gmtime and :localtime modifiers stricter
914	rename ismeta to is_shell_metachar
915	remove debug logging for the :Q variable modifier
916	rename VarIsDynamic to VarnameIsDynamic
917	use consistent parameter order in varname parsing functions
918	extract ParseVarnameLong from Var_Parse
919	extract ParseVarnameShort from Var_Parse
920	fix type of ParseModifierPart parameter delim
921	extract IsEscapedModifierPart from ParseModifierPart
922	clean up ModifyWords
923	add test for combining the :@ and :? variable modifiers
924
9252020-10-30  Simon J Gerraty  <sjg@beast.crufty.net>
926
927	* VERSION (_MAKE_VERSION): 20201030
928	Merge with NetBSD make, pick up
929	o change char * to void * in Var_Value
930	o make iterating over HashTable simpler
931	o rename VAR_CMD to VAR_CMDLINE
932	o cond.c: clean up is_separator
933	fix parse error in string literal in conditional
934	o main.c: do not use objdir that is not writable
935	in lint mode, exit with error status on errors
936	o  parse.c: clean up StrContainsWord
937	fix out-of-bounds pointer in ParseTrackInput
938	o var.c: rename Str_SYSVMatch and its parameters
939	remove unsatisfiable conditions in Var_Set_with_flags
940	document where the variable name is expanded
941	fix documentation for VARP_SUB_ONE
942	rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME
943	document VAR_READONLY
944	prevent appending to read-only variables
945	extract MayExport from Var_Export1
946	remove redundant evaluations in VarFind
947	replace VarFindFlags with a simple Boolean
948	rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE
949
9502020-10-28  Simon J Gerraty  <sjg@beast.crufty.net>
951
952	* VERSION (_MAKE_VERSION): 20201028
953	Merge with NetBSD make, pick up
954	o rename defIncPath to defSysIncPath
955	o initialize all CmdOpts fields
956	o lst.c: inline Vector_Get
957	o main.c: refactor main extract
958	InitMaxJobs,InitObjdir,InitVarMake,InitRandom,
959	ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules,
960	InitDefIncPath,CmdOpts_Init,UnlimitFiles
961	o parse.c: merge curFile into includes
962	rename predecessor to order_pred
963	sort ParseSpecial alphabetically
964	remove unused, undocumented .NOEXPORT
965	rename ParseSpecial enum values consistently
966	rename some fields of struct IFile
967
9682020-10-26  Simon J Gerraty  <sjg@beast.crufty.net>
969
970	* VERSION (_MAKE_VERSION): 20201026
971	Merge with NetBSD make, pick up
972	o group the command line options and arguments into a struct
973	o rename GNode.cmgn to youngestChild
974	o rename hash functions to identify the type name
975	o negate OP_NOP and rename it to GNode_IsTarget
976	o add GNode_Path to access the path of a GNode
977	o remove macros MIN and MAX
978	o remove unused Lst_Find and Lst_FindFrom
979	o arch.c: and make Arch_FindLib simpler
980	clean up code layout
981	make Arch_ParseArchive simpler
982	o cond.c: inline CondFindStrMatch into FuncMake
983	o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath
984	omit trailing space in debug output for expanding file patterns
985	refactor DirMatchFiles
986	document that the SearchPath of Dir_FindFile may be NULL
987	remove UNCONST from Dir_Expand
988	inline DirFindName
989	o for.c: clean up code for handling .for loops
990	o hash.c: print hash in debug log with fixed width
991	clean up hash table functions
992	reduce amount of string hashing
993	o job.c: refactor JobDeleteTarget
994	use proper enum constants for aborting
995	convert result of JobStart from macros to enum
996	convert abort reason macros to enum
997	rework Job_CheckCommands to reduce indentation
998	rename Shell fields
999	add field names in declaration of DEFSHELL_CUSTOM
1000	convert JobState and JobFlags to enum types
1001	move handling of the "..." command to JobPrintCommands
1002	o lst.c: clean up
1003	refactor LstNodeNew
1004	remove Lst_Open, Lst_Next, Lst_Close
1005	remove code for circular lists from Lst_Next
1006	o main.c: do not attempt to read .MAKE.DEPENFILE if set to
1007	/dev/null or anything starting with "no"
1008	convert macros for debug flags into enum
1009	o make.c: inline Lst_Copy in Make_ExpandUse
1010	o meta.c: inline Lst_Find in meta_oodate
1011	make Lst_RemoveIf simpler in meta_oodate
1012	o parse.c: convert error level for Parse_Error to an enum
1013	o suff.c: properly terminate debug output with newline
1014	add more details to DEBUG_SRC log
1015	replace Dir_CopyDir with Dir_CopyDirSearchPath
1016	don't modify GNode name while rebuilding the suffix graph
1017	o var.c: reduce duplicate code in VarFind
1018
10192020-10-22  Simon J Gerraty  <sjg@beast.crufty.net>
1020
1021	* VERSION (_MAKE_VERSION): 20201022
1022	Merge with NetBSD make, pick up
1023	o more refactoring and simplification to reduce code size
1024	o var.c: extract CanonicalVarname from VarFind
1025	o make.c: extract UpdateImplicitParentsVars from Make_Update
1026	o main.c: extract PrintVar from doPrintVars
1027	extract HandlePWD from main
1028	o lst.c: inline simple Lst getters
1029	remove unused Lst_ForEach
1030	o job.c: move struct Shell from job.h to job.c
1031	o more unit tests
1032
10332020-10-19  Simon J Gerraty  <sjg@beast.crufty.net>
1034
1035	* configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT
1036
10372020-10-18  Simon J Gerraty  <sjg@beast.crufty.net>
1038
1039	* VERSION (_MAKE_VERSION): 20201018
1040	Merge with NetBSD make, pick up
1041	o remove USE_IOVEC
1042	o rename some Hash_* apis to Hash*
1043	o replace execError with execDie
1044	o rename Lst_Init to Lst_New
1045	o add tags to enum types
1046	o rename Stack to Vector
1047	o parse.c: more refactoring
1048	o unit-tests: make some tests use line buffered stdout
1049	o unit-tests/Makefile: in meta mode do not make all tests depend on
1050	Makefile, it isn't necessary.
1051
10522020-10-10  Simon J Gerraty  <sjg@beast.crufty.net>
1053
1054	* main.c: check for CTL_HW being defined.
1055	* unit-tests/Makefile: ensure export tests output are POSIX compliant
1056	disable opt-debug-jobs test until it works on ubuntu
1057
1058	* VERSION (_MAKE_VERSION): 20201010
1059	Merge with NetBSD make, pick up
1060	o dir.c: remove pathname limit for Dir_FindHereOrAbove
1061	o hash.c: replace strcpy with memcpy in Hash_CreateEntry
1062	o main.c: extract init_machine and init_machine_arch from main
1063	allow to disable debug logging options
1064	o parse.c: enable format string truncation warnings
1065	extract parsing of sources from ParseDoDependency
1066	split ParseDoSrc into smaller functions
1067	hide implementation details from Parse_DoVar
1068	clean up parsing of variable assignments
1069	split Parse_DoVar into manageable pieces
1070	don't modify the given line during Parse_DoVar
1071	fix out-of-bounds memory access in Parse_DoVar
1072	fix parsing of the :sh assignment modifier
1073	o var.c: rework memory allocation for the name of variables
1074	extract ApplyModifier_Literal into separate function
1075	in lint mode, reject modifiers without delimiter
1076	do not export variable names starting with '-'
1077	o fix double-free bug in -DCLEANUP mode
1078	o more cleanup to enable higher warnings level
1079	o more unit tests
1080
10812020-10-02  Simon J Gerraty  <sjg@beast.crufty.net>
1082
1083	* VERSION (_MAKE_VERSION): 20201002
1084	Merge with NetBSD make, pick up
1085	o dir.c: use hash table for looking up open directories by name
1086	o main.c: clean up option handling
1087	o parse.c: add missing const for Parse_AddIncludeDir
1088	o var.c: ApplyModifier_To, update pp in each branch
1089	o remove redundant function prototypes
1090	o more unit tests
1091
10922020-10-01  Simon J Gerraty  <sjg@beast.crufty.net>
1093
1094	* VERSION (_MAKE_VERSION): 20201001
1095	Merge with NetBSD make, pick up
1096	o compat.c: comment about "..."
1097
10982020-09-30  Simon J Gerraty  <sjg@beast.crufty.net>
1099
1100	* VERSION (_MAKE_VERSION): 20200930
1101	Merge with NetBSD make, pick up
1102	o job.c: split Job.jobPipe into 2 separate fields
1103	replace Lst_Open with direct iteration
1104	o lst.c: remove redundant assertions
1105	o targ.c: replace Lst_Open with direct iteration
1106	o var.c: fix bug in evaluation of indirect variable modifiers
1107	extract ApplyModifier_Quote into separate function
1108	o make debug logging simpler
1109
11102020-09-27  Simon J Gerraty  <sjg@beast.crufty.net>
1111
1112	* VERSION (_MAKE_VERSION): 20200927
1113	Merge with NetBSD make, pick up
1114	o parse.c: ensure parse errors result in 'stopped in' message.
1115	o compat.c: make parameter of Compat_RunCommand const
1116	o main.c: extract InitVarTarget from main
1117	o parse.c: rename ParseFinishLine to FinishDependencyGroup
1118	refactor ParseDoDependency
1119	o var.c: Var_Subst no longer returns string result
1120	rename Var_ParsePP back to Var_Parse
1121	in lint mode, improve error handling for undefined variables
1122	extract ParseVarname from Var_Parse
1123	o rename Lst_ForEach to Lst_ForEachUntil
1124	o inline Lst_ForEachUntil in several cases
1125	o clean up API for finding and creating GNodes
1126	o fix assertion failure in -j mode with .END node
1127	o inline and remove LstNode_Prev and LstNode_Next
1128	o use fine-grained type names for lists and their nodes
1129	o more unit tests
1130
11312020-09-11  Simon J Gerraty  <sjg@beast.crufty.net>
1132
1133	* VERSION (_MAKE_VERSION): 20200911
1134	Merge with NetBSD make, pick up
1135	o cond.c: split EvalComparison into smaller functions
1136	reorder parameters of condition parsing functions
1137	reduce code size in CondParser_Eval
1138	rename CondGetString to CondParser_String
1139	add CondLexer_SkipWhitespace
1140	group the condition parsing state into a struct
1141	in CondGetString, replace repeated Buf_Add with Buf_AddStr
1142	o migrate Var_Parse to Var_ParsePP
1143	o add wrappers around ctype.h functions
1144	o lst.c: use a stack instead of a list for the nested include path
1145	o more unit tests
1146
11472020-09-04  Simon J Gerraty  <sjg@beast.crufty.net>
1148
1149	* make-bootstrap.sh.in: adjust object list
1150
11512020-09-02  Simon J Gerraty  <sjg@beast.crufty.net>
1152
1153	* VERSION (_MAKE_VERSION): 20200902
1154	Merge with NetBSD make, pick up
1155	o use make_stat to ensure no confusion over valid fields
1156	returned by cached_stat
1157	o var.c: make VarQuote const-correct
1158	o add unit tests for .for
1159
11602020-09-01  Simon J Gerraty  <sjg@beast.crufty.net>
1161
1162	* VERSION (_MAKE_VERSION): 20200901
1163	Merge with NetBSD make, pick up
1164	o rename Hash_Table fields
1165	o make data types in Dir_HasWildcards more precise
1166
11672020-08-31  Simon J Gerraty  <sjg@beast.crufty.net>
1168
1169	* VERSION (_MAKE_VERSION): 20200831
1170	Merge with NetBSD make, pick up
1171	o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds
1172	o lst.c: Lst_Open renable assert that list isn't open
1173	o unit test for .TARGET dependent flags
1174	o var.c: fix aliasing bug in VarUniq
1175	o more unit tests for :u
1176
11772020-08-30  Simon J Gerraty  <sjg@beast.crufty.net>
1178
1179	* VERSION (_MAKE_VERSION): 20200830
1180	Merge with NetBSD make, pick up
1181	o allow for strict type checking for Boolean
1182	o Var_Parse never returns NULL
1183	o Var_Subst never returns NULL
1184	o Lst_Find now takes boolean match function
1185	o rename Lst_Memeber to Lst_FindDatum
1186	o rename LstNode functions to match their type
1187	o rename GNode.iParents to implicitParents
1188	o fix assertion failure for .SUFFIXES in archives
1189	o compat.c: clean up documentation for CompatInterrupt and Compat_Run
1190	remove unreachable code from CompatRunCommand
1191	o main.c: simplify getBoolean
1192	o stc.c: replace brk_string with simpler Str_Words
1193	o suff.c: add debug macros
1194
11952020-08-28  Simon J Gerraty  <sjg@beast.crufty.net>
1196
1197	* VERSION (_MAKE_VERSION): 20200828
1198	Merge with NetBSD make, pick up
1199	o lst.c: inline LstIsValid and LstNodeIsValid
1200	o remove trailing S from Lst function names after migration complete
1201	o more comment cleanup/clarification
1202	o suff.c: clean up suffix handling
1203	o more unit tests
1204
12052020-08-26  Simon J Gerraty  <sjg@beast.crufty.net>
1206
1207	* VERSION (_MAKE_VERSION): 20200826
1208	Merge with NetBSD make, pick up
1209	o enum.c: distinguish between bitsets containing flags and
1210	ordinary enums
1211	o var.c: fix error message for ::!= modifier with shell error
1212	o fix bugs in -DCLEANUP mode
1213
12142020-08-24  Simon J Gerraty  <sjg@beast.crufty.net>
1215
1216	* VERSION (_MAKE_VERSION): 20200824
1217	Merge with NetBSD make, pick up
1218	o in debug mode, print GNode details in symbols
1219
12202020-08-23  Simon J Gerraty  <sjg@beast.crufty.net>
1221
1222	* VERSION (_MAKE_VERSION): 20200823
1223	Merge with NetBSD make, pick up
1224	o lst.c: more asserts,
1225	make args to Lst_Find match others.
1226	o var.c: pass flags to VarAdd
1227	o arch.c: use Buffer
1228	o str.c: brk_string return size_t for nwords
1229	o more unit tests
1230
12312020-08-22  Simon J Gerraty  <sjg@beast.crufty.net>
1232
1233	* VERSION (_MAKE_VERSION):
1234	Merge with NetBSD make, pick up
1235	o var.c: support for read-only variables eg .SHELL
1236	being the shell used to run scripts.
1237	o lst.c: more simplification
1238	o more documentation and style cleanup
1239	o more unit tests
1240	o ensure unit-test/Makefile is run by TEST_MAKE
1241	o reduce duplication of header inclusion
1242
12432020-08-21  Simon J Gerraty  <sjg@beast.crufty.net>
1244
1245	* VERSION (_MAKE_VERSION): 20200821
1246	Merge with NetBSD make, pick up
1247	o lst.c: revert invalid assertion - but document it
1248	o dir.c: split Dir_Init into two functions
1249
12502020-08-20  Simon J Gerraty  <sjg@beast.crufty.net>
1251
1252	* lst.c: needs inttypes.h on Linux
1253
1254	* VERSION (_MAKE_VERSION): 20200820
1255	Merge with NetBSD make, pick up
1256	o make.1: clarify some passages
1257	o var.c: more cleanup, clarify comments
1258	o make_malloc.c: remove unreachable code
1259	o cond.c: make CondGetString easier to debug
1260	o simplify list usage
1261	o unit-tests: more
1262
12632020-08-16  Simon J Gerraty  <sjg@beast.crufty.net>
1264
1265	* VERSION (_MAKE_VERSION): 20200816
1266	Merge with NetBSD make, pick up
1267	o refactor unit-tests to be more fine grained
1268	  not all tests moved yet
1269
12702020-08-14  Simon J Gerraty  <sjg@beast.crufty.net>
1271
1272	* VERSION (_MAKE_VERSION): 20200814
1273	Merge with NetBSD make, pick up
1274	o more str_concat variants
1275	o more enums for flags
1276	o var.c: cleanup for higher warnings level
1277
12782020-08-10  Simon J Gerraty  <sjg@beast.crufty.net>
1279
1280	* VERSION (_MAKE_VERSION): 20200810
1281	Merge with NetBSD make, pick up
1282	o more unit tests
1283	o general comment and style cleanup
1284
12852020-08-08  Simon J Gerraty  <sjg@beast.crufty.net>
1286
1287	* VERSION (_MAKE_VERSION): 20200808
1288	Merge with NetBSD make, pick up
1289	o enum.[ch]: streamline, enums for use in flags and debug output
1290	o cond.c: cleanup
1291	o var.c: reduce duplicate code for modifiers
1292	debug logging for Var_Parse
1293	more detailed debug output
1294	o more unit tests
1295
12962020-08-06  Simon J Gerraty  <sjg@beast.crufty.net>
1297
1298	* unit-tests/Makefile: -r for recursive and include Makefile.inc
1299	so I can run tests in meta mode
1300	supress extra noise if in meta mode
1301
1302	* VERSION (_MAKE_VERSION): 20200806
1303	Merge with NetBSD make, pick up
1304	o parse.c: remove VARE_WANTRES for LINT
1305	we just want to check parsing (for now).
1306
13072020-08-05  Simon J Gerraty  <sjg@beast.crufty.net>
1308
1309	* VERSION (_MAKE_VERSION): 20200805
1310	Merge with NetBSD make, pick up
1311	o make.1: Rework the description of dependence operators
1312
13132020-08-03  Simon J Gerraty  <sjg@beast.crufty.net>
1314
1315	* VERSION (_MAKE_VERSION): 20200803
1316	Merge with NetBSD make, pick up
1317	o revert some C99 usage, for max portability
1318	o unit-tests/lint
1319
13202020-08-02  Simon J Gerraty  <sjg@beast.crufty.net>
1321
1322	* VERSION (_MAKE_VERSION): 20200802
1323	Merge with NetBSD make, pick up
1324	o more unit tests
1325
13262020-08-01  Simon J Gerraty  <sjg@beast.crufty.net>
1327
1328	* Remove NetBSD specific plumbing from unit-tests/Makefile
1329
1330	* VERSION (_MAKE_VERSION): 20200801
1331	Merge with NetBSD make, pick up
1332	o make Var_Value return const
1333	o size_t for buf sizes
1334	o optimize some buffer operations - avoid strlen
1335
13362020-07-31  Simon J Gerraty  <sjg@beast.crufty.net>
1337
1338	* VERSION (_MAKE_VERSION): 20200731
1339	Merge with NetBSD make, pick up
1340	o var.c: fix undefinded behavior for incomplete :t modifier
1341	  fixes unit-test/moderrs on Ubuntu
1342	o parse.c: When parsing variable assignments other than :=
1343	  if DEBUG(LINT) test substition of value, so we get a file and
1344	  line number in the resulting error.
1345	o dir.c: fix parsing of nested braces in dependency lines
1346	  add unit-tests
1347
13482020-07-30  Simon J Gerraty  <sjg@beast.crufty.net>
1349
1350	* VERSION (_MAKE_VERSION): 20200730
1351	Merge with NetBSD make, pick up
1352	o var.c: minor cleanup
1353	o unit-tests: more tests to improve code coverage
1354
13552020-07-28  Simon J Gerraty  <sjg@beast.crufty.net>
1356
1357	* VERSION (_MAKE_VERSION): 20200728
1358	Merge with NetBSD make, pick up
1359	o var.c: more optimizations
1360
13612020-07-26  Simon J Gerraty  <sjg@beast.crufty.net>
1362
1363	* VERSION (_MAKE_VERSION): 20200726
1364	Merge with NetBSD make, pick up
1365	o collapse lsd.lib into lst.c - reduce code size and allow inlining
1366	o lots of function comment updates
1367	o var.c: more optimizations
1368	o make return of Var_Parse const
1369
13702020-07-20  Simon J Gerraty  <sjg@beast.crufty.net>
1371
1372	* VERSION (_MAKE_VERSION): 20200720
1373	Merge with NetBSD make, pick up
1374	o DEBUG_HASH report stats at end and tone down the noise
1375	o var.c: each flag type gets its own prefix.
1376	move SysV string matching to var.c
1377	make ampersand in ${VAR:from=to&} an ordinary character
1378	cleanup and simplify implementation of modifiers
1379	o make.1: move documentation for assignment modifiers
1380
13812020-07-18  Simon J Gerraty  <sjg@beast.crufty.net>
1382
1383	* VERSION (_MAKE_VERSION): 20200718
1384	Merge with NetBSD make, pick up
1385	o DEBUG_HASH to see how well the hash tables are working
1386
13872020-07-11  Simon J Gerraty  <sjg@beast.crufty.net>
1388
1389	* bsd.after-import.mk: make sure we update unit-tests/Makefile
1390
13912020-07-10  Simon J Gerraty  <sjg@beast.crufty.net>
1392
1393	* configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC
1394
1395	* VERSION (_MAKE_VERSION): 20200710
1396	Merge with NetBSD make, pick up
1397	o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall
1398	o meta.c: target flagged .META is out-of-date if meta file missing
1399
14002020-07-09  Simon J Gerraty  <sjg@beast.crufty.net>
1401
1402	* VERSION (_MAKE_VERSION): 20200709
1403	Merge with NetBSD make, pick up
1404	o cond.c: fix for compare_expression when doEval=0
1405	o unit-tests/Makefile: rework
1406	o filemon/filemon_dev.c: ensure filemon fd is closed on exec.
1407
14082020-07-04  Simon J Gerraty  <sjg@beast.crufty.net>
1409
1410	* VERSION (_MAKE_VERSION): 20200704
1411	Merge with NetBSD make, pick up
1412	(most of this by rillig@)
1413	o lots of style and white-space cleanup
1414	o lots more unit tests for variable modifiers
1415	o simplified description of some functions
1416	o str.c: refactor Str_Match
1417	o var.c: debugging output for :@
1418	  constify VarModify parameter
1419	  fix :hash modifier on 16-bit platforms
1420	  remove unnecessary forward declarations
1421	  refactor ApplyModifier_SysV to have less indentation
1422	  simplify code for :E and :R
1423	  clean up code for :H and :T
1424	  refactor ApplyModifiers
1425
1426	* var.c: we need stdint.h on some platforms to get uint32_t
1427	* unit-test/Makefile: we need to supress the specific error
1428	for RE substitution error in modmisc, since it varies accross
1429	different OS.
1430
14312020-07-02  Simon J Gerraty  <sjg@beast.crufty.net>
1432
1433	* VERSION (_MAKE_VERSION): 20200702
1434	Merge with NetBSD make, pick up
1435	o var.c: more improvements to avoiding unnecessary evaluation
1436	use enums for flags
1437	o remove flags arg to Var_Set which outside of var.c is always 0
1438
14392020-07-01  Simon J Gerraty  <sjg@beast.crufty.net>
1440
1441	* VERSION (_MAKE_VERSION): 20200701
1442	Merge with NetBSD make, pick up
1443	o var.c: with change to cond.c; ensure that nested variables
1444	within a variable name are expanded.
1445	o unit-tests/varmisc.mk: test for nested varname
1446
14472020-06-29  Simon J Gerraty  <sjg@beast.crufty.net>
1448
1449	* VERSION (_MAKE_VERSION): 20200629
1450	Merge with NetBSD make, pick up
1451	o cond.c: do not eval unnecessary terms of conditionals.
1452
14532020-06-25  Simon J Gerraty  <sjg@beast.crufty.net>
1454
1455	* VERSION (_MAKE_VERSION): 20200625
1456	Merge with NetBSD make, pick up
1457	o meta.c: report error if lseek in filemon_read fails
1458
14592020-06-22  Simon J Gerraty  <sjg@beast.crufty.net>
1460
1461	* VERSION (_MAKE_VERSION): 20200622
1462	Merge with NetBSD make, pick up
1463	o dieQuietly: ignore OP_SUBMAKE as too aggressive
1464
14652020-06-19  Simon J Gerraty  <sjg@beast.crufty.net>
1466
1467	* VERSION (_MAKE_VERSION): 20200619
1468	Merge with NetBSD make, pick up
1469	o str.c: performance improvement for Str_Match for multiple '*'
1470	o dieQuietly: supress the failure output from make
1471	when failing node is a sub-make or a sibling failed.
1472	This cuts down greatly on unhelpful noise at the end of
1473	build log.  Disabled by -dj or .MAKE.DIE_QUIETLY=no
1474
14752020-06-10  Simon J Gerraty  <sjg@beast.crufty.net>
1476
1477	* FILES: add LICENSE to appease some packagers.
1478	This is an attempt to fairly represent the license on almost
1479	200 files, which are almost all BSD-3-Clause
1480	The few exceptions being more liberal.
1481
1482	* VERSION (_MAKE_VERSION): 20200610
1483	Merge with NetBSD make, pick up
1484	o unit test for :Or
1485
14862020-06-06  Simon J Gerraty  <sjg@beast.crufty.net>
1487
1488	* VERSION (_MAKE_VERSION): 20200606
1489	Merge with NetBSD make, pick up
1490	o make.1: cleanup
1491
1492	* Makefile: fix depends for main.o which broke MAKE_VERSION
1493
14942020-06-05  Simon J Gerraty  <sjg@beast.crufty.net>
1495
1496	* VERSION (_MAKE_VERSION): 20200605
1497	Merge with NetBSD make, pick up
1498	o dir.c: cached_stats - don't confuse stat and lstat results.
1499	o var.c: add :Or for reverse sort.
1500
15012020-05-24  Simon J Gerraty  <sjg@beast.crufty.net>
1502
1503	* configure.in: add AC_PROG_CC_C99 for mipspro compiler
1504	also if --with-filemon= specifies path to filemon.h
1505	set use_filemon=dev
1506	* dirname.c: remove include of namespace.h
1507
15082020-05-17  Simon J Gerraty  <sjg@beast.crufty.net>
1509
1510	* VERSION (_MAKE_VERSION): 20200517
1511	Merge with NetBSD make, pick up
1512	o modified dollar tests to avoid shell dependencies
1513	o new tests for .INCLUDEFROM
1514
15152020-05-16  Simon J Gerraty  <sjg@beast.crufty.net>
1516
1517	* unit-tests/dollar.mk: tweak  '1 dollar literal' test
1518	to not depend so much on shell behavior
1519
15202020-05-10  Simon J Gerraty  <sjg@beast.crufty.net>
1521
1522	* VERSION (_MAKE_VERSION): 20200510
1523	Merge with NetBSD make, pick up
1524	o unit test for dollar handling
1525
15262020-05-06  Simon J Gerraty  <sjg@beast.crufty.net>
1527
1528	* VERSION (_MAKE_VERSION): 20200506
1529	Merge with NetBSD make, pick up
1530	o str.c: empty string does not match % pattern
1531	  plus unit-test changes
1532
15332020-05-04  Simon J Gerraty  <sjg@beast.crufty.net>
1534
1535	* VERSION (_MAKE_VERSION): 20200504
1536	May the 4th be with you
1537	Merge with NetBSD make, pick up
1538	o var.c: import handling of old sysV style modifier using '%'
1539	o str.c: refactor brk_string
1540	o unit-tests: add test case for lazy conditions
1541
15422020-04-18  Simon J Gerraty  <sjg@beast.crufty.net>
1543
1544	* VERSION (_MAKE_VERSION): 20200418
1545
1546	* configure.in: use_makefile=no for cygwin et al.
1547	case insensitive filesystems just don't work if both
1548	makefile and Makefile exist.
1549	NOTE: bmake does not support cygwin and likely never will,
1550	but if brave souls want to try it - help them out.
1551
15522020-04-02  Simon J Gerraty  <sjg@beast.crufty.net>
1553
1554	* VERSION (_MAKE_VERSION): 20200402
1555	Merge with NetBSD make, pick up
1556	o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
1557	  a blank command is perfectly valid.
1558
15592020-03-30  Simon J Gerraty  <sjg@beast.crufty.net>
1560
1561	* VERSION (_MAKE_VERSION): 20200330
1562	Merge with NetBSD make, pick up
1563	o make.h: extern debug_file
1564
15652020-03-18  Simon J Gerraty  <sjg@beast.crufty.net>
1566
1567	* VERSION (_MAKE_VERSION): 20200318
1568	Merge with NetBSD make, pick up
1569	o meta.c: meta_oodate, check for corrupted meta file
1570	  earlier and more often.
1571
15722020-02-20  Simon J Gerraty  <sjg@beast.crufty.net>
1573
1574	* VERSION (_MAKE_VERSION): 20200220
1575
15762020-02-19  Simon J Gerraty  <sjg@beast.crufty.net>
1577
1578	* boot-strap: unset MAKEFLAGS
1579
15802020-02-12  Simon J Gerraty  <sjg@beast.crufty.net>
1581
1582	* VERSION (_MAKE_VERSION): 20200212
1583	* meta.c: meta_compat_parent check for USE_FILEMON
1584	  patch from Soeren Tempel
1585
15862020-02-05  Simon J Gerraty  <sjg@beast.crufty.net>
1587
1588	* VERSION: 20200205
1589	Merge with NetBSD make, pick up
1590	o meta.c: fix compat mode, need to call meta_job_output()
1591	o job.c: extra fds for meta mode not needed if using filemon_dev
1592
15932020-01-22  Simon J Gerraty  <sjg@beast.crufty.net>
1594
1595	* VERSION: 20200122
1596	Merge with NetBSD make, pick up
1597	o meta.c: avoid passing NULL to filemon_*() when meta_needed()
1598	  returns FALSE.
1599
16002020-01-21  Simon J Gerraty  <sjg@beast.crufty.net>
1601
1602	* VERSION: 20200121
1603	Merge with NetBSD make, pick up
1604	o filemon/filemon_{dev,ktrace}.c: allow selection of
1605	  filemon implementation.  filemon_dev.c uses the kernel module
1606	  while filemon_ktrace.c leverages the fktrace api available in
1607	  NetBSD.  filemon_ktrace.c can hopefully form the basis for
1608	  adding support for other tracing mechanisms such as strace on
1609	  Linux.
1610	o meta.c: when target is out-of-date per normal make rules
1611	  record value of .OODATE in meta file.
1612
16132019-09-26  Simon J Gerraty  <sjg@beast.crufty.net>
1614
1615	* VERSION: 20190926
1616	  Merge with NetBSD make, pick up
1617	  o parse.c: don't pass NULL to realpath(3)
1618	    some versions cannot handle it.
1619
16202019-04-09  Simon J Gerraty  <sjg@beast.crufty.net>
1621
1622	* VERSION: 20190409
1623	  Merge with NetBSD make, pick up
1624	  o parse.c: ParseDoDependency: free paths rather than assert
1625
16262018-12-22  Simon J Gerraty  <sjg@beast.crufty.net>
1627
1628	* VERSION: 20181222
1629
1630	* configure.in: add --without-makefile to avoid generating
1631	  makefile and make-bootstrap.sh
1632
1633	* include Makefile.inc if it exists
1634
1635	* Use Makefile and Makefile.config.in in unit-tests
1636	  so we can use just: make obj && make && make test
1637	  when bmake is already available.
1638	  We add --without-makefile to CONFIGURE_ARGS in this case.
1639
1640	* tweak bsd.after-import.mk (captures Makefile.config etc
1641	  after import to FreeBSD for example) to cope with all the above.
1642
16432018-12-21  Simon J Gerraty  <sjg@beast.crufty.net>
1644
1645	* VERSION: 20181221
1646	  Merge with NetBSD make, pick up
1647	  o parse.c: ParseVErrorInternal use .PARSEDIR
1648	    and apply if relative, and then use .PARSEFILE
1649	    for consistent result.
1650
16512018-12-20  Simon J Gerraty  <sjg@beast.crufty.net>
1652
1653	* VERSION: 20181220
1654	  Merge with NetBSD make, pick up
1655	  o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR
1656	    is relative
1657	  o var.c: avoid SEGFAULT in .unexport-env
1658	    when MAKELEVEL is not set
1659
16602018-12-16  Simon J Gerraty  <sjg@beast.crufty.net>
1661
1662	* VERSION: 20181216
1663	  Merge with NetBSD make, pick up
1664	  o fix for unit-tests/varquote.mk on Debian
1665
16662018-09-21  Simon J. Gerraty  <sjg@bad.crufty.net>
1667
1668	* VERSION: 20180919
1669	  Merge with NetBSD make, pick up
1670	  o var.c: add :q
1671	  o dir.c: cleanup caching of stats
1672
16732018-09-21  Simon J Gerraty  <sjg@beast.crufty.net>
1674
1675	* Makefile.config.in: use += where it makes sense.
1676
16772018-05-12  Simon J. Gerraty  <sjg@bad.crufty.net>
1678
1679	* VERSION: 20180512
1680	  Merge with NetBSD make, pick up
1681	  o job.c: skip polling job token pipe
1682
16832018-04-05  Simon J. Gerraty  <sjg@bad.crufty.net>
1684
1685	* VERSION: 20180405
1686	  Merge with NetBSD make, pick up
1687	  o parse.c: be more cautious about detecting depenency line
1688	    rather than sysV style include.
1689
16902018-02-22  Simon J. Gerraty  <sjg@bad.crufty.net>
1691
1692	* VERSION: 20180222
1693	  Merge with NetBSD make, pick up
1694	  o parse.c: avoid calling sysconf for every call to loadfile
1695
16962018-02-18  Simon J. Gerraty  <sjg@bad.crufty.net>
1697
1698	* VERSION: 20180218
1699	  Merge with NetBSD make, pick up
1700	  o var.c: Var_Set handle NULL value anytime.
1701
17022018-02-12  Simon J. Gerraty  <sjg@bad.crufty.net>
1703
1704	* VERSION: 20180212
1705	  Merge with NetBSD make, pick up
1706	  o parse.c: do not treat .info as warning with -W
1707
17082017-12-07  Simon J. Gerraty  <sjg@bad.crufty.net>
1709
1710	* VERSION: 20171207
1711	  Merge with NetBSD make, pick up
1712	  o var.c: Var_Append use Var_Set if var not previously set
1713	    so that VAR_CMD is handled correctly.
1714	    Add a suitable unit-test.
1715
17162017-11-26  Simon J. Gerraty  <sjg@bad.crufty.net>
1717
1718	* VERSION (_MAKE_VERSION): 20171126
1719
1720	* aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__
1721	  since AC_TRY_COMPILE puts input inside main()
1722	  which upsets modern compilers.
1723
17242017-11-18  Simon J. Gerraty  <sjg@bad.crufty.net>
1725
1726	* VERSION: 20171118
1727	  Merge with NetBSD make, pick up
1728	  o var.c: do not append to variable set on command line
1729	    add unit-test to catch this.
1730
17312017-10-28  Simon J. Gerraty  <sjg@bad.crufty.net>
1732
1733	* VERSION: 20171028
1734	  Merge with NetBSD make, pick up
1735	  o main.c: ignore empty MAKEOBJDIR
1736
1737	* Makefile.config.in:
1738	  make @prefix@ @machine*@ and @default_sys_path@ defaults.
1739
17402017-10-05  Simon J. Gerraty  <sjg@bad.crufty.net>
1741
1742	* VERSION: 20171005
1743
1744	* unit-tests/dotwait.mk: redirect stderr through pipe for more
1745	  consistent result on some platforms.
1746
17472017-08-13  Simon J. Gerraty  <sjg@bad.crufty.net>
1748
1749	* machine.sh: entry for AIX
1750
17512017-08-12  Simon J. Gerraty  <sjg@bad.crufty.net>
1752
1753	* VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION
1754	  to a file that can be included by configure as well as make.
1755	  This allows configure to set set _MAKE_VERSION in make-bootstrap.sh
1756
17572017-08-10  Simon J. Gerraty  <sjg@bad.crufty.net>
1758
1759	* Makefile (_MAKE_VERSION): 20170810
1760	  Merge with NetBSD make, pick up
1761	  o meta.c: if target is in subdir we only need subdir name in
1762	    meta_name.
1763
17642017-07-20  Simon J. Gerraty  <sjg@bad.crufty.net>
1765
1766	* Makefile (_MAKE_VERSION): 20170720
1767	  Merge with NetBSD make, pick up
1768	  o compat.c: pass SIGINT etc onto child and wait for it to exit
1769	    before we self-terminate.
1770
17712017-07-11  Simon J. Gerraty  <sjg@bad.crufty.net>
1772
1773	* Makefile (_MAKE_VERSION): 20170711
1774	  forgot to update after merge on 20170708 ;-)
1775	  o main.c: refactor to reduce size of main function.
1776	    add -v option to always fully expand values.
1777	  o meta.c: ensure command output in meta file has ending newline
1778	    even when filemon not being used.
1779	    When matching ${.MAKE.META.IGNORE_PATTERNS} do not use
1780	    pathname via ':L' since any ':' in pathname breaks that.
1781	    Instead set a '${.p.}' to pathname in the target context and
1782	    use that.
1783
17842017-05-10  Simon J. Gerraty  <sjg@bad.crufty.net>
1785
1786	* Makefile (_MAKE_VERSION): 20170510
1787	  Merge with NetBSD make, pick up
1788	  o main.c: Main_SetObjdir: ensure buf2 is in scope
1789
17902017-05-08  Simon J. Gerraty  <sjg@bad.crufty.net>
1791
1792	* Makefile (_MAKE_VERSION): 20170505
1793	  see mk/ChangeLog
1794
17952017-05-05  Simon J. Gerraty  <sjg@bad.crufty.net>
1796
1797	* parse.c: not everyone has stdint.h
1798
17992017-05-01  Simon J. Gerraty  <sjg@bad.crufty.net>
1800
1801	* Makefile (_MAKE_VERSION): 20170501
1802	  see mk/ChangeLog
1803
18042017-04-21  Simon J. Gerraty  <sjg@bad.crufty.net>
1805
1806	* Makefile (_MAKE_VERSION): 20170421
1807	  Merge with NetBSD make, pick up
1808	  o str.c: Str_Match: fix closure tests for [^] and add unit-test.
1809
18102017-04-20  Simon J. Gerraty  <sjg@bad.crufty.net>
1811
1812	* Makefile (_MAKE_VERSION): 20170420
1813	  Merge with NetBSD make, pick up
1814	  o main.c: only use -C arg "as is" if it contains no
1815	    relative component.
1816
18172017-04-18  Simon J. Gerraty  <sjg@bad.crufty.net>
1818
1819	* Makefile (_MAKE_VERSION): 20170418
1820	  Merge with NetBSD make, pick up
1821	  o main.c: fix Main_SetObjdir() for relative paths (eg obj).
1822
18232017-04-17  Simon J. Gerraty  <sjg@bad.crufty.net>
1824
1825	* Makefile (_MAKE_VERSION): 20170417
1826	  Merge with NetBSD make, pick up
1827	  o fixes a number of coverity complaints
1828	    - check return value of fseek, fcntl
1829	    - plug memory leak in Dir_FindFile, Var_LoopExpand,
1830	      JobPrintCommand, ParseTraditionalInclude
1831	    - use bmake_malloc() where NULL is not tollerated
1832	    - use MAKE_ATTR_UNUSED rather that kludges like
1833	      return(unused ? 0 : 0)
1834	    - use purge_cached_realpaths() rather than abuse cached_realpath()
1835
18362017-04-13  Simon J. Gerraty  <sjg@bad.crufty.net>
1837
1838	* Makefile (_MAKE_VERSION): 20170413
1839	  Merge with NetBSD make, pick up
1840	  o main.c: when setting .OBJDIR ignore '$' in paths.
1841
1842	* job.c: use MALLOC_OPTIONS to set malloc_options.
1843
18442017-04-11  Simon J. Gerraty  <sjg@bad.crufty.net>
1845
1846	* Makefile (_MAKE_VERSION): 20170411
1847	  Merge with NetBSD make, pick up
1848	  o str.c: Str_Match: allow [^a-z] to behave as expected.
1849
18502017-03-26  Simon J. Gerraty  <sjg@bad.crufty.net>
1851
1852	* Makefile (_MAKE_VERSION): 20170326
1853	  Merge with NetBSD make, pick up
1854	  o main.c: purge relative paths from realpath cache when .OBJDIR
1855	    is changed.
1856
18572017-03-11  Simon J. Gerraty  <sjg@bad.crufty.net>
1858
1859	* Makefile (_MAKE_VERSION): 20170311
1860	  Merge with NetBSD make, pick up
1861          o main.c: only use -C arg "as is" if it starts with '/'.
1862
18632017-03-01  Simon J. Gerraty  <sjg@bad.crufty.net>
1864
1865	* Makefile (_MAKE_VERSION): 20170301
1866	  Merge with NetBSD make, pick up
1867	  o main.c: use -C arg "as is" rather than getcwd()
1868	    if they identify the same directory.
1869	  o parse.c: ensure loadfile buffer is \n terminated in non-mmap case
1870
18712017-02-01  Simon J. Gerraty  <sjg@bad.crufty.net>
1872
1873	* Makefile (_MAKE_VERSION): 20170201
1874	  Merge with NetBSD make, pick up
1875	  o var.c: allow :_=var and avoid use of special context.
1876
18772017-01-30  Simon J. Gerraty  <sjg@bad.crufty.net>
1878
1879	* Makefile (_MAKE_VERSION): 20170130
1880	  Merge with NetBSD make, pick up
1881	  o var.c: add :range and :_
1882	  o main.c: partially initialize Dir_* before MainParseArgs()
1883	    can be called.
1884	    If -V, skip Main_ExportMAKEFLAGS()
1885
18862017-01-14  Simon J. Gerraty  <sjg@bad.crufty.net>
1887
1888	* Makefile (_MAKE_VERSION): 20170114
1889	  Merge with NetBSD make, pick up
1890	  o var.c: allow specifying the utc value used by :{gm,local}time
1891
18922016-12-12  Simon J. Gerraty  <sjg@bad.crufty.net>
1893
1894	* Makefile (_MAKE_VERSION): 20161212
1895	  Merge with NetBSD make, pick up
1896          o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too.
1897
18982016-12-09  Simon J. Gerraty  <sjg@bad.crufty.net>
1899
1900	* Makefile (_MAKE_VERSION): 20161209
1901	  Merge with NetBSD make, pick up
1902	  o main.c: cleanup setting of .OBJDIR
1903	  o parse.c: avoid coredump from (var)=val
1904
19052016-11-26  Simon J. Gerraty  <sjg@bad.crufty.net>
1906
1907	* Makefile (_MAKE_VERSION): 20161126
1908	  Merge with NetBSD make, pick up
1909	  o make.c: Make_OODate: report src node name if path not set
1910
19112016-09-26  Simon J. Gerraty  <sjg@bad.crufty.net>
1912
1913	* Makefile (_MAKE_VERSION): 20160926
1914	  Merge with NetBSD make, pick up
1915	  o support for .DELETE_ON_ERROR: (remove targets that fail)
1916
19172016-09-26  Simon J. Gerraty  <sjg@bad.crufty.net>
1918
1919	* Makefile MAN: tweak .Dt to match ${PROG}
1920
19212016-08-18  Simon J. Gerraty  <sjg@bad.crufty.net>
1922
1923	* Makefile (_MAKE_VERSION): 20160818
1924	  its a neater number; pick up whitespace fixes to man page.
1925
19262016-08-17  Simon J. Gerraty  <sjg@bad.crufty.net>
1927
1928	* Makefile (_MAKE_VERSION): 20160817
1929	  Merge with NetBSD make, pick up
1930	  o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore()
1931	    so we can call it before adding entries to missingFiles.
1932	    Thus we do not track files we have been told to ignore.
1933
19342016-08-15  Simon J. Gerraty  <sjg@bad.crufty.net>
1935
1936	* Makefile (_MAKE_VERSION): 20160815
1937	  Merge with NetBSD make, pick up
1938	  o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to
1939	    pathnames, and skip if the expansion is empty.
1940	    Useful for dirdeps.mk when checking DIRDEPS_CACHE.
1941
19422016-08-12  Simon J. Gerraty  <sjg@bad.crufty.net>
1943
1944	* Makefile (_MAKE_VERSION): 20160812
1945	  Merge with NetBSD make, pick up
1946	  o meta.c: remove all missingFiles entries that match a deleted
1947	    dir.
1948	  o main.c: set .ERROR_CMD if possible.
1949
19502016-06-06  Simon J. Gerraty  <sjg@bad.crufty.net>
1951
1952	* Makefile (_MAKE_VERSION): 20160606
1953	  Merge with NetBSD make, pick up
1954	  o dir.c: extend mtimes cache to others via cached_stat()
1955
19562016-06-04  Simon J. Gerraty  <sjg@bad.crufty.net>
1957
1958	* Makefile (_MAKE_VERSION): 20160604
1959	  Merge with NetBSD make, pick up
1960	  o meta.c: missing filemon data is only relevant if we read a
1961	    meta file.
1962	    Also do not return oodate for a missing metafile if gn->path
1963	    points to .CURDIR
1964
19652016-06-02  Simon J. Gerraty  <sjg@bad.crufty.net>
1966
1967	* Makefile (_MAKE_VERSION): 20160602
1968	  Merge with NetBSD make, pick up
1969	  o cached_realpath(): avoid hitting filesystem more than necessary.
1970	  o meta.c: refactor need_meta decision, add knobs for
1971	    missing meta file and filemon data wrt out-of-datedness.
1972
19732016-05-28  Simon J. Gerraty  <sjg@bad.crufty.net>
1974
1975	* Makefile (_MAKE_VERSION): 20160528
1976
1977	* boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION
1978
19792016-05-12  Simon J. Gerraty  <sjg@bad.crufty.net>
1980
1981	* Makefile (_MAKE_VERSION): 20160512
1982	  Merge with NetBSD make, pick up
1983	  o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS
1984	    this is useful for gcov builds.
1985	  o propagate errors from filemon(4).
1986
19872016-05-09  Simon J. Gerraty  <sjg@bad.crufty.net>
1988
1989	* Makefile (_MAKE_VERSION): 20160509
1990	  Merge with NetBSD make, pick up
1991	  o remove use of non-standard types u_int etc.
1992	  o meta.c: apply realpath() before matching against metaIgnorePaths
1993
19942016-04-04  Simon J. Gerraty  <sjg@bad.crufty.net>
1995
1996	* Makefile (_MAKE_VERSION): 20160404
1997	  Merge with NetBSD make, pick up
1998	  o allow makefile to set .MAKE.JOBS
1999
2000	* Makefile (PROG_NAME): use ${_MAKE_VERSION}
2001
20022016-03-15  Simon J. Gerraty  <sjg@bad.crufty.net>
2003
2004	* Makefile (_MAKE_VERSION): 20160315
2005	  Merge with NetBSD make, pick up
2006	  o fix handling of archive members
2007
20082016-03-13  Simon J. Gerraty  <sjg@bad.crufty.net>
2009
2010	* Makefile (_MAKE_VERSION): rename variable to avoid interference
2011	  with checks for ${MAKE_VERSION}
2012
20132016-03-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2014
2015	* Makefile (MAKE_VERSION): 20160310
2016	  Merge with NetBSD make, pick up
2017	  o meta.c: treat missing Read file same as Write, incase we Delete it.
2018
20192016-03-07  Simon J. Gerraty  <sjg@bad.crufty.net>
2020
2021	* Makefile (MAKE_VERSION): 20160307
2022	  Merge with NetBSD make, pick up
2023	  o var.c: fix :ts\nnn to be octal by default.
2024	  o meta.c: meta_finish() to cleanup memory.
2025
20262016-02-26  Simon J. Gerraty  <sjg@bad.crufty.net>
2027
2028	* Makefile (MAKE_VERSION): 20160226
2029	  Merge with NetBSD make, pick up
2030	  o meta.c: allow meta file for makeDepend if makefiles want it.
2031
20322016-02-19  Simon J. Gerraty  <sjg@bad.crufty.net>
2033
2034	* var.c: default .MAKE.SAVE_DOLLARS to FALSE
2035	  for backwards compatability.
2036
2037	* Makefile (MAKE_VERSION): 20160220
2038	  Merge with NetBSD make, pick up
2039	  o var.c: add knob to control handling of '$$' in :=
2040
20412016-02-18  Simon J. Gerraty  <sjg@bad.crufty.net>
2042
2043	* Makefile (MAKE_VERSION): 20160218
2044	  Merge with NetBSD make, pick up
2045	  o var.c: add .export-literal allows us to fix sys.clean-env.mk
2046	    post the changes to Var_Subst.
2047	    Var_Subst now takes flags, and does not consume '$$' in :=
2048
20492016-02-17  Simon J. Gerraty  <sjg@bad.crufty.net>
2050
2051	* Makefile (MAKE_VERSION): 20160217
2052	  Merge with NetBSD make, pick up
2053	  o var.c: preserve '$$' in :=
2054	  o parse.c: add .dinclude for handling included
2055	    makefile like .depend
2056
20572015-12-20  Simon J. Gerraty  <sjg@bad.crufty.net>
2058
2059	* Makefile (MAKE_VERSION): 20151220
2060	  Merge with NetBSD make, pick up
2061	  o suff.c: re-initialize suffNull when clearing suffixes.
2062
20632015-12-01  Simon J. Gerraty  <sjg@bad.crufty.net>
2064
2065	* Makefile (MAKE_VERSION): 20151201
2066	  Merge with NetBSD make, pick up
2067	  o cond.c: CondCvtArg: avoid access beyond end of empty buffer.
2068	  o meta.c: meta_oodate: use lstat(2) for checking link target
2069	    in case it is a symlink.
2070	  o var.c: avoid calling brk_string and Var_Export1 with empty
2071	    strings.
2072
20732015-11-26  Simon J. Gerraty  <sjg@bad.crufty.net>
2074
2075	* Makefile (MAKE_VERSION): 20151126
2076	  Merge with NetBSD make, pick up
2077	  o parse.c: ParseTrackInput don't access beyond
2078	    end of old value.
2079
20802015-10-22  Simon J. Gerraty  <sjg@bad.crufty.net>
2081
2082	* Makefile (MAKE_VERSION): 20151022
2083
2084	* Add support for BSD/OS which lacks inttypes.h
2085	  and really needs sys/param.h for sys/sysctl.h
2086	  also 'type' is not a shell builtin.
2087
2088	* var.c: eliminate uint32_t and need for inttypes.h
2089
2090	* main.c: PrintOnError flush stdout before run .ERROR
2091
2092	* parse.c: cope with _SC_PAGESIZE not being defined.
2093
2094
20952015-10-20  Simon J. Gerraty  <sjg@bad.crufty.net>
2096
2097	* Makefile (MAKE_VERSION): 20151020
2098	  Merge with NetBSD make, pick up
2099	  o var.c: fix uninitialized var
2100
21012015-10-12  Simon J. Gerraty  <sjg@bad.crufty.net>
2102
2103	* var.c: the conditional expressions used with ':?' can be
2104	expensive, if already discarding do not evaluate or expand
2105	anything.
2106
21072015-10-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2108
2109	* Makefile (MAKE_VERSION): 20151010
2110	  Merge with NetBSD make, pick up
2111	  o Add Boolean wantit flag to Var_Subst and Var_Parse
2112	    when FALSE we know we are discarding the result and can
2113	    skip operations like Cmd_Exec.
2114
21152015-10-09  Simon J. Gerraty  <sjg@bad.crufty.net>
2116
2117	* Makefile (MAKE_VERSION): 20151009
2118	  Merge with NetBSD make, pick up
2119	  o var.c: don't check for NULL before free()
2120	  o meta.c: meta_oodate, do not hard code ignore of makeDependfile
2121
21222015-09-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2123
2124	* Makefile (MAKE_VERSION): 20150910
2125	  Merge with NetBSD make, pick up
2126	  o main.c: with -w print Enter/Leaving messages for objdir too
2127	    if necessary.
2128	  o centralize shell metachar handling
2129
2130	* FILES: add metachar.[ch]
2131
21322015-06-06  Simon J. Gerraty  <sjg@bad.crufty.net>
2133
2134	* Makefile (MAKE_VERSION): 20150606
2135	  Merge with NetBSD make, pick up
2136	  o make.1: document .OBJDIR target
2137
21382015-05-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2139
2140	* Makefile (MAKE_VERSION): 20150505
2141	  Merge with NetBSD make, pick up
2142	  o cond.c: be strict about lhs of comparison when evaluating .if
2143	    but less so when called from variable expansion.
2144	  o unit-tests/cond2.mk: test various error conditions
2145
21462015-05-04  Simon J. Gerraty  <sjg@bad.crufty.net>
2147
2148	* machine.sh (MACHINE): Add Bitrig
2149	  patch from joerg@netbsd.org
2150
21512015-04-18  Simon J. Gerraty  <sjg@bad.crufty.net>
2152
2153	* Makefile (MAKE_VERSION): 20150418
2154	  Merge with NetBSD make, pick up
2155	  o job.c: use memmove() rather than memcpy()
2156
2157	* unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL
2158	  case, so skip it.
2159
21602015-04-11  Simon J. Gerraty  <sjg@bad.crufty.net>
2161
2162	* Makefile (MAKE_VERSION): 20150411
2163	  bump version - only mk/ changes.
2164
21652015-04-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2166
2167	* Makefile (MAKE_VERSION): 20150410
2168	  Merge with NetBSD make, pick up
2169	  o document different handling of '-' in jobs mode vs compat
2170	  o fix jobs mode so that '-' only applies to whole job
2171	    when shell lacks hasErrCtl
2172	  o meta.c: use separate vars to track lcwd and latestdir (read)
2173	    per process
2174
21752015-04-01  Simon J. Gerraty  <sjg@bad.crufty.net>
2176
2177	* Makefile (MAKE_VERSION): 20150401
2178	  Merge with NetBSD make, pick up
2179	  o meta.c: close meta file in child
2180
2181	* Makefile: use BINDIR.bmake if set.
2182	  Same for MANDIR and SHAREDIR
2183	  Handy for testing release candidates
2184	  in various environments.
2185
21862015-03-26  Simon J. Gerraty  <sjg@bad.crufty.net>
2187
2188	* move initialization of savederr to block where it is used
2189	  to avoid spurious warning from gcc5
2190
21912014-11-11  Simon J. Gerraty  <sjg@bad.crufty.net>
2192
2193	* Makefile (MAKE_VERSION): 20141111
2194	  just a cooler number
2195
21962014-11-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2197
2198	* Makefile (MAKE_VERSION): 20141105
2199	  Merge with NetBSD make, pick up
2200	  o revert major overhaul of suffix handling
2201	    and POSIX compliance - too much breakage
2202	    and impossible to make backwards compatible.
2203	  o we still have the new unit test structure which is ok.
2204	  o meta.c ensure "-- filemon" is at start of line.
2205
22062014-09-17  Simon J. Gerraty  <sjg@bad.crufty.net>
2207
2208	* configure.in: test that result of getconf PATH_MAX is numeric
2209	  and discard if not.  Apparently needed for Hurd.
2210
22112014-08-30  Simon J. Gerraty  <sjg@bad.crufty.net>
2212
2213	* Makefile (MAKE_VERSION): 20140830
2214	  Merge with NetBSD make, pick up
2215	  o major overhaul of suffix handling
2216	  o improved POSIX compliance
2217	  o overhauled unit-tests
2218
22192014-06-20  Simon J. Gerraty  <sjg@bad.crufty.net>
2220
2221	* Makefile (MAKE_VERSION): 20140620
2222	  Merge with NetBSD make, pick up
2223	  o var.c return varNoError rather than var_Error for ::= modifiers.
2224
22252014-05-22  Simon J. Gerraty  <sjg@bad.crufty.net>
2226
2227	* Makefile (MAKE_VERSION): 20140522
2228	  Merge with NetBSD make, pick up
2229	  o var.c detect some parse errors.
2230
22312014-04-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2232
2233	* Fix spelling errors - patch from Pedro Giffuni
2234
22352014-02-14  Simon J. Gerraty  <sjg@bad.crufty.net>
2236
2237	* Makefile (MAKE_VERSION): 20140214
2238	  Merge with NetBSD make, pick up
2239	  o .INCLUDEFROM*
2240	  o use Var_Value to get MAKEOBJDIR[PREFIX]
2241	  o reduced realloc'ign in brk_string.
2242	* configure.in: add a check for compiler supporting __func__
2243
22442014-01-03  Simon J. Gerraty  <sjg@bad.crufty.net>
2245
2246	* boot-strap: ignore mksrc=none
2247
22482014-01-02  Simon J. Gerraty  <sjg@bad.crufty.net>
2249
2250	* Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk
2251
22522014-01-01  Simon J. Gerraty  <sjg@bad.crufty.net>
2253
2254	* Makefile (MAKE_VERSION): 20140101
2255	* configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024)
2256	* Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max
2257	* make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for
2258	  Hurd)
2259	* configure.in: Add AC_PREREQ and check for
2260	  sysctl; patch from Andrew Shadura andrewsh at debian.org
2261
22622013-10-16  Simon J. Gerraty  <sjg@bad.crufty.net>
2263
2264	* Makefile (MAKE_VERSION): 20131010
2265	* lose the const from arg to systcl to avoid problems on older BSDs.
2266
22672013-10-01  Simon J. Gerraty  <sjg@bad.crufty.net>
2268
2269	* Makefile (MAKE_VERSION): 20131001
2270	  Merge with NetBSD make, pick up
2271	  o main.c: for NATIVE build sysctl to get MACHINE_ARCH from
2272	    hw.machine_arch if necessary.
2273	  o meta.c: meta_oodate - need to look at src of Link and target
2274	    of Move as well.
2275	* main.c: check that CTL_HW and HW_MACHINE_ARCH exist.
2276	  provide __arraycount() if needed.
2277
22782013-09-04  Simon J. Gerraty  <sjg@bad.crufty.net>
2279
2280	* Makefile (MAKE_VERSION): 20130904
2281	  Merge with NetBSD make, pick up
2282	  o Add VAR_INTERNAL context, so that internal setting of
2283	    MAKEFILE does not override value set by makefiles.
2284
22852013-09-02  Simon J. Gerraty  <sjg@bad.crufty.net>
2286
2287	* Makefile (MAKE_VERSION): 20130902
2288	  Merge with NetBSD make, pick up
2289	  o CompatRunCommand: only apply shellErrFlag when errCheck is true
2290
22912013-08-28  Simon J. Gerraty  <sjg@bad.crufty.net>
2292
2293	* Makefile (MAKE_VERSION): 20130828
2294	  Merge with NetBSD make, pick up
2295	  o Fix VAR :sh = syntax from Will Andrews at freebsd.org
2296	  o Call Job_SetPrefix() from Job_Init() so makefiles have
2297	    opportunity to set .MAKE.JOB.PREFIX
2298
22992013-07-30  Simon J. Gerraty  <sjg@bad.crufty.net>
2300
2301	* Makefile (MAKE_VERSION): 20130730
2302	  Merge with NetBSD make, pick up
2303	  o Allow suppression of --- job -- tokens by setting
2304	    .MAKE.JOB.PREFIX empty.
2305
23062013-07-16  Simon J. Gerraty  <sjg@bad.crufty.net>
2307
2308	* Makefile (MAKE_VERSION): 20130716
2309	  Merge with NetBSD make, pick up
2310	  o number of gmake compatibility tweaks
2311	    -w for gmake style entering/leaving messages
2312	    if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc.
2313	    handle MAKEFLAGS containing only letters.
2314	  o when overriding a GLOBAL variable on the command line,
2315	    delete it from GLOBAL context so -V doesn't show the wrong
2316	    value.
2317
23182013-07-06  Simon J. Gerraty  <sjg@bad.crufty.net>
2319
2320	* configure.in: We don't need MAKE_LEVEL_SAFE anymore.
2321
2322	* Makefile (MAKE_VERSION): 20130706
2323	  Merge with NetBSD make, pick up
2324	  o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is
2325	    true so that CompatRunCommand() can use it, to ensure
2326	    consistent behavior with jobs mode.
2327	  o use MAKE_LEVEL_ENV to define the variable to propagate
2328	    .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake).
2329	  o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of
2330	    paths to ignore.
2331
23322013-06-04  Simon J. Gerraty  <sjg@bad.crufty.net>
2333
2334	* Makefile (MAKE_VERSION): 20130604
2335	  Merge with NetBSD make, pick up
2336	  o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's
2337	    to avoid leaking descriptors.
2338
23392013-05-28  Simon J. Gerraty  <sjg@bad.crufty.net>
2340
2341	* Makefile (MAKE_VERSION): 20130528
2342	  Merge with NetBSD make, pick up
2343	  o var.c: cleanup some left-overs in VarHash()
2344
23452013-05-20  Simon J. Gerraty  <sjg@bad.crufty.net>
2346
2347	* Makefile (MAKE_VERSION): 20130520
2348	  generate manifest from component FILES rather than have to
2349	  update FILES when mk/FILES changes.
2350
23512013-05-18  Simon J. Gerraty  <sjg@bad.crufty.net>
2352
2353	* Makefile (MAKE_VERSION): 20130518
2354	  Merge with NetBSD make, pick up
2355	  o suff.c: don't skip all processsing for .PHONY targets
2356	    else wildcard srcs do not get expanded.
2357	  o var.c: expand name of variable to delete if necessary.
2358
23592013-03-30  Simon J. Gerraty  <sjg@bad.crufty.net>
2360
2361	* Makefile (MAKE_VERSION): 20130330
2362	  Merge with NetBSD make, pick up
2363	  o meta.c: refine the handling of .OODATE in commands.
2364	    Rather than suppress command comparison for the entire script
2365	    as though .NOMETA_CMP had been used, only suppress it for the
2366	    one command line.
2367	    This allows something like ${.OODATE:M.NOMETA_CMP} to be used to
2368	    suppress comparison of a command without otherwise affecting it.
2369	  o make.1: document that
2370
23712013-03-22  Simon J. Gerraty  <sjg@bad.crufty.net>
2372
2373	* Makefile (MAKE_VERSION): 20130321
2374	  yes, not quite right but its a cooler number.
2375	  Merge with NetBSD make, pick up
2376	  o parse.c: fix ParseGmakeExport to be portable
2377	    and add a unit-test.
2378	* meta.c: call meta_init() before makefiles are read and if built
2379	  with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON
2380	  this let's makefiles test for support.
2381	  Call meta_mode_init() to process .MAKE.MODE.
2382
23832013-03-13  Simon J. Gerraty  <sjg@bad.crufty.net>
2384
2385	* Makefile (MAKE_VERSION): 20130305
2386	  Merge with NetBSD make, pick up
2387	  o run .STALE: target when a dependency from .depend is missing.
2388	  o job.c: add Job_RunTarget() for the above and .BEGIN
2389
23902013-03-03  Simon J. Gerraty  <sjg@bad.crufty.net>
2391
2392	* Makefile (MAKE_VERSION): 20130303
2393	  Merge with NetBSD make, pick up
2394	  o main.c: set .MAKE.OS to utsname.sysname
2395	  o job.c: more checks for read and poll errors
2396	  o var.c: lose VarChangeCase() saves 4% time
2397
23982013-03-02  Simon J. Gerraty  <sjg@bad.crufty.net>
2399
2400	* boot-strap: remove MAKEOBJDIRPREFIX from environment since we
2401	  want to use MAKEOBJDIR
2402
24032013-01-27  Simon J. Gerraty  <sjg@bad.crufty.net>
2404
2405	* Merge with NetBSD make, pick up
2406	  o make.1: more info on how shell commands are handled.
2407	  o job.c,main.c: detect write errors to job pipes.
2408
24092013-01-25  Simon J. Gerraty  <sjg@bad.crufty.net>
2410
2411	* Makefile (MAKE_VERSION): 20130123
2412	  Merge with NetBSD make, pick up
2413	  o meta.c: if script uses .OODATE and meta_oodate() decides
2414	    rebuild is needed, .OODATE will be empty - set it to .ALLSRC.
2415	  o var.c: in debug output indicate which variabale modifiers
2416	    apply to.
2417	  o remove Check_Cwd logic the makefiles have been fixed.
2418
24192012-12-12  Simon J. Gerraty  <sjg@bad.crufty.net>
2420
2421	* makefile.in: add a simple makefile for folk who insist on
2422	  ./configure; make; make install
2423	  it just runs boot-strap
2424	* include mk/* to accommodate the above
2425	* boot-strap:  re-work to accommodate the above
2426	  mksrc defaults to $Mydir/mk
2427	  allow op={configure,build,install,clean,all}
2428	  add options to facilitate install
2429	* Makefile.config.in: just the bits set by configure
2430	* Makefile: bump version to 20121212
2431	  abandon Makefile.in (NetBSD Makefile)
2432	  leverage mk/* instead
2433	* configure.in: ensure srcdir is absolute
2434
24352012-11-11  Simon J. Gerraty  <sjg@bad.crufty.net>
2436
2437	* Makefile.in (MAKE_VERSION): 20121111
2438	  fix generation of bmake.cat1
2439
24402012-11-09  Simon J. Gerraty  <sjg@bad.crufty.net>
2441
2442	* Makefile.in (MAKE_VERSION): 20121109
2443	  Merge with NetBSD make, pick up
2444	  o make.c: MakeBuildChild: return 0 so search continues if a
2445	    .ORDER dependency is detected.
2446	  o unit-tests/order: test the above
2447
24482012-11-02  Simon J. Gerraty  <sjg@bad.crufty.net>
2449
2450	* Makefile.in (MAKE_VERSION): 20121102
2451	  Merge with NetBSD make, pick up
2452	  o cond.c: allow cond_state[] to grow.
2453	    In meta mode with a very large tree, we can hit the limit
2454	    while processing dirdeps.
2455
24562012-10-25  Simon J. Gerraty  <sjg@bad.crufty.net>
2457
2458	* Makefile.in: we need to use ${srcdir} not ${.CURDIR}
2459
24602012-10-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2461
2462	* Makefile.in (MAKE_VERSION): 20121010
2463	  o protect syntax that only bmake parses correctly.
2464	  o remove auto setting of FORCE_MACHINE, use configure's
2465	    --with-force-machine=whatever if that is desired.
2466
24672012-10-08  Simon J. Gerraty  <sjg@bad.crufty.net>
2468
2469	* Makefile.in: do not lose history from make.1 when generating bmake.1
2470
24712012-10-07  Simon J. Gerraty  <sjg@bad.crufty.net>
2472
2473	* Makefile.in (MAKE_VERSION): 20121007
2474	  Merge with NetBSD make, pick up
2475	  o compat.c: ignore empty commands - same as jobs mode.
2476	  o make.1: document meta chars that cause use of shell
2477
24782012-09-11  Simon J. Gerraty  <sjg@bad.crufty.net>
2479
2480	* Makefile.in (MAKE_VERSION): bump version to 20120911
2481	* bsd.after-import.mk: include Makefile.inc early and allow it to
2482	  override PROG
2483
24842012-08-31  Simon J. Gerraty  <sjg@bad.crufty.net>
2485
2486	* Makefile.in (MAKE_VERSION): bump version to 20120831
2487	  Merge with NetBSD make, pick up
2488	  o cast sizeof() to int for comparison
2489	  o minor make.1 tweak
2490
24912012-08-30  Simon J. Gerraty  <sjg@bad.crufty.net>
2492
2493	* Makefile.in (MAKE_VERSION): bump version to 20120830
2494	  Merge with NetBSD make, pick up
2495	  o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V
2496	  o debug flag -dV causes -V to show raw value regardless.
2497
24982012-07-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2499
2500	* bsd.after-import.mk (after-import): ensure unit-tests/Makefile
2501	  gets SRCTOP set.
2502
25032012-07-04  Simon J. Gerraty  <sjg@bad.crufty.net>
2504
2505	* Makefile.in (MAKE_VERSION): bump version to 20120704
2506	  Merge with NetBSD make, pick up
2507	  o Job_ParseShell should call Shell_Init if it has been
2508	    previously called.
2509	* Makefile.in: set USE_META based on configure result.
2510	  also .PARSEDIR is safer indicator of bmake.
2511
25122012-06-26  Simon J. Gerraty  <sjg@bad.crufty.net>
2513
2514	* Makefile.in: bump version to 20120626
2515	  ensure CPPFLAGS is in CFLAGS
2516	* meta.c: avoid nested externs
2517	* bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target
2518
25192012-06-20  Simon J. Gerraty  <sjg@bad.crufty.net>
2520
2521	* Makefile.in (MAKE_VERSION): bump version to 20120620
2522	  Merge with NetBSD make, pick up
2523	  o make_malloc.c: avoid including make_malloc.h again
2524
2525	* Makefile.in: avoid bmake only syntax or protect with
2526	  .if defined(.MAKE.LEVEL)
2527	* bsd.after-import.mk: replace .-include with .sinclude
2528	  ensure? SRCTOP gets a value
2529	* configure.in: look for filemon.h in /usr/include/dev/filemon first.
2530
25312012-06-19  Simon J. Gerraty  <sjg@bad.crufty.net>
2532
2533	* Makefile.in (MAKE_VERSION): bump version to 20120612
2534	  Merge with NetBSD make, pick up
2535	  o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler
2536	    for greater portability.
2537	  o unit-tests/forloop: check that .for works as expected wrt
2538	    number of times and with "quoted strings".
2539
25402012-06-06  Simon J. Gerraty  <sjg@bad.crufty.net>
2541
2542	* Makefile.in (MAKE_VERSION): bump version to 20120606
2543	  Merge with NetBSD make, pick up
2544	  o compat.c: use kill(2) rather than raise(3).
2545	* configure.in: look for sys/dev/filemon
2546	* bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile
2547	  and pass BOOTSTRAP_XTRAS to boot-strap.
2548
25492012-06-04  Simon J. Gerraty  <sjg@bad.crufty.net>
2550
2551	* Makefile.in (MAKE_VERSION): bump version to 20120604
2552	  Merge with NetBSD make, pick up
2553	  o util.c and var.c share same var for tracking if environ
2554	    has been reallocated.
2555	  o util.c provide getenv with setenv.
2556	* Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL
2557	  when the shell actively strips .MAKE.* from the environment.
2558	  We still refer to the variable always as .MAKE.LEVEL
2559	* util.c fix bug in findenv() was finding prefix of name.
2560	* compat.c: re-raising SIGINT etc after running .INTERRUPT
2561	  results in more reliable termination of all activity on many
2562	  platforms.
2563
25642012-06-02  Simon J. Gerraty  <sjg@bad.crufty.net>
2565
2566	* Makefile.in (MAKE_VERSION): bump version to 20120602
2567	  Merge with NetBSD make, pick up
2568	  o for.c: handle quoted items in .for list
2569
25702012-05-30  Simon J. Gerraty  <sjg@bad.crufty.net>
2571
2572	* Makefile.in (MAKE_VERSION): bump version to 20120530
2573	  Merge with NetBSD make, pick up
2574	  o compat.c: ignore empty command.
2575
25762012-05-24  Simon J. Gerraty  <sjg@bad.crufty.net>
2577
2578	* Makefile.in (MAKE_VERSION): bump version to 20120524
2579	* FILES: add bsd.after-import.mk:
2580	  A simple means of integrating bmake into a BSD build system.
2581
25822012-05-20  Simon J. Gerraty  <sjg@bad.crufty.net>
2583
2584	* Makefile.in (MAKE_VERSION): bump version to 20120520
2585	  Merge with NetBSD make, pick up
2586	  o increased limit for nested conditionals.
2587
25882012-05-18  Simon J. Gerraty  <sjg@bad.crufty.net>
2589
2590	* Makefile.in (MAKE_VERSION): bump version to 20120518
2591	  Merge with NetBSD make, pick up
2592	  o use _exit(2) in signal hanlder
2593	  o Don't use the [dir] cache when building nodes that might have
2594	    changed since the last exec.
2595	  o Avoid nested extern declaration warnings.
2596
25972012-04-27  Simon J. Gerraty  <sjg@bad.crufty.net>
2598
2599	* meta.c (fgetLine): avoid %z - not portable.
2600	* parse.c: Since we moved include of sys/mman.h
2601	  and def's of MAP_COPY etc. we got dups from a merge.
2602
26032012-04-24  Simon J. Gerraty  <sjg@bad.crufty.net>
2604
2605	* Makefile.in (MAKE_VERSION): bump version to 20120420
2606	  Merge with NetBSD make, pick up
2607	  o restore duplicate supression in .MAKE.MAKEFILES
2608	    runtime saving can be significant.
2609	  o Var_Subst() uses Buf_DestroyCompact() to reduce memory
2610	    consumption up to 20%.
2611
26122012-04-20  Simon J. Gerraty  <sjg@bad.crufty.net>
2613
2614	* Makefile.in (MAKE_VERSION): bump version to 20120420
2615          Merge with NetBSD make, pick up
2616	  o remove duplicate supression in .MAKE.MAKEFILES
2617	  o improved dir cache behavior
2618	  o gmake'ish export command
2619
26202012-03-25  Simon J. Gerraty  <sjg@bad.crufty.net>
2621
2622	* Makefile.in (MAKE_VERSION): bump version to 20120325
2623	  Merge with NetBSD make, pick up
2624	  o fix parsing of :[#] in conditionals.
2625
26262012-02-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2627
2628	* Makefile.in: replace use of .Nx in bmake.1 with NetBSD
2629	  since some systems cannot cope with .Nx <version>
2630
26312011-11-14  Simon J. Gerraty  <sjg@bad.crufty.net>
2632
2633	* Makefile.in (MAKE_VERSION): bump version to 20111111
2634	  Merge with NetBSD make, pick up
2635	  o debug output for .PARSEDIR and .PARSEFILE
2636
26372011-10-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2638
2639	* Makefile.in (MAKE_VERSION):  bump version to 20111010
2640
26412011-10-09  Simon J. Gerraty  <sjg@bad.crufty.net>
2642
2643	* boot-strap: check for an expected file in the dirs we look for.
2644	* make-bootstrap.sh: pass on LDSTATIC
2645
26462011-10-01  Simon J. Gerraty  <sjg@bad.crufty.net>
2647
2648	* Makefile.in (MAKE_VERSION): bump version to 20111001
2649	  Merge with NetBSD make, pick up
2650	  o ensure .PREFIX is set for .PHONY
2651	    and .TARGET set for .PHONY run via .END
2652	  o __dead used consistently
2653
26542011-09-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2655
2656	* Makefile.in (MAKE_VERSION): 20110909 is a better number ;-)
2657
26582011-09-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2659
2660	* Makefile.in (MAKE_VERSION): bump version to 20110905
2661	  Merge with NetBSD make, pick up
2662	  o meta_oodate: ignore makeDependfile
2663
26642011-08-28  Simon J. Gerraty  <sjg@bad.crufty.net>
2665
2666	* Makefile.in (MAKE_VERSION): bump version to 20110828
2667	  Merge with NetBSD make, pick up
2668	  o silent=yes in .MAKE.MODE causes meta mode to mark targets
2669	    as SILENT if a .meta file is created
2670
26712011-08-18  Simon J. Gerraty  <sjg@bad.crufty.net>
2672
2673	* Makefile.in (MAKE_VERSION): bump version to 20110818
2674	  Merge with NetBSD make, pick up
2675	  o in meta mode, if target flagged .META a missing .meta file
2676	    means target is out-of-date
2677	  o fixes for gcc 4.5 warnings
2678	  o simplify job printing code
2679
26802011-08-09  Simon J. Gerraty  <sjg@bad.crufty.net>
2681
2682	* Makefile.in (MAKE_VERSION): bump version to 20110808
2683	  Merge with NetBSD make, pick up
2684	  o do not touch OP_SPECIAL targets when doing make -t
2685
26862011-06-22  Simon J. Gerraty  <sjg@bad.crufty.net>
2687
2688	* Makefile.in (MAKE_VERSION): bump version to 20110622
2689	  Merge with NetBSD make, pick up
2690	  o meta_oodate detect corrupted .meta file and declare oodate.
2691	* configure.in: add check for setsid
2692
26932011-06-07  Simon J. Gerraty  <sjg@bad.crufty.net>
2694
2695	* Merge with NetBSD make, pick up
2696	  o unit-tests/modts now works on MirBSD
2697
26982011-06-04  Simon J. Gerraty  <sjg@bad.crufty.net>
2699
2700	* Makefile.in (MAKE_VERSION): bump version to 20110606
2701	  Merge with NetBSD make, pick up
2702	  o ApplyModifiers: when we parse a variable which is not
2703	    the entire modifier string, or not followed by ':', do not
2704	    consider it as containing modifiers.
2705	  o loadfile: ensure newline at end of mapped file.
2706
27072011-05-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2708
2709	* Makefile.in (MAKE_VERSION): bump version to 20110505
2710	  Merge with NetBSD make, pick up
2711	  o .MAKE.META.BAILIWICK - list of prefixes which define the scope
2712	    of make's control.  In meta mode, any generated file within
2713	    said bailiwick, which  is found to be missing, causes current
2714	    target to be out-of-date.
2715
27162011-04-11  Simon J. Gerraty  <sjg@bad.crufty.net>
2717
2718	* Makefile.in (MAKE_VERSION): bump version to 20110411
2719	  Merge with NetBSD make, pick up
2720	  o when long modifiers fail to match, check sysV style.
2721	    - add a test case
2722
27232011-04-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2724
2725	* Makefile.in (MAKE_VERSION): bump version to 20110410
2726	  Merge with NetBSD make, pick up
2727	  o :hash - cheap 32bit hash of value
2728	  o :localtime, :gmtime - use value as format string for strftime.
2729
27302011-03-30  Simon J. Gerraty  <sjg@bad.crufty.net>
2731
2732	* Makefile.in (MAKE_VERSION): bump version to 20110330
2733	  mostly because its a cooler version.
2734	  Merge with NetBSD make, pick up
2735	  o NetBSD tags for meta.[ch]
2736	  o job.c call meta_job_finish() after meta_job_error().
2737	  o meta_job_error() should call meta_job_finish() to ensure
2738	    .meta file is closed, and safe to copy - if .ERROR target wants.
2739	   meta_job_finish() is safe to call repeatedly.
2740
27412011-03-29  Simon J. Gerraty  <sjg@bad.crufty.net>
2742
2743	* unit-tests/modts: use printf if it is a builtin,
2744	  to save us from MirBSD
2745
2746	* Makefile.in (MAKE_VERSION): bump version to 20110329
2747	  Merge with NetBSD make, pick up
2748	  o fix for use after free() in CondDoExists().
2749	  o meta_oodate() report extra commands and return earlier.
2750
27512011-03-27  Simon J. Gerraty  <sjg@bad.crufty.net>
2752
2753	* Makefile.in (MAKE_VERSION): bump version to 20110327
2754	  Merge with NetBSD make, pick up
2755	  o meta.c, if .MAKE.MODE contains curdirOk=yes
2756	    allow creating .meta files in .CURDIR
2757	* boot-strap (TOOL_DIFF): aparently at least on linux distro
2758	  formats the output of 'type' differently - so eat any "()"
2759
27602011-03-06  Simon J. Gerraty  <sjg@bad.crufty.net>
2761
2762	* Makefile.in (MAKE_VERSION): bump version to 20110306
2763	  Merge with NetBSD make, pick up
2764	  o meta.c, only do getcwd() once
2765
27662011-03-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2767
2768	* Makefile.in (MAKE_VERSION): bump version to 20110305
2769	  Merge with NetBSD make, pick up
2770	  o correct sysV substitution handling of empty lhs and variable
2771	  o correct exists() check for dir with trailing /
2772	  o correct handling of modifiers for non-existant variables
2773	    during evaluation of conditionals.
2774	  o ensure MAP_FILE is defined.
2775	  o meta.c use curdir[] now exported by main.c
2776
27772011-02-25  Simon J. Gerraty  <sjg@bad.crufty.net>
2778
2779	* Makefile.in (MAKE_VERSION): bump version to 20110225
2780	  Merge with NetBSD make, pick up
2781	  o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after
2782	    makefiles have been read.
2783	  o fix example of :? modifier in man page.
2784
27852011-02-13  Simon J. Gerraty  <sjg@bad.crufty.net>
2786
2787	* Makefile.in (MAKE_VERSION): bump version to 20110214
2788	  Merge with NetBSD make, pick up
2789	  o meta.c handle realpath() failing when generating meta file
2790	    name.
2791
2792	* sigcompat.c: convert to ansi so we can use higher warning levels.
2793
2794
27952011-02-07  Simon J. Gerraty  <sjg@bad.crufty.net>
2796
2797	* Makefile.in (MAKE_VERSION): bump version to 20110207
2798	  Merge with NetBSD make, pick up
2799	  o fix for bug in meta mode.
2800
28012011-01-03  Simon J. Gerraty  <sjg@bad.crufty.net>
2802
2803	* parse.c: SunOS 5.8 at least does not have MAP_FILE
2804
28052011-01-01  Simon J. Gerraty  <sjg@bad.crufty.net>
2806
2807	* Makefile.in (MAKE_VERSION): bump version to 20110101
2808	  Merge with NetBSD make, pick up
2809	  o use mmap(2) if available, for reading makefiles
2810
28112010-12-15  Simon J. Gerraty  <sjg@bad.crufty.net>
2812
2813	* Makefile.in (MAKE_VERSION): bump version to 20101215
2814	  Merge with NetBSD make, pick up
2815	  o ensure meta_job_error() does not report a previous .meta file
2816	    as being culprit.
2817
28182010-12-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2819
2820	* Makefile.in (MAKE_VERSION): bump version to 20101210
2821	  Merge with NetBSD make, pick up
2822	  o meta_oodate: track cwd per process, and only consider target
2823	    out-of-date if missing file is outside make's CWD.
2824	    Ignore files in /tmp/ etc.
2825	  o to ensure unit-tests results match, need to control LC_ALL
2826	    as well as LANG.
2827	  o fix for parsing bug in var.c
2828
28292010-11-26  Simon J. Gerraty  <sjg@bad.crufty.net>
2830
2831	* Makefile.in (MAKE_VERSION): bump version to 20101126
2832	  Merge with NetBSD make, pick up
2833	  o if stale dependency is an IMPSRC, search via .PATH
2834	  o meta_oodate: if a referenced file is missing, target is
2835	    out-of-date.
2836	  o meta_oodate: if a target uses .OODATE in its commands,
2837	    it (.OODATE) needs to be recomputed.
2838	  o keep a pointer to youngest child node, rather than just its
2839	    mtime.
2840
28412010-11-02  Simon J. Gerraty  <sjg@bad.crufty.net>
2842
2843	* Makefile.in (MAKE_VERSION): bump version to 20101101
2844
28452010-10-16  Simon J. Gerraty  <sjg@bad.crufty.net>
2846
2847	* machine.sh: like os.sh,
2848	allow for uname -p producing useless drivel
2849
28502010-09-13  Simon J. Gerraty  <sjg@bad.crufty.net>
2851
2852	* boot-strap: document configure knobs for meta and filemon.
2853
2854	* Makefile.in (MAKE_VERSION): bump version to 20100911
2855	  Merge with NetBSD make, pick up
2856	  o meta.c - meta mode
2857
2858	* make-bootstrap.sh.in: handle meta.c
2859	* configure.in: add knobs for use_meta and filemon_h
2860	  also, look for dirname, str[e]sep and strlcpy
2861	* util.c: add simple err[x] and warn[x]
2862
28632010-08-08  Simon J. Gerraty  <sjg@bad.crufty.net>
2864
2865	* boot-strap (TOOL_DIFF): set this to ensure tests use
2866	  the same version of diff that configure tested
2867
2868	* Makefile.in (MAKE_VERSION): bump version to 20100808
2869	  Merge with NetBSD make, pick up
2870	  o in jobs mode, when we discover we cannot make something,
2871	    call PrintOnError before exit.
2872
28732010-08-06  Simon J. Gerraty  <sjg@bad.crufty.net>
2874
2875	* Makefile.in (MAKE_VERSION): bump version to 20100806
2876	  Merge with NetBSD make, pick up
2877	  o formatting fixes for ignored errors
2878	  o ensure jobs are cleaned up regardless of where wait() was called.
2879
28802010-06-28  Simon J. Gerraty  <sjg@bad.crufty.net>
2881
2882	* Makefile.in (MAKE_VERSION): bump version to 20100618
2883	* os.sh (MACHINE_ARCH): watch out for drivel from uname -p
2884
28852010-06-16  Simon J. Gerraty  <sjg@bad.crufty.net>
2886
2887	* Makefile.in (MAKE_VERSION): bump version to 20100616
2888	  Merge with NetBSD make, pick up
2889	  o man page update
2890	  o call PrintOnError from JobFinish when we detect an error we
2891	    are not ignoring.
2892
28932010-06-06  Simon J. Gerraty  <sjg@bad.crufty.net>
2894
2895	* Makefile.in (MAKE_VERSION): bump version to 20100606
2896	  Merge with NetBSD make, pick up
2897	  o man page update
2898
28992010-06-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2900
2901	* Makefile.in (MAKE_VERSION): bump version to 20100605
2902	  Merge with NetBSD make, pick up
2903	  o use bmake_signal() which is a wrapper around sigaction()
2904	    in place of signal()
2905	  o add .export-env to allow exporting variables to environment
2906	    without tracking (so no re-export when the internal value is
2907	    changed).
2908
29092010-05-24  Simon J. Gerraty  <sjg@bad.crufty.net>
2910
2911	* Makefile.in (MAKE_VERSION): bump version to 20100524
2912	  Merge with NetBSD make, pick up
2913	  o fix for .info et al being greedy.
2914
29152010-05-23  Simon J. Gerraty  <sjg@bad.crufty.net>
2916
2917	* Makefile.in (MAKE_VERSION): bump version to 20100520
2918	  Merge with NetBSD make, pick up
2919	  o back to using realpath on argv[0]
2920	    but only if contains '/' and does not start with '/'.
2921
29222010-05-10  Simon J. Gerraty  <sjg@bad.crufty.net>
2923
2924	* boot-strap: use absolute path for bmake when running tests.
2925
2926	* Makefile.in (MAKE_VERSION):  bump version to 20100510
2927	  Merge with NetBSD make, pick up
2928	  o revert use of realpath on argv[0]
2929	    too many corner cases.
2930	  o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target.
2931
29322010-05-05  Simon J. Gerraty  <sjg@bad.crufty.net>
2933
2934	* Makefile.in (MAKE_VERSION): bump version to 20100505
2935	  Merge with NetBSD make, pick up
2936	  o fix for missed SIGCHLD when compiled with SunPRO
2937	    actually for bmake, defining FORCE_POSIX_SIGNALS would have
2938	    done the job.
2939
29402010-04-30  Simon J. Gerraty  <sjg@bad.crufty.net>
2941
2942	* Makefile.in (MAKE_VERSION): bump version to 20100430
2943	  Merge with NetBSD make, pick up
2944	  o fflush stdout before writing to stdout
2945
29462010-04-23  Simon J. Gerraty  <sjg@bad.crufty.net>
2947
2948	* Makefile.in (MAKE_VERSION): bump version to 20100423
2949	  Merge with NetBSD make, pick up
2950	  o updated unit tests for Haiku (this time for sure).
2951	* boot-strap: based on patch from joerg
2952	  honor --with-default-sys-path better.
2953	* boot-strap: remove mention of --with-prefix-sys-path
2954
29552010-04-22  Simon J. Gerraty  <sjg@bad.crufty.net>
2956
2957	* Makefile.in (MAKE_VERSION): bump version to 20100422
2958	* Merge with NetBSD make, pick up
2959	  o fix for vfork() on Darwin.
2960	  o fix for bogus $TMPDIR.
2961	  o set .MAKE.MODE=compat for -B
2962	  o set .MAKE.JOBS=max_jobs for -j max_jobs
2963	  o allow unit-tests to run without any *.mk
2964	  o unit-tests/modmisc be more conservative in dirs presumed to exist.
2965	* boot-strap: ignore /usr/share/mk except on NetBSD.
2966	* unit-tests/Makefile.in: set LANG=C when running unit-tests to
2967	  ensure sort(1) behaves as expected.
2968
29692010-04-21  Simon J. Gerraty  <sjg@bad.crufty.net>
2970
2971	* boot-strap: add FindHereOrAbove so we can use -m .../mk
2972
29732010-04-20  Simon J. Gerraty  <sjg@bad.crufty.net>
2974
2975	* Makefile.in (MAKE_VERSION): bump version to 20100420
2976	* Merge with NetBSD make, pick up
2977	  o fix for variable realpath() behavior.
2978	    we have to stat(2) the result to be sure.
2979	  o fix for .export (all) when nested vars use :sh
2980
29812010-04-14  Simon J. Gerraty  <sjg@bad.crufty.net>
2982
2983	* Makefile.in (MAKE_VERSION): bump version to 20100414
2984	* Merge with NetBSD make, pick up
2985	  o use realpath to resolve argv[0] (for .MAKE) if needed.
2986	  o add realpath from libc.
2987	  o add :tA to resolve variable via realpath(3) if possible.
2988
29892010-04-08  Simon J. Gerraty  <sjg@bad.crufty.net>
2990
2991	* Makefile.in (MAKE_VERSION): bump version to 20100408
2992	* Merge with NetBSD make, pick up
2993	  o unit tests for .ERROR, .error
2994	  o fix for .ERROR to ensure it cannot be default target.
2995
29962010-04-06  Simon J. Gerraty  <sjg@bad.crufty.net>
2997
2998	* Makefile.in (MAKE_VERSION): bump version to 20100406
2999	* Merge with NetBSD make, pick up
3000	  o fix for compat mode "Error code" going to debug_file.
3001	  o fix for .ALLSRC being populated twice.
3002	  o support for .info, .warning and .error directives
3003	  o .MAKE.MODE to control make's operational mode
3004	  o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile
3005	    name(s).
3006	  o .MAKE.DEPENDFILE to control the name of the depend file
3007	  o .ERROR target - run on failure.
3008
30092010-03-18  Simon J. Gerraty  <sjg@bad.crufty.net>
3010
3011	* make-bootstrap.sh.in: extract MAKE_VERSION from Makefile
3012
3013	* os.sh,arch.c: patch for Haiku from joerg at netbsd
3014
30152010-03-17  Simon J. Gerraty  <sjg@bad.crufty.net>
3016
3017	* Makefile.in (MAKE_VERSION): bump version to 20100222
3018	* Merge with NetBSD make, pick up
3019	  o better error msg for .for with mutiple inter vars
3020
3021	* boot-strap:
3022	  o use make-bootstrap.sh from joerg at netbsd
3023	    to avoid the need for a native make when bootstrapping.
3024	  o add "" everywhere ;-)
3025	  o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1
3026	    otherwise the pre-formated version.
3027
30282010-01-04  Simon J. Gerraty  <sjg@bad.crufty.net>
3029
3030	* Makefile.in (MAKE_VERSION): bump version to 20100102
3031	* Merge with NetBSD make, pick up:
3032	  o fix for -m .../
3033
30342009-11-18  Simon J. Gerraty  <sjg@void.crufty.net>
3035
3036	* Makefile.in (MAKE_VERSION): bump version to 20091118
3037	* Merge with NetBSD make, pick up:
3038	  o .unexport
3039	  o report lines that start with '.' and should have ':'
3040	    (catch typo's of .el*if).
3041
30422009-10-30  Simon J. Gerraty  <sjg@void.crufty.net>
3043
3044	* configure.in: Ensure that srcdir and mksrc are absolute paths.
3045
30462009-10-09  Simon J. Gerraty  <sjg@void.crufty.net>
3047
3048	* Makefile.in (MAKE_VERSION): fix version to 20091007
3049
30502009-10-07  Simon J. Gerraty  <sjg@void.crufty.net>
3051
3052	* Makefile.in (MAKE_VERSION): bump version to 200910007
3053	* Merge with NetBSD make, pick up:
3054	  o fix for parsing of :S;...;...; applied to .for loop iterator
3055	    appearing in a dependency line.
3056
30572009-09-09  Simon J. Gerraty  <sjg@void.crufty.net>
3058
3059	* Makefile.in (MAKE_VERSION): bump version to 20090909
3060	* Merge with NetBSD make, pick up:
3061	  o fix for -C, .CURDIR and .OBJDIR
3062	* boot-strap:
3063	  o allow share_dir to be set independent of prefix.
3064	  o select default share_dir better when prefix ends in $HOST_TARGET
3065	  o if FORCE_BSD_MK etc were set, include them in the suggested
3066	    install-mk command.
3067
30682009-09-08  Simon J. Gerraty  <sjg@void.crufty.net>
3069
3070	* Makefile.in (MAKE_VERSION): bump version to 20090908
3071	* Merge with NetBSD make, pick up:
3072	  o .MAKE.LEVEL for recursion tracking
3073	  o fix for :M scanning \:
3074
30752009-09-03  Simon J. Gerraty  <sjg@void.crufty.net>
3076
3077	* configure.in: Don't -D__EXTENSIONS__ if
3078	AC_USE_SYSTEM_EXTENSIONS says "no".
3079
30802009-08-26  Simon J. Gerraty  <sjg@void.crufty.net>
3081
3082	* Makefile.in (MAKE_VERSION): bump version to 20090826
3083	Simplify MAKE_VERSION to just the bare date.
3084	* Merge with NetBSD make, pick up:
3085	  o -C directory support.
3086	  o support for SIGINFO
3087	  o use $TMPDIR for temp files.
3088	  o child of vfork should be careful about modifying parent's state.
3089
3090
30912009-03-26  Simon J. Gerraty  <sjg@void.crufty.net>
3092
3093	* Appy some patches for MiNT from David Brownlee
3094
30952009-02-26  Simon J. Gerraty  <sjg@void.crufty.net>
3096
3097	* Makefile.in (BMAKE_VERSION): bump version to 20090222
3098	* Merge with NetBSD make, pick up:
3099	  o Possible null pointer de-ref in Var_Set.
3100
31012009-02-08  Simon J. Gerraty  <sjg@void.crufty.net>
3102
3103	* Makefile.in (BMAKE_VERSION): bump version to 20090204
3104	* Merge with NetBSD make, pick up:
3105	  o bmake_malloc et al moved to their own .c
3106	  o Count both () and {} when looking for the end of a :M pattern
3107	  o Change 'Buffer' so that it is the actual struct, not a pointer to it.
3108	  o strlist.c - functions for processing extendable arrays of pointers to strings.
3109	  o ClientData replaced with void *, so const void * can be used.
3110	  o New debug flag C for DEBUG_CWD
3111
31122008-11-11  Simon J. Gerraty  <sjg@void.crufty.net>
3113
3114	* Makefile.in (BMAKE_VERSION): bump version to 20081111
3115	  Apply patch from Joerg Sonnenberge to
3116	  configure.in:
3117	  o remove some redundant checks
3118	  o check for emlloc etc only in libutil and require the whole family.
3119	  util.c:
3120	  o remove [v]asprintf which is no longer used.
3121
31222008-11-04  Simon J. Gerraty  <sjg@void.crufty.net>
3123
3124	* Makefile.in (BMAKE_VERSION): bump version to 20081101
3125	* Merge with NetBSD make, pick up:
3126	  o util.c: avoid use of putenv() - christos
3127
31282008-10-30  Simon J. Gerraty  <sjg@void.crufty.net>
3129
3130	* Makefile.in (BMAKE_VERSION): bump version to 20081030
3131	  pick up man page tweaks.
3132
31332008-10-29  Simon J. Gerraty  <sjg@void.crufty.net>
3134
3135	* Makefile.in: move processing of LIBOBJS to after is definition!
3136	  thus we'll have getenv.c in SRCS only if needed.
3137
3138	* make.1: add examples of how to use :?
3139
3140	* Makefile.in (BMAKE_VERSION): bump version to 20081029
3141	* Merge with NetBSD make, pick up:
3142	  o fix for .END processing with -j
3143	  o segfault from Parse_Error when no makefile is open
3144	  o handle numeric expressions in any variable expansion
3145	  o debug output now defaults to stderr, -dF to change it - apb
3146	  o make now uses bmake_malloc etc so that it can build natively
3147	    on A/UX - wasn't an issue for bmake, but we want to keep in sync.
3148
31492008-09-27  Simon J. Gerraty  <sjg@void.crufty.net>
3150
3151	* Makefile.in (BMAKE_VERSION): bump version to 20080808
3152	* Merge with NetBSD make, pick up:
3153	  o fix for PR/38840: Pierre Pronchery: make crashes while parsing
3154	    long lines in Makefiles
3155	  o optimizations for VarQuote by joerg
3156	  o fix for PR/38756: dominik: make dumps core on invalid makefile
3157
31582008-05-15  Simon J. Gerraty  <sjg@void.crufty.net>
3159
3160	* Makefile.in (BMAKE_VERSION): bump version to 20080515
3161	* Merge with NetBSD make, pick up:
3162	  o fix skip setting vars in VAR_GLOBAL context, to handle
3163	    cases where VAR_CMD is used for other than command line vars.
3164
31652008-05-14  Simon J. Gerraty  <sjg@void.crufty.net>
3166
3167	* boot-strap (make_version): we may need to look in
3168	$prefix/share/mk for sys.mk
3169
3170	* Makefile.in (BMAKE_VERSION): bump version to 20080514
3171	* Merge with NetBSD make, pick up:
3172	  o skip setting vars in VAR_GLOBAL context, when already set in
3173	  VAR_CMD which takes precedence.
3174
31752008-03-30  Simon J. Gerraty  <sjg@void.crufty.net>
3176
3177	* Makefile.in (BMAKE_VERSION):  bump version to 20080330
3178	* Merge with NetBSD make, pick up:
3179	  o fix for ?= when LHS contains variable reference.
3180
31812008-02-15  Simon J. Gerraty  <sjg@void.crufty.net>
3182
3183	* merge some patches from NetBSD pkgsrc.
3184
3185	* makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of
3186	the MAKSYSPATH used during bootstrap.
3187
3188	* Makefile.in (BMAKE_VERSION): bump version to 20080215
3189	* Merge with NetBSD make, pick up:
3190	  o warn if non-space chars follow 'empty' in a conditional.
3191
31922008-01-18  Simon J. Gerraty  <sjg@void.crufty.net>
3193
3194	* Makefile.in (BMAKE_VERSION): bump version to 20080118
3195	* Merge with NetBSD make, pick up:
3196	  o consider dependencies read from .depend as optional - dsl
3197	  o remember when buffer for reading makefile grows - dsl
3198	  o add -dl (aka LOUD) - David O'Brien
3199
32002007-10-22  Simon J. Gerraty  <sjg@void.crufty.net>
3201
3202	* Makefile.in (BMAKE_VERSION): bump version to 20071022
3203	* Merge with NetBSD make, pick up:
3204	  o Allow .PATH<suffix> to be used for .include ""
3205
3206	* boot-strap: source default settings from .bmake-boot-strap.rc
3207
32082007-10-16  Simon J. Gerraty  <sjg@void.crufty.net>
3209
3210	* Makefile.in: fix maninstall on various systems
3211	  provided that our man.mk is used.
3212	  For non-BSD systems we install the preformatted page
3213	  into $MANDIR/cat1
3214
32152007-10-15  Simon J. Gerraty  <sjg@void.crufty.net>
3216
3217	* boot-strap: make bmake.1 too, so maninstall works.
3218
32192007-10-14  Simon J. Gerraty  <sjg@void.crufty.net>
3220
3221	* Makefile.in (BMAKE_VERSION): bump version to 20071014
3222	* Merge with NetBSD make, pick up:
3223	  o revamped handling of defshell - configure no longer needs to
3224	    know the content of the shells array - apb
3225	  o stop Var_Subst modifying its input - apb
3226	  o avoid calling ParseTrackInput too often - dsl
3227
32282007-10-11  Simon J. Gerraty  <sjg@void.crufty.net>
3229
3230	* Makefile.in (BMAKE_VERSION): bump version to 20071011
3231	* Merge with NetBSD make, pick up:
3232	  o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path.
3233
3234	* sigcompat.c: some tweaks for HP-UX 11.x based on
3235	  patch from Tobias Nygren
3236
3237	* configure.in: update handling of --with-defshell to match
3238	  new make behavior.  --with-defshell=/usr/xpg4/bin/sh
3239	  will now do what one might hope - provided the chosen shell
3240	  behaves enough like sh.
3241
32422007-10-08  Simon J. Gerraty  <sjg@void.crufty.net>
3243
3244	* Makefile.in (BMAKE_VERSION): bump to 20071008
3245	* Merge with NetBSD make, pick up:
3246	  o .MAKE.JOB.PREFIX - control the token output before jobs - sjg
3247	  o .export/.MAKE.EXPORTED - export of variables - sjg
3248	  o .MAKE.MAKEFILES - track all makefiles read - sjg
3249	  o performance improvements - dsl
3250	  o revamp parallel job scheduling - dsl
3251
32522006-07-28  Simon J. Gerraty  <sjg@void.crufty.net>
3253
3254	* Makefile.in (BMAKE_VERSION): bump to 20060728
3255	* Merge with NetBSD make, pick up:
3256	  o extra debug info during variable and cond processing - sjg
3257	  o shell definition now covers newline - rillig
3258	  o minor mem leak in PrintOnError - sjg
3259
32602006-05-11  Simon J. Gerraty  <sjg@void.crufty.net>
3261
3262	* Makefile.in (BMAKE_VERSION):  bump to 20060511
3263	* Merge with NetBSD make, pick up:
3264	  o more memory leaks - coverity
3265	  o possible overflow in ArchFindMember - coverity
3266	  o extract variable modifier code out of Var_Parse()
3267	    so it can be called recursively - sjg
3268	  o unit-tests/moderrs - sjg
3269
32702006-04-12  Simon J. Gerraty  <sjg@void.crufty.net>
3271
3272	* Makefile.in (BMAKE_VERSION): bump to 20060412
3273	* Merge with NetBSD make, pick up:
3274	  o fixes for some memory leaks - coverity
3275	  o only read first sys.mk etc when searching sysIncPath - sjg
3276
3277	* main.c (ReadMakefile): remove hack for __INTERIX that prevented
3278	setting ${MAKEFILE} - OBATA Akio
3279
32802006-03-18  Simon J. Gerraty  <sjg@void.crufty.net>
3281
3282	* Makefile.in (BMAKE_VERSION): bump to 20060318
3283	* Merge with NetBSD make, pick up:
3284	  o cleanup of job.c to remove remote handling, distcc is more
3285	    useful and this code was likely bit-rotting - dsl
3286	  o fix for :P modifier - sjg
3287	* boot-strap: set default prefix to something reasonable
3288	  (for me anyway).
3289
32902006-03-01  Simon J. Gerraty  <sjg@void.crufty.net>
3291
3292	* Makefile.in (BMAKE_VERSION): bump to 20060301
3293	* Merge with NetBSD make, pick up:
3294	  o make .WAIT apply recursively, document and test case - apb
3295	  o allow variable modifiers in a variable appear anywhere in
3296	    modifier list, document and test case - sjg
3297
32982006-02-22  Simon J. Gerraty  <sjg@void.crufty.net>
3299
3300	* Makefile.in (BMAKE_VERSION): bump to 20060222
3301	* Merge with NetBSD make, pick up:
3302	  o improved job token handling - dsl
3303	  o SIG_DFL the correct signal before exec - dsl
3304	  o more debug info during parsing - dsl
3305	  o allow variable modifiers to be specified via variable - sjg
3306	* boot-strap: explain why we died if no mksrc
3307
33082005-11-05  Simon J. Gerraty  <sjg@void.crufty.net>
3309
3310	* Makefile.in (BMAKE_VERSION): bump to 20051105
3311	* configure.in: always set default_sys_path
3312	  default is ${prefix}/share/mk
3313	  - remove prefix_sys_path, anyone wanting more than above
3314	    needs to set it manually.
3315
33162005-11-04  Simon J. Gerraty  <sjg@void.crufty.net>
3317
3318	* boot-strap: make this a bit easier for pkgsrc folk.
3319	  bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to
3320	  'mips' while pkgsrc wants 'mipseb' or 'mipsel'
3321
33222005-11-02  Simon J. Gerraty  <sjg@void.crufty.net>
3323
3324	* Makefile.in (BMAKE_VERSION): bump to 20051102
3325	* job.c (JobFinish): fix likely ancient merge lossage
3326	fix from Todd Vierling.
3327	* boot-strap (srcdir): allow setting mksrc=none
3328
33292005-10-31  Simon J. Gerraty  <sjg@void.crufty.net>
3330
3331	* Makefile.in (BMAKE_VERSION): bump to 20051031
3332	* ranlib.h: skip on OSF too.
3333	  (NetBSD PR 31864)
3334
33352005-10-10  Simon J. Gerraty  <sjg@void.crufty.net>
3336
3337	* Makefile.in (BMAKE_VERSION): bump to 20051002
3338	  fix a silly typo
3339
33402005-10-09  Simon J. Gerraty  <sjg@void.crufty.net>
3341
3342	* Makefile.in (BMAKE_VERSION): bump to 20051001
3343	  support for UnixWare and some other systems,
3344	  based on patches from pkgsrc/bootstrap
3345
33462005-09-03  Simon J. Gerraty  <sjg@void.crufty.net>
3347
3348	* Makefile.in (BMAKE_VERSION): bump to 20050901
3349	* Merge with NetBSD make, pick up:
3350	  o possible parse error causing us to wander off.
3351
33522005-06-06  Simon J. Gerraty  <sjg@void.crufty.net>
3353
3354	* Makefile.in (BMAKE_VERSION): bump to 20050606
3355	* Merge with NetBSD make, pick up:
3356	  o :0x modifier for randomizing a list
3357	  o fixes for a number of -Wuninitialized issues.
3358
33592005-05-30  Simon J. Gerraty  <sjg@void.crufty.net>
3360
3361	* Makefile.in (BMAKE_VERSION): bump to 20050530
3362	* Merge with NetBSD make, pick up:
3363	  o Handle dependencies for .BEGIN, .END and .INTERRUPT
3364
3365	* README: was seriously out of date.
3366
33672005-03-22  Simon J. Gerraty  <sjg@void.crufty.net>
3368
3369	* Important to use .MAKE rather than MAKE.
3370
33712005-03-15  Simon J. Gerraty  <sjg@void.crufty.net>
3372
3373	* Makefile.in (BMAKE_VERSION): bump to 20050315
3374	* Merge with NetBSD make, pick up:
3375	  o don't mistake .elsefoo for .else
3376	  o use suffix-specific search path correctly
3377	  o bunch of style nits
3378
33792004-05-11  Simon J. Gerraty  <sjg@void.crufty.net>
3380
3381	* boot-strap:
3382	o ensure that args to --src and --with-mksrc
3383	  are resolved before giving them to configure.
3384	o add -o "objdir" so that builder can control it,
3385	  default is $OS as determined by os.sh
3386	o add -q to suppress all the install instructions.
3387
33882004-05-08  Simon J. Gerraty  <sjg@void.crufty.net>
3389
3390	* Remove __IDSTRING()
3391
3392	* Makefile.in (BMAKE_VERSION): bump to 20040508
3393	* Merge with NetBSD make, pick up:
3394	  o posix fixes
3395	    - remove '-e' from compat mode
3396	    - add support for '+' command-line prefix.
3397	  o fix for handling '--' on command-line.
3398	  o fix include in lst.lib/lstInt.h to simplify '-I's
3399	  o we also picked up replacement of MAKE_BOOTSTRAP
3400	    with !MAKE_NATIVE which is a noop, but possibly confusing.
3401
34022004-04-14  Simon J. Gerraty  <sjg@void.crufty.net>
3403
3404	* Makefile.in (BMAKE_VERSION): bump to 20040414
3405	* Merge with NetBSD make, pick up:
3406	  o allow quoted strings on lhs of conditionals
3407	  o issue warning when extra .else is seen
3408	  o print line numer when errors encountered during parsing from
3409	  string.
3410
34112004-02-20  Simon J. Gerraty  <sjg@void.crufty.net>
3412
3413	* Makefile.in (BMAKE_VERSION):  bump to 20040220
3414	* Merge with NetBSD make, pick up:
3415	  o fix for old :M parsing bug.
3416	  o re-jigged unit-tests
3417
34182004-02-15  Simon J. Gerraty  <sjg@void.crufty.net>
3419
3420	* Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,}
3421	so that './bmake -f Makefile test' works.
3422
34232004-02-14  Simon J. Gerraty  <sjg@void.crufty.net>
3424
3425	* Makefile.in: (BMAKE_VERSION): bump to 20040214
3426	* Merge with NetBSD make, pick up:
3427	  o search upwards for *.mk
3428	  o fix for double free of var substitution buffers
3429	  o use of getopt replaced with custom code, since the usage
3430	  (re-scanning) isn't posix compatible.
3431
34322004-02-12  Simon J. Gerraty  <sjg@void.crufty.net>
3433
3434	* arch.c: don't include ranlib.h on ELF systems
3435	(thanks to Chuck Cranor <chuck@ece.cmu.edu>).
3436
34372004-01-18  Simon J. Gerraty  <sjg@void.crufty.net>
3438
3439	* Makefile.in (BMAKE_VERSION): bump to 20040118
3440
3441	* boot-strap (while): export vars we assign to on cmdline
3442	* unit-test/Makefile.in: ternary is .PHONY
3443
34442004-01-08  Simon J. Gerraty  <sjg@void.crufty.net>
3445
3446	* Makefile.in (BMAKE_VERSION): bump version to 20040108
3447	* Merge with NetBSD make, pick up:
3448	  o fix for ternary modifier
3449
34502004-01-06  Simon J. Gerraty  <sjg@void.crufty.net>
3451
3452	* Makefile.in (BMAKE_VERSION): bump version to 20040105
3453	* Merge with NetBSD make, pick up:
3454	  o fix for cond.c to handle compound expressions better
3455	  o variable expansion within sysV style replacements
3456
34572003-12-22  Simon J. Gerraty  <sjg@void.crufty.net>
3458
3459	* Make portable snprintf safer - output to /dev/null first to
3460	check space needed.
3461
3462	* Makefile.in (BMAKE_VERSION): bump version to 20031222
3463	* Merge with NetBSD make, pick up:
3464	  o -dg3 to show input graph when things go wrong.
3465	  o explicitly look for makefiles in objdir if not found in curdir so
3466	    that errors in .depend etc will be reported accurarely.
3467	  o avoid use of -e in shell scripts in jobs mode, use '|| exit $?'
3468	    instead as it more accurately reflects the expected behavior and
3469	    is more consistently implemented.
3470	  o avoid use of asprintf.
3471
34722003-09-28  Simon J. Gerraty  <sjg@void.crufty.net>
3473
3474	* util.c: Add asprintf and vasprintf.
3475
3476	* Makefile.in (BMAKE_VERSION): bump version to 20030928
3477	* Merge with NetBSD make, pick up:
3478	:[] modifier - allows picking words from a variable.
3479	:tW modifier - allows treating value as one big word.
3480	W flag for :C and :S - allows treating value as one big word.
3481
34822003-09-12  Simon J. Gerraty  <sjg@void.crufty.net>
3483
3484	* Merge with NetBSD make
3485	pick up -de flag to enable printing failed command.
3486	don't skip 1st two dir entries (normally . and ..) since
3487	coda does not have them.
3488
34892003-09-09  Simon J. Gerraty  <sjg@void.crufty.net>
3490
3491	* Makefile.in (BMAKE_VERSION): bump version to 20030909
3492	* Merge with NetBSD make, pick up:
3493	- changes for -V '${VAR}' to print fully expanded value
3494	  cf. -V VAR
3495	- CompatRunCommand now prints the command that failed.
3496	- several files got updated 3 clause Berkeley license.
3497
34982003-08-02  Simon J. Gerraty  <sjg@void.crufty.net>
3499
3500	* boot-strap: Allow setting configure args on command line.
3501
35022003-07-31  Simon J. Gerraty  <sjg@void.crufty.net>
3503
3504	* configure.in: add --with-defshell to allow sh or ksh
3505	to be selected as default shell.
3506
3507	* Makefile.in: bump version to 20030731
3508
3509	* Merge with NetBSD make
3510	Pick up .SHELL spec for ksh and associate man page changes.
3511	Also compat mode now uses the same shell specs.
3512
35132003-07-29  Simon J. Gerraty  <sjg@void.crufty.net>
3514
3515	* var.c (Var_Parse): ensure delim is initialized.
3516
3517	* unit-tests/Makefile.in: use single quotes to avoid problems from
3518	some shells.
3519
3520	* makefile.boot.in:
3521	Run the unit-tests as part of the bootstrap procedure.
3522
35232003-07-28  Simon J. Gerraty  <sjg@void.crufty.net>
3524
3525	* unit-tests/Makefile.in: always force complaints from
3526	${TEST_MAKE} to be from 'make'.
3527
3528	* configure.in: add check for 'diff -u'
3529	also fix some old autoconf'isms
3530
3531	* Makefile.in (BMAKE_VERSION): bump version to 20030728.
3532	if using GCC add -Wno-cast-qual to CFLAGS for var.o
3533
3534	* Merge with NetBSD make
3535	Pick up fix for :ts parsing error in some cases.
3536	Pick unit-tests.
3537
35382003-07-23  Simon J. Gerraty  <sjg@void.crufty.net>
3539
3540	* Makefile.in (BMAKE_VERSION): bump version to 20030723.
3541
3542	* var.c (Var_Parse): fix bug in :ts modifier, after const
3543	correctness fixes, must pass nstr to VarModify.
3544
35452003-07-14  Simon J. Gerraty  <sjg@void.crufty.net>
3546
3547	* Makefile.in: BMAKE_VERSION switch to a date based version.
3548	We'll generally use the date of last import from NetBSD.
3549
3550	* Merge with NetBSD make
3551	Pick up fixes for const-correctness, now passes WARNS=3 on
3552	NetBSD.
3553	Pick up :ts modifier, allows controlling the separator used
3554	between words in variable expansion.
3555
35562003-07-11  Simon J. Gerraty  <sjg@void.crufty.net>
3557
3558	* FILES: include boot-strap and os.sh
3559
3560	* Makefile.in: only set WARNS if we are NetBSD, the effect on
3561	FreeBSD is known to be bad.
3562
3563	* makefile.boot.in (bootstrap): make this the default target.
3564
3565	* Makefile.in: bump version to 3.1.19
3566
3567	* machine.sh: avoid A-Z with tr as it is bound to lose.
3568
35692003-07-10  Simon J. Gerraty  <sjg@void.crufty.net>
3570
3571	* Merge with NetBSD make
3572	Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo
3573	Plus some doc fixes.
3574
35752003-04-27  Simon J. Gerraty  <sjg@void.crufty.net>
3576
3577	* Merge with NetBSD make
3578	Pick up fix for PR/1523 - don't count a library as built, if there
3579	is no way to build it
3580
3581	* Bump version to 3.1.18
3582
35832003-03-23  Simon J. Gerraty  <sjg@void.crufty.net>
3584
3585	* Merge with NetBSD make
3586	Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT
3587	appears in src list.
3588
35892003-03-21  Simon J. Gerraty  <sjg@void.crufty.net>
3590
3591	* Merge with NetBSD make (mmm 10th anniversary!)
3592	pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828)
3593	pick up -X which tells us to not export VAR=val via setenv if
3594	we are already doing so via MAKEFLAGS.  This saves valuable env
3595	space on systems like Darwin.
3596	set MAKE_VERSION to 3.1.17
3597
3598	* parse.c: pix up fix for suffix rules
3599
36002003-03-06  Simon J. Gerraty  <sjg@void.crufty.net>
3601
3602	* Merge with NetBSD make.
3603	pick up fix for propagating -B via MAKEFLAGS.
3604	set MAKE_VERSION to 3.1.16
3605
3606	* Apply some patches from pkgsrc-bootstrap/bmake
3607	Originally by Grant Beattie <grant@netbsd.org>
3608	I may have missed some - since they are based on bmake-3.1.12
3609
36102002-12-03  Simon J. Gerraty  <sjg@void.crufty.net>
3611
3612	* makefile.boot.in (bmake): update install targets for those that
3613	use them, also clear MAKEFLAGS when invoking bmake.boot to avoid
3614	havoc from gmake -w.  Thanks to Harlan Stenn <hstenn@cisco.com>.
3615
3616	* bmake.cat1: update the pre-formatted man page!
3617
36182002-11-30  Simon J. Gerraty  <sjg@void.crufty.net>
3619
3620	* Merge with NetBSD make.
3621	pick up fix for premature free of pointer used in call
3622	to Dir_InitCur().
3623	set MAKE_VERSION to 3.1.15
3624
36252002-11-26  Simon J. Gerraty  <sjg@void.crufty.net>
3626
3627	* configure.in: determine suitable value for MKSRC.
3628	override using --with-mksrc=PATH.
3629
3630	* machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems.
3631	configs(8) will use 'sun4' as an alias for 'sparc'.
3632
36332002-11-25  Simon J. Gerraty  <sjg@void.crufty.net>
3634
3635	* Merge with NetBSD make.
3636	pick up ${.PATH}
3637	pick up fix for finding ../cat.c via .PATH when .CURDIR=..
3638	set MAKE_VERSION to 3.1.14
3639	add configure checks for killpg and sys/socket.h
3640
36412002-09-16  Simon J. Gerraty  <sjg@void.crufty.net>
3642
3643	* tag bmake-3-1-13
3644
3645	* makefile.boot.in (bmake): use install-mk
3646	Also setup ./mk before trying to invoke bmake.boot incase we
3647	needed install-mk to create a sys.mk for us.
3648
3649	* configure.in: If we need to add -I${srcdir}/missing, make it an
3650	absolute path so that it works for lst.lib too.
3651
3652	* make.h: always include sys/cdefs.h since we provide one if the
3653	host does not.
3654
3655	* Makefile.in (install-mk):
3656	use MKSRC/install-mk which will do the right thing.
3657	use uname -p for ARCH if possible.
3658	since install-mk will setup links bsd.prog.mk -> prog.mk if
3659	needed, just .include bsd.prog.mk
3660
3661	* Merge with NetBSD make (NetBSD-1.6)
3662	Code is ansi-C only now.
3663	Bug in handling of dotLast is fixed.
3664	Can now assign .OBJDIR and make will reset its notions of life.
3665	New modifiers :tu :tl for toUpper and toLower.
3666
3667Tue Oct 16 12:18:42 2001  Simon J. Gerraty  <sjg@zen.crufty.net>
3668
3669	* Merge with NetBSD make
3670	pick up fix for .END failure in compat mode.
3671	pick up fix for extra va_end() in ParseVErrorInternal.
3672
3673Thu Oct 11 13:20:06 2001  Simon J. Gerraty  <sjg@zen.crufty.net>
3674
3675	* configure.in: for systems that have sys/cdefs.h check if it is
3676	compatible.  If not, include the one under missing, but tell it to
3677	include the native one too - necessary on Linux.
3678
3679	* missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use
3680	include_next (for gcc) to get the native sys/cdefs.h
3681
3682Tue Aug 21 02:29:34 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3683
3684	* job.c (JobFinish): Fix an earlier merge bug that resulted in
3685	leaking descriptors when using -jN.
3686
3687	* job.c (JobPrintCommand): See if "curdir" exists before
3688	attempting to chdir().  Doing the chdir directly in make (when in
3689	compat mode) fails silently, so let the -jN version do the same.
3690	This can happen when building kernels in an object tree and
3691	playing clever games to reset .CURDIR.
3692
3693	* Merged with NetBSD make
3694	pick up .USEBEFORE
3695
3696Tue Jun 26 23:45:11 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3697
3698	* makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work.
3699
3700Tue Jun 12 16:48:57 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3701
3702	* var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell
3703	us not to export the iterator variable when using VAR_CMD context.
3704
3705Sun Jun 10 21:55:21 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3706
3707	* job.c (Job_CatchChildren): don't call Job_CatchOutput() here,
3708	its the wrong "fix".
3709
3710Sat Jun  9 00:11:24 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3711
3712	* Redesigned export of VAR_CMD's via MAKEFLAGS.
3713	We now simply append the variable names to .MAKEOVERRIDES, and
3714	handle duplicate suppression and quoting in ExportMAKEFLAGS using:
3715	${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@}
3716	Apart from fixing quoting bugs in previous version, this allows us
3717	to export vars to the environment by simply doing:
3718	.MAKEOVERRIDES+= PATH
3719	Merged again with NetBSD make, but the above is the only change.
3720
3721	* configure.in: added
3722	--disable-pwd-override		disable $PWD overriding getcwd()
3723	--disable-check-make-chdir	disable make trying to guess
3724		when it should automatically cd ${.CURDIR}
3725
3726	* Merge with NetBSD make, changes include:
3727	parse.c (ParseDoDependency): Spot that the syntax error is
3728	caused by an unresolved cvs/rcs conflict and say so.
3729	var.c: most of Var* functions now take a ctxt as 1st arg.
3730	now does variable substituion on rhs of sysv style modifiers.
3731
3732	* var.c (Var_Set): exporting of command line variables (VAR_CMD)
3733	is now done here.  We append the name='value' to .MAKEOVERRIDES
3734	rather than directly into MAKEFLAGS as this allows a Makefile to
3735	use .MAKEOVERRIDES= to disable this behaviour.  GNU make uses a
3736	very similar mechanism.  Note that in adding name='value' to
3737	.MAKEOVERRIDES we do the moral equivalent of:
3738	.MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val'
3739
3740Fri Jun  1 14:08:02 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3741
3742	* make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H
3743
3744	* Merged with NetBSD make
3745	make -dx can now be used to run commands via sh -x
3746	better error messages on exec failures.
3747
3748Thu May 31 01:44:54 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3749
3750	* Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that
3751	MAKE_VERSION gets updated.  Also don't use ?= for MAKE_VERSION,
3752	MACHINE etc otherwise they propagate from the previous bmake.
3753
3754	* configure.in (machine): allow --with-machine=generic to make
3755	configure use machine.sh to set MACHINE.
3756
3757	* job.c (JobInterrupt): convert to using WAIT_T and friends.
3758
3759	* Makefile.in: mention in bmake.1 that we use autoconf.
3760
3761	* make.1: mention MAKE_PRINT_VAR_ON_ERROR.
3762
3763Wed May 30 23:17:18 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3764
3765	* main.c (ReadMakefile): don't set MAKEFILE if reading ".depend"
3766	as that rather defeats the usefulness of ${MAKEFILE}.
3767
3768	* main.c (MainParseArgs): append command line variable assignments
3769	to MAKEFLAGS so that they get propagated to child make's.
3770	Apparently this is required POSIX behaviour?  Its useful anyway.
3771
3772Tue May 29 02:20:07 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3773
3774	* compat.c (CompatRunCommand): don't use perror() since stdio may
3775	cause problems in child of vfork().
3776
3777	* compat.c, main.c: Call PrintOnError() when we are going to bail.
3778	This routine prints out the .curdir where we stopped and will also
3779	display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}.
3780
3781	* main.c: add ${.newline} to hold a "\n" - sometimes handy in
3782	:@ expansion.
3783
3784	* var.c: VarLoopExpand: ignore addSpace if a \n is present.
3785
3786	* Added RCSid's for the files we've touched.
3787
3788Thu May 24 15:41:37 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3789
3790	* configure.in:	Thanks to some clues from mdb@juniper.net,
3791	added autoconf magic to control setting of MACHINE, MACHINE_ARCH
3792	as well as what ends up in _PATH_DEFSYSPATH.  We now have:
3793
3794  --with-machine=MACHINE  explicitly set MACHINE
3795  --with-force-machine=MACHINE  set FORCE_MACHINE
3796  --with-machine_arch=MACHINE_ARCH  explicitly set MACHINE_ARCH
3797  --with-default-sys-path=PATH:DIR:LIST  use an explicit _PATH_DEFSYSPATH
3798  --with-prefix-sys-path=PATH:DIR:LIST  prefix _PATH_PREFIX_SYSPATH
3799  --with-path-objdirprefix=PATH  override _PATH_OBJDIRPREFIX
3800
3801	If _PATH_OBJDIRPREFIX is set to "no" we won't define it.
3802
3803	* makefile: added a pathetically simple makefile to drive
3804	bootstrapping.  Running configure by hand is more useful.
3805
3806	* Makefile.in: added MAKE_VERSION, and reworked things to be less
3807	dependent on NetBSD bsd.*.mk
3808
3809	* pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining
3810	_PATH_OBJDIRPREFIX for those that don't want a default.
3811	construct _PATH_DEFSYSPATH from the info we get from configure.
3812
3813	* main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION}
3814	if MAKE_VERSION is defined.
3815
3816	* compat.c: when we bail, print out the .CURDIR we were in.
3817
3818Sat May 12 00:34:12 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3819
3820	* Merged with NetBSD make
3821
3822	* var.c: fixed a bug in the handling of the modifier :P
3823	if the node as found but the path was null, we segfault trying to
3824	duplicate it.
3825
3826Mon Mar  5 16:20:33 2001  Simon J. Gerraty  <sjg@zen.quick.com.au>
3827
3828	* Merged with NetBSD make
3829
3830	* make.c: Make_OODate's test for a library out of date was using
3831	cmtime where it should have used mtime (my bug).
3832
3833	* compat.c: Use perror() to tell us what really went wrong when we
3834	cannot exec a command.
3835
3836Fri Dec 15 10:11:08  2000  Simon J. Gerraty  <sjg@zen.quick.com.au>
3837
3838	* Merged with NetBSD make
3839
3840Sat Jun 10 10:11:08  2000  Simon J. Gerraty  <sjg@zen.quick.com.au>
3841
3842	* Merged with NetBSD make
3843
3844Thu Jun  1 10:11:08  2000  Simon J. Gerraty  <sjg@zen.quick.com.au>
3845
3846	* Merged with NetBSD make
3847
3848Tue May 30 10:11:08  2000  Simon J. Gerraty  <sjg@zen.quick.com.au>
3849
3850	* Merged with NetBSD make
3851
3852Thu Apr 27 00:07:47 2000  Simon J. Gerraty  <sjg@zen.quick.com.au>
3853
3854	* util.c: don't provide signal() since we use sigcompat.c
3855
3856	* Makefile.in: added a build target.
3857
3858	* var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :!
3859	These allow some quite clever magic.
3860
3861	* main.c (main): added support for getenv(MAKESYSPATH).
3862
3863Mon Apr  2 16:25:13 2000  Simon J. Gerraty  <sjg@zen.quick.com.au>
3864
3865	* Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set.
3866	This avoids objdir having a different value depending on how a
3867	directory was reached (via command line, or subdir.mk).
3868
3869	* If FORCE_MACHINE is defined, ignore getenv("MACHINE").
3870
3871Mon Apr  2 23:15:31 2000  Simon J. Gerraty  <sjg@zen.quick.com.au>
3872
3873	* Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if
3874	MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not.
3875	I've been testing this in NetBSD's make for some weeks.
3876
3877	* Turn Makefile into Makefile.in and make it useful.
3878
3879Tue Feb 29 22:08:00 2000 Simon J. Gerraty  <sjg@zen.quick.com.au>
3880
3881	* Imported NetBSD's -current make(1) and resolve conflicts.
3882
3883	* Applied autoconf patches from bmake v2
3884
3885	* Imported clean code base from NetBSD-1.0
3886