The NetBSD Project

CVS log for src/usr.bin/make/targ.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.180 / (download) - annotate - [select for diffs], Sun Mar 10 02:53:37 2024 UTC (2 weeks, 5 days ago) by sjg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.179: +3 -2 lines
Diff to previous 1.179 (colored) to selected 1.164 (colored)

make: record exit status in GNode

SetErrorVars can now set .ERROR_EXIT which allows
a .ERROR target to ignore the case of .ERROR_EXIT == 6
which means failure happened elsewhere.

Reviewed by:

Revision 1.179 / (download) - annotate - [select for diffs], Tue Dec 6 00:12:44 2022 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.178: +13 -13 lines
Diff to previous 1.178 (colored) to selected 1.164 (colored)

make: clean up comments

No binary change.

Revision 1.178 / (download) - annotate - [select for diffs], Tue Sep 27 17:46:58 2022 UTC (18 months ago) by rillig
Branch: MAIN
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored) to selected 1.164 (colored)

make: set WARNS to 6, from the default 5

No binary change on x86_64.

Revision 1.177 / (download) - annotate - [select for diffs], Fri Apr 15 12:19:28 2022 UTC (23 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.176: +3 -2 lines
Diff to previous 1.176 (colored) to selected 1.164 (colored)

make: add .USEBEFORE to Targ_PrintType

When .USEBEFORE was added in targ.c 1.22 from 2001-07-03, it was not
added to Targ_PrintType, probably because the PRINTBIT macro hid the
identifier OP_USE and only used USE.

Revision 1.176 / (download) - annotate - [select for diffs], Fri Jan 7 20:50:35 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.175: +3 -16 lines
Diff to previous 1.175 (colored) to selected 1.164 (colored)

make: merge duplicate variables for the main target

No functional change.

Revision 1.175 / (download) - annotate - [select for diffs], Fri Jan 7 20:37:25 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.174: +5 -9 lines
Diff to previous 1.174 (colored) to selected 1.164 (colored)

make: clean up comments, variable names, function names

The comment in ApplyDependencySourceOther repeated the code, its second
half didn't match any current code.

The comment above ParseDependencySourcesEmpty repeated the code.

No binary change, except for assertion line numbers.

Revision 1.174 / (download) - annotate - [select for diffs], Fri Jan 7 19:24:27 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.173: +2 -13 lines
Diff to previous 1.173 (colored) to selected 1.164 (colored)

make: rename and inline Targ_Precious

No functional change.

Revision 1.173 / (download) - annotate - [select for diffs], Sun Nov 28 19:51:06 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.172: +19 -5 lines
Diff to previous 1.172 (colored) to selected 1.164 (colored)

make: convert GNodeFlags from enum into bit-fields

Now that Enum_ToString is implemented for each type separately, it's
easy to convert them to bit-fields.  This gets rid of the magic numbers
12 for CYCLE and 13 for DONECYCLE that left a suspicious gap in the
numbers.  This gap was not needed since the code didn't make use of the
relative ordering of the enum constants.

The effects of this conversion are fewer capital letters in the code,
smaller scope for the GNode flags, and clearer code especially when
setting a flag back to false.

One strange thing is that GCC 10.3.0 doesn't optimize GNodeFlags_IsNone
to an single bitmasking instruction, at least on x86_64.  Instead it
generates a testb instruction for each of the flags, even loading bit 8
separately from the others.  Clang 12.0.1 knows this optimization
though and generates the obvious sequence of movzwl, testl, jz.

No functional change.

Revision 1.172 / (download) - annotate - [select for diffs], Sun Sep 12 08:32:23 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored) to selected 1.164 (colored)

make: reduce number of relocations in Targ_PrintType

On x86_64, this saves 120 bytes of .text.

No functional change.

Revision 1.171 / (download) - annotate - [select for diffs], Sun Sep 12 08:03:48 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.170: +3 -3 lines
Diff to previous 1.170 (colored) to selected 1.164 (colored)

make: fix lint warnings for strict bool mode

In strict bool mode, lint does not consider 'x & y' as having type bool,
if x and y have integer type, it only allows this for enums.

No functional change.

Revision 1.170 / (download) - annotate - [select for diffs], Sun Sep 12 07:52:21 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.169: +4 -3 lines
Diff to previous 1.169 (colored) to selected 1.164 (colored)

make: fix Targ_PrintType for pre-C99 compilers

Revision 1.169 / (download) - annotate - [select for diffs], Sun Sep 12 07:50:45 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.168: +30 -30 lines
Diff to previous 1.168 (colored) to selected 1.164 (colored)

make: make Targ_PrintType simpler

No functional change.

Revision 1.168 / (download) - annotate - [select for diffs], Sat Apr 3 12:01:00 2021 UTC (2 years, 11 months ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored) to selected 1.164 (colored)

make: use standard %H in strftime instead of %k

The conversion specifier %k is neither in C99 nor in C90.

These timestamps are only used in the debug output.

Revision 1.167 / (download) - annotate - [select for diffs], Sat Apr 3 11:08:40 2021 UTC (2 years, 11 months ago) by rillig
Branch: MAIN
Changes since 1.166: +5 -5 lines
Diff to previous 1.166 (colored) to selected 1.164 (colored)

make: use C99 bool type instead of defining its own

No functional change.

Revision 1.166 / (download) - annotate - [select for diffs], Mon Feb 22 20:38:55 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.165: +3 -3 lines
Diff to previous 1.165 (colored) to selected 1.164 (colored)

make: update constant names in comments

No functional change.

Revision 1.165 / (download) - annotate - [select for diffs], Thu Feb 4 21:42:46 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (colored)

make: rename context and ctxt to scope

This continues the previous commit, in which VAR_GLOBAL, VAR_INTERNAL
and VAR_CMDLINE were renamed.

Renaming the variable 'ctxt' was trivial since that word is used nowhere
else.  In the comments though, each occurrence of the word 'context' had
to be checked individually since the word 'context' was not only used
for referring to a variable scope.  It is also used to distinguish
different situations where characters are escaped in a certain way
('parsing context') and in a few other expressions.

Revision 1.164 / (download) - annotate - [selected], Thu Feb 4 21:33:14 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.163: +9 -9 lines
Diff to previous 1.163 (colored)

make: rename some VAR constants to SCOPE

The word "context" does not fit perfectly to the variables that are
associate with a GNode, as the context is usually something from the
outside and the variables are more like properties inherent to the
GNode.

The term "global context" fits even less.  Since the thing where
variables are looked up is commonly named a scope, use that term
instead.

This commit only renames the global variables VAR_GLOBAL, VAR_INTERNAL
and VAR_CMDLINE, plus a few very closely related comments.  These are:

	GNode.vars (because of line breaks)
	GNode_Free (dito)
	varname-make_print_var_on_error.mk
	varname-make_print_var_on_error-jobs.mk

The debug message in Var_Stats is left as-is since there is no unit test
for it yet.

The other renamings (variable names "context", "ctxt", as well as
further comments) will be done in a follow-up commit.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Feb 3 13:53:12 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored) to selected 1.164 (colored)

make: replace Global_AppendExpand with Global_Append

All callers with a variable name that is guaranteed to not contain a
dollar sign have been converted to call Global_Append instead of the
previous Global_AppendExpand.  After that, Global_AppendExpand was
unused, therefore it was effectively just renamed.

Revision 1.162 / (download) - annotate - [select for diffs], Wed Feb 3 08:00:36 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored) to selected 1.164 (colored)

make: use shortcut functions Global_SetExpand and Global_AppendExpand

There are many places where global variables are set or appended to.  To
reduce clutter and code size, encode the VAR_GLOBAL in the function
name.

The word Expand in the function names says that the variable name is
expanded.  In most of the cases, this is not necessary, but there are no
corresponding functions Global_Set or Global_Append yet.

Encoding the information whether the name is expanded or not in the
function name will make inconsistencies obvious in future manual code
reviews. Letting the compiler check this by using different types for
unexpanded and expanded variable names is probably not worth the effort.
There are still a few bugs to be fixed, such as in SetVar, which expands
the variable name twice in a row.

Revision 1.161 / (download) - annotate - [select for diffs], Tue Feb 2 17:56:31 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.160: +6 -6 lines
Diff to previous 1.160 (colored) to selected 1.164 (colored)

make: remove overengineered Enum_ValueToString

For printing the status of a GNode, there was already made_name (now
renamed to GNodeMade_Name), which prints user-friendly text instead of
the bare enum constant names.

To do this change confidently, I first had to demonstrate that the
output really affects something other than just the word "UNMADE". There
had not been a test for that case before, and the test immediately
discovered a bug in the -dg2 and -dg3 options.  This bug is one of the
oldest in make, dating back to at least 1993.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Jan 10 23:59:53 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.159: +3 -3 lines
Diff to previous 1.159 (colored) to selected 1.164 (colored)

make(1): make a few more bool expressions more precise

The previous version of lint(1) from a few hours ago didn't catch all
occurrences.  And even the current one doesn't catch everything.
Function arguments and return types still need some work.  The "return
quietly" from shouldDieQuietly still implicitly converts from int to
_Bool.

No functional change.

Revision 1.159 / (download) - annotate - [select for diffs], Fri Dec 18 15:47:34 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored) to selected 1.164 (colored)

make(1): spell nonexistent consistently

Revision 1.158 / (download) - annotate - [select for diffs], Fri Dec 18 14:46:44 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.157: +5 -7 lines
Diff to previous 1.157 (colored) to selected 1.164 (colored)

make(1): use symbolic time for 0 in Make_Recheck

This makes the test depsrc-optional independent from the current time
zone.

Revision 1.157 / (download) - annotate - [select for diffs], Fri Dec 18 14:36:46 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.156: +3 -3 lines
Diff to previous 1.156 (colored) to selected 1.164 (colored)

make(1): constify Targ_FmtTime

Revision 1.156 / (download) - annotate - [select for diffs], Tue Dec 15 21:19:47 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.155: +4 -3 lines
Diff to previous 1.155 (colored) to selected 1.164 (colored)

make(1): format function definitions consistently

Revision 1.155 / (download) - annotate - [select for diffs], Sat Dec 12 00:05:05 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.154: +2 -25 lines
Diff to previous 1.154 (colored) to selected 1.164 (colored)

make(1): inline Targ_Ignore and Targ_Silent

Each of these functions was only used 2 times, and each of these calls
used a different part of the whole expression.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Dec 7 23:59:59 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.153: +3 -3 lines
Diff to previous 1.153 (colored) to selected 1.164 (colored)

make(1): clean up debug logging

Revision 1.153 / (download) - annotate - [select for diffs], Sun Dec 6 10:49:02 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored) to selected 1.164 (colored)

make(1): inline macros for debug logging

No changes to the resulting binary, except for the line numbers in
assertions.

Revision 1.152 / (download) - annotate - [select for diffs], Sat Dec 5 18:38:02 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.151: +4 -4 lines
Diff to previous 1.151 (colored) to selected 1.164 (colored)

make(1): define constants for enum zero-values

Revision 1.151 / (download) - annotate - [select for diffs], Sat Dec 5 15:57:02 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.150: +21 -21 lines
Diff to previous 1.150 (colored) to selected 1.164 (colored)

make(1): don't concatenate identifiers in Targ_PrintType

Concatenating identifiers makes it difficult to spot them when searching
the code.  This gets rid of the special case for OP_MEMBER and MEMBER.

The same pattern is applied in the DEBUG macro, by the way.

Revision 1.150 / (download) - annotate - [select for diffs], Sat Dec 5 15:35:34 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.149: +274 -236 lines
Diff to previous 1.149 (colored) to selected 1.164 (colored)

make(1): indent targ.c with tabs instead of spaces

Explain the tricky details of GNode_Free.

Invert a condition in Targ_PrintNode to reduce the overall indentation.

Revision 1.149 / (download) - annotate - [select for diffs], Fri Dec 4 14:39:56 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.148: +13 -9 lines
Diff to previous 1.148 (colored) to selected 1.164 (colored)

make(1): use consistent variable names for list nodes

Revision 1.148 / (download) - annotate - [select for diffs], Sun Nov 29 01:05:08 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.147: +13 -17 lines
Diff to previous 1.147 (colored) to selected 1.164 (colored)

make(1): reduce memory allocation for target handling

Revision 1.147 / (download) - annotate - [select for diffs], Sun Nov 29 00:04:22 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.146: +4 -6 lines
Diff to previous 1.146 (colored) to selected 1.164 (colored)

make(1): reduce memory allocation for targets

This change moves the initialization and finalization of the list of
targets to the same function.  They had been split before.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Nov 28 19:22:32 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.145: +5 -5 lines
Diff to previous 1.145 (colored) to selected 1.164 (colored)

make(1): reduce pointer indirection for GNode.implicitParents

Revision 1.145 / (download) - annotate - [select for diffs], Sat Nov 28 19:20:04 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.144: +6 -6 lines
Diff to previous 1.144 (colored) to selected 1.164 (colored)

make(1): reduce pointer indirection for GNode.cohorts

Revision 1.144 / (download) - annotate - [select for diffs], Sat Nov 28 19:16:53 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.143: +8 -8 lines
Diff to previous 1.143 (colored) to selected 1.164 (colored)

make(1): reduce pointer indirection for GNode.order_pred and order_succ

Revision 1.143 / (download) - annotate - [select for diffs], Sat Nov 28 19:12:28 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.142: +8 -8 lines
Diff to previous 1.142 (colored) to selected 1.164 (colored)

make(1): reduce memory allocation for GNode.parents and GNode.children

Revision 1.142 / (download) - annotate - [select for diffs], Sat Nov 28 18:55:52 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.141: +5 -5 lines
Diff to previous 1.141 (colored) to selected 1.164 (colored)

make(1): remove pointer indirection from GNode.commands

Just to save a few memory allocations.  No noticeable effect on the
performance though.

Revision 1.141 / (download) - annotate - [select for diffs], Mon Nov 23 23:41:11 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored) to selected 1.164 (colored)

make(1): use comparisons in boolean expressions

The generated code stays exactly the same.

Revision 1.140 / (download) - annotate - [select for diffs], Sun Nov 22 20:01:46 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.139: +4 -2 lines
Diff to previous 1.139 (colored) to selected 1.164 (colored)

make(1): add remark to add a "reasonable way" to format time_t 0

Revision 1.139 / (download) - annotate - [select for diffs], Sat Nov 21 18:41:57 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.138: +4 -4 lines
Diff to previous 1.138 (colored) to selected 1.164 (colored)

make(1): rename GNode.context to vars

Especially in the variables module, the expression 'ctxt->context' looked
redundant.  Having a GNode as a context sounds ok, but a context of a
context just doesn't make sense.

Revision 1.138 / (download) - annotate - [select for diffs], Sat Nov 21 11:59:22 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.137: +3 -2 lines
Diff to previous 1.137 (colored) to selected 1.164 (colored)

make(1): add more debug logging for suffix handling

One notable thing is that there is no debug output when adding a
transformation rule like ".c.o",  which means that these rules don't end
up in the global allTargets variable.

This may or may not be intentional.  It seems not intentional since this
is one of the causes for the suff-rebuild test to behave unexpectedly.

Revision 1.137 / (download) - annotate - [select for diffs], Sat Nov 21 10:56:17 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.136: +5 -5 lines
Diff to previous 1.136 (colored) to selected 1.164 (colored)

make(1): improve comment style in GNode_Free

It was unclear what the ellipsis referred to.  It was meant to refer to
the function call Lst_Free, but that was not necessarily obvious to a
casual reader.

Revision 1.136 / (download) - annotate - [select for diffs], Sat Nov 21 10:50:39 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.135: +6 -3 lines
Diff to previous 1.135 (colored) to selected 1.164 (colored)

make(1): fix comment for allTargets

Source nodes are also included in this list.  What's not includes is
nodes that are _only_ source nodes.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Nov 16 22:28:44 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.134: +13 -6 lines
Diff to previous 1.134 (colored) to selected 1.164 (colored)

make(1): clean up code style in targ.c

Revision 1.134 / (download) - annotate - [select for diffs], Mon Nov 16 22:27:03 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.133: +25 -20 lines
Diff to previous 1.133 (colored) to selected 1.164 (colored)

make(1): initialize and free GNode fields in declaration order

Initialization and destruction of the fields is independent from the
other fields.  Therefore use declaration order, which allows to quickly
see whether a field was forgotten.

While here, add comments that in cleanup mode, not all memory is freed.
The variables of a node and the suffix survive right now.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Nov 16 21:59:08 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.132: +14 -15 lines
Diff to previous 1.132 (colored) to selected 1.164 (colored)

make(1): rename variables in targ.c

The previous names didn't make it obvious that 'allTargets' and 'targets'
belong together.  Naming both 'allTargets' provides a stronger hint.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Nov 16 21:53:10 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.131: +38 -23 lines
Diff to previous 1.131 (colored) to selected 1.164 (colored)

make(1): clean up and extend comments in targ.c

Revision 1.131 / (download) - annotate - [select for diffs], Mon Nov 16 21:48:18 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.130: +6 -5 lines
Diff to previous 1.130 (colored) to selected 1.164 (colored)

make(1): make some GNode functions const

Revision 1.130 / (download) - annotate - [select for diffs], Mon Nov 16 21:44:29 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.129: +8 -7 lines
Diff to previous 1.129 (colored) to selected 1.164 (colored)

make(1): in CLEANUP mode, preallocate list of all GNodes

This makes the code simpler and more uniform.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Nov 16 21:41:02 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.128: +5 -5 lines
Diff to previous 1.128 (colored) to selected 1.164 (colored)

make(1): rename TargFreeGN to GNode_Free

This is the usual counterpart to a New function, like for Lst, HashTable,
Buffer.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Nov 16 21:39:22 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.127: +5 -5 lines
Diff to previous 1.127 (colored) to selected 1.164 (colored)

make(1): rename Targ_NewGN to GNode_New

This function is a classical constructor function, and if it weren't for
CLEANUP mode, it would have no dependencies on anything else besides the
memory allocator.  Therefore it doesn't really matter which module
defines this function, and there is no need for the "Targ" to be part of
the function name.

Revision 1.127 / (download) - annotate - [select for diffs], Thu Nov 5 17:27:16 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored) to selected 1.164 (colored)

make(1): remove redundant parentheses from sizeof operator

The parentheses are only needed if the argument is a type, not an
expression.

Revision 1.126 / (download) - annotate - [select for diffs], Fri Oct 30 07:19:30 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored) to selected 1.164 (colored)

make(1): rename VAR_CMD to VAR_CMDLINE

Since make has to do with both the command line and child commands, the
former name was confusing.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Oct 26 21:34:10 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.124: +5 -5 lines
Diff to previous 1.124 (colored) to selected 1.164 (colored)

make(1): group the command line options and arguments

By having a single struct that holds all command line options and
arguments, it is easy to see in the code when such a command line
argument is modified.  It also cleans up the namespace since the command
line options don't follow a common naming style.  Having them in a
struct also means that there is a single place for putting the
documentation, not two as before.

The struct also suggests to extract the initialization code out of main,
which is still too large, having more than 400 lines of code and
covering far too many topics.

Revision 1.124 / (download) - annotate - [select for diffs], Sun Oct 25 21:51:49 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.123: +3 -4 lines
Diff to previous 1.123 (colored) to selected 1.164 (colored)

make(1): add GNode_Path to access the path of a GNode

Revision 1.123 / (download) - annotate - [select for diffs], Sun Oct 25 19:19:07 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.122: +11 -11 lines
Diff to previous 1.122 (colored) to selected 1.164 (colored)

make(1): rename hash functions to identify the type name

This makes it easier to spot mismatches between the function name and
its first parameter, although the compiler should already catch most of
them.  Except for void pointers.

Revision 1.122 / (download) - annotate - [select for diffs], Fri Oct 23 19:48:17 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored) to selected 1.164 (colored)

make(1): rename GNode.cmgn to youngestChild

The name is longer than before but also clearer.

Revision 1.121 / (download) - annotate - [select for diffs], Fri Oct 23 18:36:10 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.120: +4 -4 lines
Diff to previous 1.120 (colored) to selected 1.164 (colored)

make(1): negate OP_NOP and rename it to GNode_IsTarget

Revision 1.120 / (download) - annotate - [select for diffs], Thu Oct 22 05:50:02 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored) to selected 1.164 (colored)

make(1): remove redundant type casts

This mainly affects the void pointers in callback functions for lists.
These had been necessary once when the parameter type was still
ClientData instead of void pointer.

Revision 1.119 / (download) - annotate - [select for diffs], Mon Oct 19 23:43:55 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored) to selected 1.164 (colored)

make(1): clean up headers, no functional change

Revision 1.118 / (download) - annotate - [select for diffs], Mon Oct 19 21:17:35 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.117: +5 -5 lines
Diff to previous 1.117 (colored) to selected 1.164 (colored)

make(1): remove void pointers from suffix debug printing

Revision 1.117 / (download) - annotate - [select for diffs], Mon Oct 19 19:34:18 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.116: +10 -9 lines
Diff to previous 1.116 (colored) to selected 1.164 (colored)

make(1): fix variable names in Targ_Propagate

List nodes are called ln, not pn or cn.

While here, extract a common subexpression to save a few instructions.
The compiler cannot know that gn->type will not change during the whole
loop.  For this, it would have to know that a GNode cannot have itself
as a cohort, and this is not expressed anywhere in the code.

Revision 1.116 / (download) - annotate - [select for diffs], Sun Oct 18 13:02:10 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.115: +12 -12 lines
Diff to previous 1.115 (colored) to selected 1.164 (colored)

make(1): rename Lst_Init to Lst_New

For the other types such as HashTable and Buffer, the Init function does
not allocate the memory for the structure itself, it only fills it.

Revision 1.115 / (download) - annotate - [select for diffs], Sun Oct 18 12:36:43 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.114: +4 -4 lines
Diff to previous 1.114 (colored) to selected 1.164 (colored)

make(1): remove underscore from Hash_Table and Hash_Entry

For consistency with the other type names, such as GNodeListNode.

Revision 1.114 / (download) - annotate - [select for diffs], Sun Oct 18 08:24:01 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.113: +17 -11 lines
Diff to previous 1.113 (colored) to selected 1.164 (colored)

make(1): extract GNode_OpName from Targ_PrintNode

Revision 1.113 / (download) - annotate - [select for diffs], Sat Oct 17 21:32:30 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.112: +3 -3 lines
Diff to previous 1.112 (colored) to selected 1.164 (colored)

make(1): normalize initialization and cleanup of the modules

Revision 1.112 / (download) - annotate - [select for diffs], Mon Oct 5 22:15:45 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored) to selected 1.164 (colored)

make(1): enable format string truncation warnings for parse.c

No node is ever going to have a million or more cohorts.  And even if
there were, this name is only used for printing informational messages.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Oct 5 19:27:47 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.110: +5 -6 lines
Diff to previous 1.110 (colored) to selected 1.164 (colored)

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.

Revision 1.110 / (download) - annotate - [select for diffs], Mon Oct 5 19:24:29 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.109: +4 -3 lines
Diff to previous 1.109 (colored) to selected 1.164 (colored)

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25.  In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath.  Dir_ClearPath takes full ownership of the given list and
empties it.  This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table.  This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes.  This by itself
was not a problem since the hash table would be freed afterwards.  But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again.  Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Oct 3 21:52:50 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.108: +5 -6 lines
Diff to previous 1.108 (colored) to selected 1.164 (colored)

make(1): clean up #include sections

Revision 1.108 / (download) - annotate - [select for diffs], Mon Sep 28 23:31:18 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.107: +5 -10 lines
Diff to previous 1.107 (colored) to selected 1.164 (colored)

make(1): replace Lst_Open with direct iteration

Revision 1.107 / (download) - annotate - [select for diffs], Mon Sep 28 22:23:35 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.106: +33 -33 lines
Diff to previous 1.106 (colored) to selected 1.164 (colored)

make(1): make debug logging simpler

This avoids referring to the debug_file variable in many places where
this implementation detail is not necessary.

Revision 1.106 / (download) - annotate - [select for diffs], Sun Sep 27 21:35:16 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.105: +46 -45 lines
Diff to previous 1.105 (colored) to selected 1.164 (colored)

make(1): normalize whitespace in source code

There is no more space tab.  Either only tabs or only spaces or tabs
followed by spaces, but not spaces followed by tabs.

Revision 1.105 / (download) - annotate - [select for diffs], Sun Sep 27 12:10:51 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.104: +6 -12 lines
Diff to previous 1.104 (colored) to selected 1.164 (colored)

make(1): inline PrintNode

Having a separate function had only been necessary for Lst_ForEachUntil.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Sep 27 11:53:03 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.103: +10 -12 lines
Diff to previous 1.103 (colored) to selected 1.164 (colored)

make(1): inline Lst_ForEachUntil in Targ_PrintNodes

Printing a node does not modify the structure of the node, therefore the
additional housekeeping of Lst_ForEachUntil is not needed here.

Inlining the callback function also removes a lot of pointer stuff that
is more difficult to read than necessary.

Revision 1.103 / (download) - annotate - [select for diffs], Sun Sep 27 01:07:12 2020 UTC (3 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.102: +3 -4 lines
Diff to previous 1.102 (colored) to selected 1.164 (colored)

fix usr.bin/make build (which uses more warnings):

remove static only prototype TargPrintOnlySrc().
PrintOnlySources() does not return a value, make it void.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Sep 26 17:39:45 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.101: +9 -7 lines
Diff to previous 1.101 (colored) to selected 1.164 (colored)

make(1): revert migration from Lst_ForEachUntil to Lst_ForEach

There is a crucial difference between these functions, in that
Lst_ForEachUntil can cope with a few concurrent modifications while
iterating over the list.  This is something that Lst_ForEach doesn't do.

This difference led to a crash very early in NetBSD's build.sh.

Revision 1.101 / (download) - annotate - [select for diffs], Sat Sep 26 17:15:20 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.100: +10 -10 lines
Diff to previous 1.100 (colored) to selected 1.164 (colored)

make(1): inline and remove LstNode_Prev and LstNode_Next

These functions made the code larger than necessary.  The prev and next
fields are published intentionally since navigating in a doubly-linked
list is simple to do and there is no need to wrap this in a layer of
function calls, not even syntactically.  (On the execution level, the
function calls had been inlined anyway.)

Revision 1.100 / (download) - annotate - [select for diffs], Sat Sep 26 17:02:11 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.99: +17 -14 lines
Diff to previous 1.99 (colored) to selected 1.164 (colored)

make(1): inline Lst_ForEach in Targ_PrintGraph

Revision 1.99 / (download) - annotate - [select for diffs], Sat Sep 26 16:55:58 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.98: +10 -14 lines
Diff to previous 1.98 (colored) to selected 1.164 (colored)

make(1): replace a few Lst_ForEachUntil with simpler Lst_ForEach

Revision 1.98 / (download) - annotate - [select for diffs], Sat Sep 26 16:27:27 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.97: +8 -18 lines
Diff to previous 1.97 (colored) to selected 1.164 (colored)

make(1): clean up obsolete comments about TARG constants

Revision 1.97 / (download) - annotate - [select for diffs], Sat Sep 26 16:21:17 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.96: +2 -4 lines
Diff to previous 1.96 (colored) to selected 1.164 (colored)

make(1): remove useless comment from TargFreeGN

GNode.fname is a const char *, therefore it cannot be freed anyway.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Sep 26 16:18:44 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.95: +46 -73 lines
Diff to previous 1.95 (colored) to selected 1.164 (colored)

make(1): inline Targ_FindNodeImpl

The 3 callers of this function passed different flags, and these flags
led to code paths that almost did not overlap.

It's a bit strange that GCC 5 didn't get that, and even marking the
function as inline did not produce much smaller code, even though the
conditions inside that function were obviously constant.  Clang 9 did a
better job here.

But even for human readers, inlining the function and then throwing away
the dead code leads to much easier code.

This pattern of squeezing completely different code into a single
function has already occurred in a different part of make, though I
don't remember where exactly.

Revision 1.95 / (download) - annotate - [select for diffs], Sat Sep 26 16:00:12 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.94: +36 -16 lines
Diff to previous 1.94 (colored) to selected 1.164 (colored)

make(1): clean up API for finding and creating GNodes

The previous API had complicated rules for the cases in which the single
function returned NULL or what it did.  The flags for that function were
confusing since passing TARG_NOHASH would create a new node even though
TARG_CREATE was not included in that bit mask.

Splitting the function into 3 separate functions avoids this confusion.
It also reveals several places where the complicated API led to
unreachable code.  Such code has been removed.

Revision 1.94 / (download) - annotate - [select for diffs], Sat Sep 26 14:59:21 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.93: +9 -14 lines
Diff to previous 1.93 (colored) to selected 1.164 (colored)

make(1): replace Hash_FindEntry with Hash_FindValue in Targ_FindNode

Revision 1.93 / (download) - annotate - [select for diffs], Thu Sep 24 07:59:33 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.92: +7 -10 lines
Diff to previous 1.92 (colored) to selected 1.164 (colored)

make(1): inline Lst_ForEach in Targ_PrintCmds

Revision 1.92 / (download) - annotate - [select for diffs], Thu Sep 24 07:11:29 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.91: +7 -7 lines
Diff to previous 1.91 (colored) to selected 1.164 (colored)

make(1): rename Lst_ForEach to Lst_ForEachUntil

Since the callback function returns a terminating condition, this is not
really a foreach loop.

Many of the calls to Lst_ForEachUntil don't make use of the terminating
condition, and several don't modify the list structurally, which means
they don't need this complicated implementation.

In a follow-up commit, Lst_ForEach will be added back with a much
simpler implementation that iterates over the list naively, without a
terminating condition and without taking the iteration state from
Lst_Open/Lst_Next/Lst_Close into account.  The migration to this simpler
implementation will be done step by step since each callback function
needs to be examined closely.

Revision 1.91 / (download) - annotate - [select for diffs], Thu Sep 24 06:45:59 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored) to selected 1.164 (colored)

make(1): refactor add_wait_dep to not use Lst_ForEachFrom anymore

It was the last remaining use of that function outside of lst.c.

While here, clean up the code of add_wait_dep by removing unreachable
code (the GNode lists never contain NULL, only the GNode.commands lists
do that).

Revision 1.90 / (download) - annotate - [select for diffs], Wed Sep 23 03:06:38 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.89: +15 -2 lines
Diff to previous 1.89 (colored) to selected 1.164 (colored)

make(1): fix assertion failure in -j mode with .END node

There had been two separate global variables for the .END node, and in
parallel mode, only the one in jobs.c was initialized.

The code in JobRun heads over to Compat_Make without calling Compat_Run
first, which left the variable ENDNode uninitialized.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Sep 22 04:05:41 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.88: +16 -23 lines
Diff to previous 1.88 (colored) to selected 1.164 (colored)

make(1): use fine-grained type names for lists and their nodes

This is only intended to help the human reader.  There is no additional
type safety yet.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Sep 13 15:15:51 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.87: +4 -14 lines
Diff to previous 1.87 (colored) to selected 1.164 (colored)

make(1): clean up RCSID blocks

These blocks mostly consisted of redundant structure, following the same
#ifndef pattern over and over, with only minimal variation.

It's easier to maintain if the common structure is only written once and
encapsulated in a macro.

To avoid "defined but unused" warnings from GCC in the case where
MAKE_NATIVE is not defined, I had to add volatile.  Adding
MAKE_ATTR_UNUSED alone would not preserve the rcsid variable in the
resulting binary.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Sep 12 16:38:19 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.86: +22 -10 lines
Diff to previous 1.86 (colored) to selected 1.164 (colored)

make(1): fix API of Targ_PrintNode

There was no need to export Targ_PrintNode at all.  All the callers need
is a high-level API for printing a single node or a list of nodes.  The
implementation detail that Targ_PrintNode was used as a callback to
Lst_ForEach should have never leaked into the API.

Revision 1.86 / (download) - annotate - [select for diffs], Sat Sep 12 16:24:20 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.85: +4 -4 lines
Diff to previous 1.85 (colored) to selected 1.164 (colored)

make(1): remove unintended noinline from previous commit

Revision 1.85 / (download) - annotate - [select for diffs], Sat Sep 12 16:22:32 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.84: +24 -30 lines
Diff to previous 1.84 (colored) to selected 1.164 (colored)

make(1): fix trailing space in output of related node names (-dg2)

Revision 1.84 / (download) - annotate - [select for diffs], Sat Sep 12 16:13:48 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.83: +12 -7 lines
Diff to previous 1.83 (colored) to selected 1.164 (colored)

make(1): fix API for Targ_PrintCmd

The previous API was too low-level and not strictly typed.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Sep 5 13:55:08 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.82: +5 -5 lines
Diff to previous 1.82 (colored) to selected 1.164 (colored)

make(1): remove initial size argument from Hash_InitTable

In all but one case this argument was set to auto-detect anyway.  The
one case where it was set was not worth keeping this complicated API.

Revision 1.82 / (download) - annotate - [select for diffs], Sat Sep 5 06:46:12 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.81: +10 -10 lines
Diff to previous 1.81 (colored) to selected 1.164 (colored)

make(1): remove trailing whitespace in -dg1 debug output

Revision 1.81 / (download) - annotate - [select for diffs], Tue Sep 1 20:54:00 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.80: +4 -6 lines
Diff to previous 1.80 (colored) to selected 1.164 (colored)

make(1): inline constant for hash table size

The name HTSIZE didn't provide any explanation for the value 191, and it
is obvious that this is a hash table size.  Therefore giving the
constant a name didn't explain anything or make it less magic.

Revision 1.80 / (download) - annotate - [select for diffs], Sun Aug 30 14:11:42 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.79: +7 -7 lines
Diff to previous 1.79 (colored) to selected 1.164 (colored)

make(1): rename GNode.iParents to implicitParents

The i alone was too ambiguous.  It could have meant ignore, implicit,
interactive, and probably many more.

Revision 1.79 / (download) - annotate - [select for diffs], Sun Aug 30 11:15:05 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.78: +6 -6 lines
Diff to previous 1.78 (colored) to selected 1.164 (colored)

make(1): rename Lst_Datum to LstNode_Datum

Revision 1.78 / (download) - annotate - [select for diffs], Sat Aug 29 20:20:44 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.77: +19 -51 lines
Diff to previous 1.77 (colored) to selected 1.164 (colored)

make(1): use loops instead of Lst_ForEach for propagating to cohorts

For one-liners, Lst_ForEach creates a lot of overhead, both at runtime
and for reading and understanding the code.

In this simple case where the structure of the traversed nodes is not
modified, a simple loop is enough.  This avoids a lot of conversions to
void * and thus prevents type mistakes.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Aug 28 19:14:07 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.76: +53 -272 lines
Diff to previous 1.76 (colored) to selected 1.164 (colored)

make(1): clean up targ.c

The main part is removing redundant or outdated information from
comments.  In a few places, the expression cond ? TRUE : FALSE has been
simplified.

Revision 1.76 / (download) - annotate - [select for diffs], Fri Aug 28 04:48:57 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.75: +34 -34 lines
Diff to previous 1.75 (colored) to selected 1.164 (colored)

make(1): remove trailing 'S' from names of Lst functions

The migration from null-passing Lst functions to argument-checking Lst
functions is completed.

There were 2 surprises: The targets list may be NULL, and in Dir_AddDir,
the path may be NULL.  The latter case is especially surprising since
that function turns into an almost-nop in that case.  This is another
case where probably 2 independent functions have been squeezed into a
single function.  This may be improved in a follow-up commit.

All other lists were fine.  They were always defined and thus didn't
need much work.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Aug 27 19:15:35 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.74: +7 -7 lines
Diff to previous 1.74 (colored) to selected 1.164 (colored)

make(1): migrate Lst_IsEmpty to Lst_IsEmptyS

Revision 1.74 / (download) - annotate - [select for diffs], Thu Aug 27 06:53:57 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.73: +14 -14 lines
Diff to previous 1.73 (colored) to selected 1.164 (colored)

make(1): migrate Lst_ForEach to Lst_ForEachS

Most lists are always valid.  Only the "targets" variable may be null in
some cases, probably.

Revision 1.73 / (download) - annotate - [select for diffs], Wed Aug 26 22:55:46 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.72: +13 -13 lines
Diff to previous 1.72 (colored) to selected 1.164 (colored)

make(1): add stricter variants for remaining Lst functions

In most cases the Lst functions are only called when the arguments are
indeed valid.  It's not guaranteed though, therefore each function call
needs to be analyzed and converted individually.

While here, remove a few statements that were only useful when the Lst
functions handled circular lists.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Aug 24 20:15:51 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.71: +5 -5 lines
Diff to previous 1.71 (colored) to selected 1.164 (colored)

make(1): in debug mode, print GNode details in symbols

A string like OP_DEPENDS|OP_OPTIONAL|OP_PRECIOUS is much easier to read
and understand than the bit pattern 00000089.

The implementation in enum.h looks really bloated and ugly, but using
this API is as simple and natural as possible.  That's the trade-off.

In enum.h, I thought about choosing the numbers in the macros such that
it is always possible to combine two of them in order to reach an
arbitrary number, because of the "part1, part2" in the ENUM__SPEC macro.
The powers of 2 are not these numbers, as 7 cannot be expressed as the
sum of two of them.  Neither are the fibonacci numbers since 12 cannot
be expressed as the sum of 2 fibonacci numbers.  I tried to find a
general pattern to generate these minimal 2-sum numbers, but failed.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Aug 22 18:20:31 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.70: +4 -4 lines
Diff to previous 1.70 (colored) to selected 1.164 (colored)

make(1): restructure GNode types and documentation

Having a numbered list above the type was not helpful since the numbers
didn't serve any purpose, they just consumed screen space.

Several of these list items didn't have an obvious relationship to the
struct fields.  It's better to have just a rough introduction as the
type level documentation, leaving the details to the individual fields.

Converting the types and flags and other constants into separate types
and defining them outside the struct leaves more space to see the
relationship of the struct fields.

Limiting the documentation of each field to a single line, as suggested
by the end-of-line comments, reduces clarity since several of the fields
need way more documentation to be properly understood.

Revision 1.70 / (download) - annotate - [select for diffs], Sat Aug 22 15:17:09 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored) to selected 1.164 (colored)

make(1): replace Lst_Datum with non-null guaranteeing Lst_DatumS

Revision 1.69 / (download) - annotate - [select for diffs], Sat Aug 22 13:28:20 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.68: +5 -5 lines
Diff to previous 1.68 (colored) to selected 1.164 (colored)

make(1): convert remaining Lst_AtEnd to the stricter Lst_Append

The general-purpose list library that is included in make allows to call
Lst_AtEnd for invalid lists, silently ignoring this programming error.
This is a flexibility that make doesn't need.

Another unneeded "feature" is that list items can theoretically be null
pointers.  This doesn't make sense as well and is therefore not needed
by make.

These programming errors are now caught early by assertions.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Aug 22 11:35:00 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.67: +5 -5 lines
Diff to previous 1.67 (colored) to selected 1.164 (colored)

make(1): replace "(void)Lst_AtEnd" with stricter "Lst_AppendS"

This change ensures that there is actually something added to the list.
Lst_AtEnd had silently skipped the addition if the list was invalid
(null pointer), which was not intended in these cases.  The "(void)" is
assumed to mean "I know that this cannot fail", while it could also mean
"I don't care whether something actually happened".

Running "./build.sh -j6 tools" still succeeds after this change,
therefore chances are very low that this change breaks anything.  If
there is any change, it's an obvious assertion failure.  There is no
silent change in behavior though.

Revision 1.67 / (download) - annotate - [select for diffs], Fri Aug 21 04:42:02 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.66: +5 -7 lines
Diff to previous 1.66 (colored) to selected 1.164 (colored)

make(1): use stricter list API for sequential access

In several places, it just doesn't make sense to have a null pointer
when a list is expected.

In the existing unit tests, the list passed to Lst_Open is always valid,
but that's not a guarantee for real-world usage.  Therefore, Lst_Open
has been left for now, and Lst_OpenS is only the preferred alternative
to it.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Aug 21 04:09:12 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored) to selected 1.164 (colored)

make(1): assert correct usage of the Lst_Open API

All calls to Lst_Next are properly protected by Lst_Open, so there is no
possible assertion failure here.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Aug 21 02:20:48 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.64: +13 -13 lines
Diff to previous 1.64 (colored) to selected 1.164 (colored)

make(1): remove unused code for circular lists

The list library had probably been imported from a general-purpose
library that also supported circular lists.  These are not used by make
though.

After replacing Lst_Init(FALSE) with Lst_Init(), only a single call to
Lst_Init remained with a non-constant argument, and that was in
Lst_Concat, which was to be expected.

Revision 1.64 / (download) - annotate - [select for diffs], Mon Jul 20 18:12:48 2020 UTC (3 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.63: +10 -3 lines
Diff to previous 1.63 (colored) to selected 1.164 (colored)

Make DEBUG_HASH less of a fire-hose.

Reporting keys on every lookup is overkill unless
playing with a new HASH, so wrap in #ifdef DEBUG_HASH_LOOKUP
Also add some stats at the end so we can see
final size and max chain length - maxchain is a better
variable name than maxlen.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Jul 3 08:02:55 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.62: +16 -16 lines
Diff to previous 1.62 (colored) to selected 1.164 (colored)

make(1): remove redundant parentheses around return values

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:35 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.61: +5 -5 lines
Diff to previous 1.61 (colored) next main 1.62 (colored) to selected 1.164 (colored)

Sync with HEAD

Revision 1.61.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:14 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.61: +5 -5 lines
Diff to previous 1.61 (colored) next main 1.62 (colored) to selected 1.164 (colored)

Sync with HEAD

Revision 1.62 / (download) - annotate - [select for diffs], Sun Apr 16 19:53:58 2017 UTC (6 years, 11 months ago) by riastradh
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-20170426, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, is-mlppp-base, is-mlppp, bouyer-socketcan-base1
Changes since 1.61: +5 -5 lines
Diff to previous 1.61 (colored) to selected 1.164 (colored)

Use, don't kludge, MAKE_ATTR_UNUSED.

CID 1300234
CID 1300237
CID 1300238
CID 1300245
CID 1300255
CID 1300267
CID 1300284

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jan 17 17:45:21 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.60: +5 -7 lines
Diff to previous 1.60 (colored) to selected 1.164 (colored)

remove free NULL checks (Tilman Sauerbeck)

Revision 1.57.10.1 / (download) - annotate - [select for diffs], Mon Jun 1 19:24:47 2015 UTC (8 years, 9 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.57: +4 -4 lines
Diff to previous 1.57 (colored) next main 1.58 (colored) to selected 1.164 (colored)

Pull up following revision(s) (requested by manu in ticket #810):
	usr.bin/make/targ.c: revision 1.60
Fix warning about uninitialized variable
This warning gets fatal when including make(1) as a crunchgen(1) binary.

Revision 1.60 / (download) - annotate - [select for diffs], Mon May 25 09:01:06 2015 UTC (8 years, 10 months ago) by manu
Branch: MAIN
Changes since 1.59: +4 -4 lines
Diff to previous 1.59 (colored) to selected 1.164 (colored)

Fix warning about uninitialized variable

This warning gets fatal when including make(1) as a crunchgen(1) binary.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Sep 7 20:55:34 2014 UTC (9 years, 6 months ago) by joerg
Branch: MAIN
Changes since 1.58: +0 -6 lines
Diff to previous 1.58 (colored) to selected 1.164 (colored)

Revert all make changes except the unit tests to the state of three
weeks ago. Individual changes can be reapplied after review.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Aug 23 15:05:40 2014 UTC (9 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.57: +9 -3 lines
Diff to previous 1.57 (colored) to selected 1.164 (colored)

PR/46096: Jarmo Jaakkola: fix many problems with dependencies (PR 49086)

Quite extensive rewrite of the Suff module.  Some ripple effects into
Parse and Targ modules too.

Dependency searches in general were made to honor explicit rules so
implicit and explicit sources are no longer applied on targets that
do not invoke a transformation rule.

Archive member dependency search was rewritten.  Explicit rules now
work properly and $(.TARGET) is set correctly.  POSIX semantics for
lib(member.o) and .s1.a rules are supported.

.SUFFIXES list maintenance was rewritten so that scanning of existing
rules works when suffixes are added and that clearing the suffix list
removes single suffix rules too.  Transformation rule nodes are now
mixed with regular nodes so they are available as regular targets too
if needed (especially after the known suffixes are cleared).

The .NULL target was documented in the manual page, especially to
warn against using it when a single suffix rule would work.
A deprecation warning was also added to the manual and make also
warns the user if it encounters .NULL.

Search for suffix rules no longer allows the explicit dependencies
to override the selected transformation rule.  A check is made in
the search that the transformation that would be tried does not
already exist in the chain.  This prevents getting stuck in an infinite
loop under specific circumstances.  Local variables are now set
before node's children are expanded so dynamic sources work in
multi-stage transformations.  Make_HandleUse() no longer expands
the added children for transformation nodes, preventing triple
expansion and allowing the Suff module to properly postpone their
expansion until proper values are set for the local variables.

Directory prefix is no longer removed from $(.PREFIX) if the target
is found via directory search.

The last rule defined is now used instead of the first one (POSIX
requirement) in case a rule is defined multiple times.  Everything
defined in the first instance is undone, but things added "globally"
are honored.  To implement this, each node tracks attribute bits
which have been set by special targets (global) instead of special
sources (local).  They also track dependencies that were added by
a rule with commands (local) instead of rule with no commands (global).

New attribute, OP_FROM_SYS_MK is introduced.  It is set on all targets
found in system makefiles so that they are not eligible to become
the main target.  We cannot just set OP_NOTMAIN because it is one of
the attributes inherited from transformation and .USE rules and would
make any eligible target that uses a built-in inference rule ineligible.

The $(.IMPSRC) local variable now works like in gmake: it is set to
the first prerequisite for explicit rules.  For implicit rules it
is still the implied source.

The manual page is improved regarding the fixed features.  Test cases
for the fixed problems are added.

Other improvements in the Suff module include:
  - better debug messages for transformation rule search (length of
    the chain is now visualized by indentation)
  - Suff structures are created, destroyed and moved around by a set
    of maintenance functions so their reference counts are easier
    to track (this also gets rid of a lot of code duplication)
  - some unreasonably long functions were split into smaller ones
  - many local variables had their names changed to describe their
    purpose instead of their type

Revision 1.56.6.1 / (download) - annotate - [select for diffs], Tue Oct 30 19:00:23 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.56: +6 -6 lines
Diff to previous 1.56 (colored) next main 1.57 (colored) to selected 1.164 (colored)

sync with head

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jun 12 19:21:51 2012 UTC (11 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, dholland-make-base, agc-symver-base, agc-symver
Branch point for: netbsd-7
Changes since 1.56: +6 -6 lines
Diff to previous 1.56 (colored) to selected 1.164 (colored)

Replace __dead, __unused and the various printf format attributes
with versions prefixed by MAKE_ATTR_* to avoid modifying the
implementation namespace. Make sure they are available in all places
using nonints.h to fix bootstrap on Linux.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Nov 25 21:31:09 2010 UTC (13 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache
Changes since 1.55: +6 -5 lines
Diff to previous 1.55 (colored) to selected 1.164 (colored)

Instead of keeping around the mtime of the youngest child, keep a pointer
to it, so that we can print it when we do the out of date determination.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Jan 23 21:26:30 2009 UTC (15 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.54: +15 -15 lines
Diff to previous 1.54 (colored) to selected 1.164 (colored)

Change 'ClientData' to 'void *' so that relevant parameters can
be made 'const void *'.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Dec 13 15:19:29 2008 UTC (15 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.53: +15 -15 lines
Diff to previous 1.53 (colored) to selected 1.164 (colored)

Use NULL instead of -1 cast to the relavant type (usually via NIL).
This was a suggestion from christos - so blame him if there is a deep
reason for using -1 :-)

Revision 1.53 / (download) - annotate - [select for diffs], Mon Oct 6 22:09:21 2008 UTC (15 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Changes since 1.52: +5 -5 lines
Diff to previous 1.52 (colored) to selected 1.164 (colored)

Don't use emalloc and friends directly, but call them consistently
bmake_malloc and friends. Implement them via macros for the native case
and provide fallback implementations otherwise. Avoid polluting the
namespace by not defining enomem globally. Don't bother to provide
strdup and strndup, they were only used for the estrdup and estrndup
comapt code.

This addresses the presence of emalloc in system libraries on A/UX and
resulted strange issues as reported by Timothy E. Larson.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Feb 15 21:29:50 2008 UTC (16 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, mjf-devfs2-base, mjf-devfs2, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Changes since 1.51: +2 -5 lines
Diff to previous 1.51 (colored) to selected 1.164 (colored)

back all changes out until I fix it properly.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Feb 14 22:11:20 2008 UTC (16 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: christos-broken
Changes since 1.50: +8 -5 lines
Diff to previous 1.50 (colored) to selected 1.164 (colored)

- use pid_t/size_t as appropriate instead of int.
- use %ld to print pids.
- fix a bit of lint.
- WARNS=4

Revision 1.49.4.1 / (download) - annotate - [select for diffs], Wed Jan 9 02:00:48 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.49: +5 -3 lines
Diff to previous 1.49 (colored) next main 1.50 (colored) to selected 1.164 (colored)

sync with HEAD

Revision 1.50 / (download) - annotate - [select for diffs], Fri Dec 21 20:32:24 2007 UTC (16 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.49: +5 -3 lines
Diff to previous 1.49 (colored) to selected 1.164 (colored)

If make can't find a rule to create a file it needs to satisfy a rule
that came from .depend then just output a message and contine.

Revision 1.45.2.1.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:05:32 2007 UTC (16 years, 6 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.45.2.1: +6 -6 lines
Diff to previous 1.45.2.1 (colored) next main 1.45.2.2 (colored) to selected 1.164 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.45.2.2 / (download) - annotate - [select for diffs], Tue Jun 5 20:53:31 2007 UTC (16 years, 9 months ago) by bouyer
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.45.2.1: +6 -6 lines
Diff to previous 1.45.2.1 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored) to selected 1.164 (colored)

Apply patch (requested by tron in ticket #696):
	usr.bin/make/compat.c		patch
	usr.bin/make/cond.c		patch
	usr.bin/make/dir.c		patch
	usr.bin/make/for.c		patch
	usr.bin/make/main.c		patch
	usr.bin/make/make.1		patch
	usr.bin/make/make.c		patch
	usr.bin/make/make.h		patch
	usr.bin/make/nonints.h		patch
	usr.bin/make/parse.c		patch
	usr.bin/make/str.c		patch
	usr.bin/make/targ.c		patch
	usr.bin/make/util.c		patch
	usr.bin/make/var.c		patch

Synchronize make(1) with HEAD branch to increase perfomance and
improve stability.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Dec 21 20:05:37 2006 UTC (17 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: matt-armv6
Changes since 1.48: +4 -3 lines
Diff to previous 1.48 (colored) to selected 1.164 (colored)

Fix breakage of previous commit.

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Wed Dec 20 22:42:11 2006 UTC (17 years, 3 months ago) by bouyer
Branch: netbsd-4
Branch point for: wrstuden-fixsa
Changes since 1.45: +4 -5 lines
Diff to previous 1.45 (colored) to selected 1.164 (colored)

Pull up following revision(s) (requested by dsl in ticket #285):
	usr.bin/make/cond.c: revision 1.36
	usr.bin/make/parse.c: revision 1.121-1.124
	usr.bin/make/make.h: revision 1.65
	usr.bin/make/targ.c: revision 1.46
	usr.bin/make/main.c: revision 1.138-1.139
Simplify the code that processes .if lines.
It doesn't need a two-dimensional array to remember the states of .if lines.
It would be even simpler if we didn't try to detect .else and .elif lines
that follow .else lines.
Unfortunately this isn't the code that is stupendously slow...
Unknot this code slightly by avoiding 'break/return; else' and by putting
the short parts of some conditionals first.
First step towards speeding up the parsing of makefiles (esp. the unwanted
parts of .if clauses).
There should be no changes to the logic.
There really is no point calling estrdup() to get a copy of the makefile name
into every 'gnode' (aka target), instead just copy a pointer to the string
and avoid freeing the original name when we close the file.
I can't imagine any makefile set where this gives a larger footprint!
Add anewline to the end of the error message output when the debug log
file cannot be opened.
Put the big block of code that was common to ParseDoInclude() and
ParseTraditionalInclude() into a separate routine.
Fix the 'use after free' and 'free on item not malloced' that got added
to ParseTraditionalInclude() in Feb 2006 (rev 1.111).
Kill the 'PTR' struct and put both its members into IFile.
Remove the parameter from ParseEOF(), 1 of the 3 calls passed the wrong value!
Fortunately another test stopped anything nasty happening, we'll use that
test instead.
Revert part of a recent commit.
ParseEOF() shouldn't close the original file.
Some minor changes:
- Only test 'printVars' once.
  Has side effect of not trying to find the 'main' target for '-V varname'.
- Only reap the single child process in Cmd_Exec(),
  I think this is for 'xx != cmd' so probobably no other children should exist.
- Don't read and parse .depend if '-r' and '-V varname' are set.
  I suspect that .depend shouldn't affect the output of any -V command...

Revision 1.48 / (download) - annotate - [select for diffs], Wed Dec 20 20:46:35 2006 UTC (17 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.47: +3 -4 lines
Diff to previous 1.47 (colored) to selected 1.164 (colored)

Fix detection and reporting of dependency loops in parallel makes.
make's unit_tests should now run again.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Dec 18 15:06:16 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.46: +5 -5 lines
Diff to previous 1.46 (colored) to selected 1.164 (colored)

From Anon Ymous:
Removed two "(void)&" constructs as there is no setjmp() or vfork() insight.
Flagged a few parameters __unused so this will compile with -Wextra now.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Dec 4 21:34:47 2006 UTC (17 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.45: +4 -5 lines
Diff to previous 1.45 (colored) to selected 1.164 (colored)

There really is no point calling estrdup() to get a copy of the makefile name
into every 'gnode' (aka target), instead just copy a pointer to the string
and avoid freeing the original name when we close the file.
I can't imagine any makefile set where this gives a larger footprint!

Revision 1.45 / (download) - annotate - [select for diffs], Fri Nov 17 22:07:39 2006 UTC (17 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.44: +66 -316 lines
Diff to previous 1.44 (colored) to selected 1.164 (colored)

A rather large rototil in the way the parallel make code schedules jobs.
This gives a considerable speedup in the processing of .WAIT and .ORDER.
Both .WAIT and .ORDER stop both the commands of the node, and its dependant
nodes being built until the LH nodes are complete.
.WAIT only applies to the dependency line on which it appears, whereas
.ORDER applies globally between the two nodes.
In both cases dependant nodes can be built because other targets need them.
make now processes the target list left to right, scheduling child nodes
as they are needed to make other nodes (instead of attempting to generate
a bottom-up dependency graph at the start).  This means that 'make -j1'
will tend to build in the same order as a non-parallel make.
Note that:
    all: x y
    x: a .WAIT b
    y: b .WAIT a
does not generate a dependency loop.
But
    x: y
    .ORDER y x
does (unless something elswhere causes 'y' to be built).

Revision 1.44 / (download) - annotate - [select for diffs], Fri Oct 27 21:00:19 2006 UTC (17 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.43: +23 -23 lines
Diff to previous 1.43 (colored) to selected 1.164 (colored)

Since 'ClientData' is 'void *', nuke almost all the (ClientData) casts.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Oct 15 08:38:22 2006 UTC (17 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.42: +49 -49 lines
Diff to previous 1.42 (colored) to selected 1.164 (colored)

Output all debug trace output through 'debug_file' defaulting to 'stdout'.
(Almost all the debug output went there, but some went to stderr.)
Split the parsing of -d (debug flags) out into its own routine.
Allow the output filename to be changed by specifying -dF<file> to create
a log file, or -dF+<file> to append to it. <file> may be stdout or stderr.
Also change so that -d-<flags> acts on <flags> locally but doesn't copy
them to MAKEFLAGS so they aren't inherited by child makes.
I'm not 100% happy with the command line syntax for the above, so they are
currently undocumented.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Feb 26 22:45:46 2006 UTC (18 years, 1 month ago) by apb
Branch: MAIN
CVS Tags: chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.41: +323 -7 lines
Diff to previous 1.41 (colored) to selected 1.164 (colored)

Make ".WAIT" apply recursively to all children of nodes on the right
hand side of the .WAIT, except when the recursive interpretation would
cause a cycle in the dependency graph.

Discussed in tech-toolchain.  Reviewed by christos, sjg.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Feb 11 20:19:36 2006 UTC (18 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.40: +6 -4 lines
Diff to previous 1.40 (colored) to selected 1.164 (colored)

Delete obsolete static defn.
Trace number of unmade children on pass 1

Revision 1.40 / (download) - annotate - [select for diffs], Sat Feb 11 18:37:36 2006 UTC (18 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.39: +8 -8 lines
Diff to previous 1.39 (colored) to selected 1.164 (colored)

Debug trace all the targets we are actually intending making.
De-optimise the getting of a job token so we don't re-order the job
list when there are no tokens.
This might have helped etc/Makefile, but isn't enough.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jan 8 17:43:31 2006 UTC (18 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.38: +13 -3 lines
Diff to previous 1.38 (colored) to selected 1.164 (colored)

Include the 'preds' and 'successors' in the diag output.
These are the values that are actually used to control what is built.
(I suspect .WAIT info added in the previous delta isn't always useful.)

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jan 8 11:54:13 2006 UTC (18 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.37: +18 -7 lines
Diff to previous 1.37 (colored) to selected 1.164 (colored)

Include .WAIT in the debug output for dependency lists.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Aug 8 16:42:54 2005 UTC (18 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.36: +13 -13 lines
Diff to previous 1.36 (colored) to selected 1.164 (colored)

From Max Okumoto:
- Remove casts to NULL.
- Remove space between cast and object.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Aug 5 00:53:18 2005 UTC (18 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored) to selected 1.164 (colored)

More KNF cleanups from Max Okumoto

Revision 1.35 / (download) - annotate - [select for diffs], Mon Jul 25 22:55:58 2005 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.34: +16 -16 lines
Diff to previous 1.34 (colored) to selected 1.164 (colored)

Whitespace KNF cleanup from Max Okumoto

Revision 1.34 / (download) - annotate - [select for diffs], Wed Feb 16 15:11:53 2005 UTC (19 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.33: +37 -37 lines
Diff to previous 1.33 (colored) to selected 1.164 (colored)

PR/29203, PR/29204: Max Okumoto: KNF changes to make [no functional changes]

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 1 20:38:09 2004 UTC (19 years, 9 months ago) by jmc
Branch: MAIN
Changes since 1.32: +4 -8 lines
Diff to previous 1.32 (colored) to selected 1.164 (colored)

Change to use __unused instead and provide a compat definition in make.h if
not already defined from cdefs.h

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jul 1 04:39:31 2004 UTC (19 years, 9 months ago) by jmc
Branch: MAIN
Changes since 1.31: +7 -3 lines
Diff to previous 1.31 (colored) to selected 1.164 (colored)

Add some checks for gcc around a few function declarations and note the
unused variables. Also fix a few other warnings that PR#22118 shows when
trying to compile bmake on non-NetBSD hosts

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Mon May 10 15:43:33 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.30: +4 -4 lines
Diff to previous 1.30 (colored) next main 1.31 (colored) to selected 1.164 (colored)

Pull up revision 1.31 (requested by sjg in ticket #282):
Simplify build, no functional changes.
Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().
It's now possible to build make on some hosts with: cc *.c */*.c

Revision 1.31 / (download) - annotate - [select for diffs], Fri May 7 00:04:40 2004 UTC (19 years, 10 months ago) by ross
Branch: MAIN
Changes since 1.30: +4 -4 lines
Diff to previous 1.30 (colored) to selected 1.164 (colored)

Simplify build, no functional changes.

Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().

It's now possible to build make on some hosts with: cc *.c */*.c

Revision 1.30 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:58 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.29: +33 -3 lines
Diff to previous 1.29 (colored) to selected 1.164 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Jul 14 18:19:13 2003 UTC (20 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.28: +6 -6 lines
Diff to previous 1.28 (colored) to selected 1.164 (colored)

Pass WARNS=3

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jun 15 18:24:58 2002 UTC (21 years, 9 months ago) by wiz
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.27: +64 -68 lines
Diff to previous 1.27 (colored) to selected 1.164 (colored)

Remove !__STDC__ stuff, de-__P(), ANSIfy, and de-register.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 20 18:10:31 2002 UTC (22 years ago) by pk
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.26: +5 -3 lines
Diff to previous 1.26 (colored) to selected 1.164 (colored)

Xref: parse.c, rev 1.46; make.c, rev 1.23

In these revisions `::' dependency handling was simplified by not linking
the cohort nodes into the dependency graph. This broke dependency checking
on all but the first instance of a `::' target since all of the cohort nodes
now just form a collection of disconnected dependency graphs.

Fix this by keeping a back-reference in each cohort to its leader (the
first instance of a :: node with the same name) and a count of the number
of cohorts that need to be made before dependent nodes are scheduled.

Classically, we'd need six centurions for cohort, but in this case one
suffices...

Revision 1.26 / (download) - annotate - [select for diffs], Sun Feb 10 12:03:08 2002 UTC (22 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.25: +5 -3 lines
Diff to previous 1.25 (colored) to selected 1.164 (colored)

Targ_PrintType(): include .PHONY and .MADE attributes.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jan 27 01:50:55 2002 UTC (22 years, 2 months ago) by reinoud
Branch: MAIN
Changes since 1.24: +6 -6 lines
Diff to previous 1.24 (colored) to selected 1.164 (colored)

Fix major bug in make(1) ... due to shadowing of the dotLast path used for
the .DOTLAST primitive by a boolean variable with the same name, this whole
mechanism was broken ... it doesn't save much stat calls but it was wrong.

Thanks to Jason Thorpe for the other shadow-variable fixing patches he
made.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Nov 12 01:33:49 2001 UTC (22 years, 4 months ago) by tv
Branch: MAIN
Changes since 1.23: +4 -3 lines
Diff to previous 1.23 (colored) to selected 1.164 (colored)

Add new make variable .ALLTARGETS, which lists all targets in the Makefile.
(Makes it possible to search the target list for particular things and
apply attributes to all the relevant targets.)

Revision 1.23 / (download) - annotate - [select for diffs], Mon Aug 20 12:00:56 2001 UTC (22 years, 7 months ago) by wiz
Branch: MAIN
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored) to selected 1.164 (colored)

precede, not preceed.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jul 3 18:08:51 2001 UTC (22 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored) to selected 1.164 (colored)

add .USEBEFORE Attribute

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jan 14 05:34:06 2001 UTC (23 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.20: +7 -3 lines
Diff to previous 1.20 (colored) to selected 1.164 (colored)

- make the second list of commands override the first like gmake does
- remember where the first command definition occured so that we can debug
  things.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Sep 16 00:54:15 1999 UTC (24 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored) to selected 1.164 (colored)

Some minor cleanup of :: tests.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Sep 15 10:47:45 1999 UTC (24 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +35 -7 lines
Diff to previous 1.18 (colored) to selected 1.164 (colored)

Rework how :: dependencies are handled.
Build a list of `cohorts' as before, but do *not* link each one into all the
parent nodes; instead, copy the `cohort' lists into the stream of targets to
be built inside Make_ExpandUse().  Also do the attribute propagation as a
separate pass after parsing.
This eliminates several O(n^2) algorithms.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Sep 15 08:43:22 1999 UTC (24 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +13 -3 lines
Diff to previous 1.17 (colored) to selected 1.164 (colored)

Don't bother iterating through all the data structures to free(3) everything
right before exiting.
(The code is still present, `#ifdef CLEANUP', in case someone needs it...)

Revision 1.17 / (download) - annotate - [select for diffs], Wed Sep 15 02:56:35 1999 UTC (24 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored) to selected 1.164 (colored)

Replace the linear variable list in the GNode with a hash table.  Gives a
small (~10% on my machine) speedup building libc.
Changes by: perry (+ bug fix and minor change by me)
Reviewed by: mycroft sommerfeld

Revision 1.16 / (download) - annotate - [select for diffs], Wed Nov 11 19:37:06 1998 UTC (25 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Changes since 1.15: +4 -5 lines
Diff to previous 1.15 (colored) to selected 1.164 (colored)

This patch fixes the problem introduced in the previous commit where
parents would be get remade, even if children were not really updated
by the commands executed for them. It also makes all the children have
the real modification time set if possible, so it should fix some other
timing weirdnesses...

- collapse childMade and make fields into flags and convert them to bits
  CHILDMADE and REMAKE
- introduce FORCE flag that gets set in all the parents of a child that
  has no sources and does not exist.
- set oodate if the FORCE flag is set, and not if CHILDMADE
- centralize the RECHECK into Make_Recheck() and use this in make.c and compat.c
- use Make_TimeStamp for all child -> parent timestamp propagations

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Fri May 8 06:12:08 1998 UTC (25 years, 10 months ago) by mycroft
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002
Changes since 1.14: +5 -12 lines
Diff to previous 1.14 (colored) next main 1.15 (colored) to selected 1.164 (colored)

Sync with trunk, per request of christos.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 4 14:47:39 1998 UTC (26 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.14: +5 -12 lines
Diff to previous 1.14 (colored) to selected 1.164 (colored)

Y2K fixes: use strftime(), and add a fake strftime() for systems that do
not have it.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Sep 28 03:31:12 1997 UTC (26 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Branch point for: netbsd-1-3
Changes since 1.13: +6 -2 lines
Diff to previous 1.13 (colored) to selected 1.164 (colored)

wrap #include <sys/cdefs.h>, __RCSID(...) stuff in #ifndef MAKE_BOOTSTRAP

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jul 1 21:17:42 1997 UTC (26 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored) to selected 1.164 (colored)

Add WARNS=1
RCSID police

Revision 1.12 / (download) - annotate - [select for diffs], Fri May 2 14:24:33 1997 UTC (26 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.11: +22 -2 lines
Diff to previous 1.11 (colored) to selected 1.164 (colored)

- Target searching addition:
	Make used to only use the search path for nodes that were pure
	sources (not targets of other sources). This has been corrected
	and now gnu-autoconf generated Makefiles work in directories other
	than the source one.

- Suffix transformation rescanning:
	Suffix transformations (.c.o:; cc ...) were only recognized in
	the past when both suffixes were members of the suffix list.
	Thus a sequence like:
		.z.b:
			echo ${.TARGET}
		.SUFFIXES: .z
	would cause .z.b: to be inserted as a regular target (and the main
	target in this case). Other make programs always add rules that
	start with a period in the transformation list and never consider
	them as targets. We cannot do that (consider .depend files) so we
	resort to scanning the list of the current targets every time a
	suffix gets added, and we mutate existing targets that are now
	valid transformation rules into transformation rules. If the
	transformed target was also the main target, we set the main target
	to be the next target in the targets list.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Feb 20 16:51:50 1997 UTC (27 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.10: +5 -2 lines
Diff to previous 1.10 (colored) to selected 1.164 (colored)

Reported by cgd: fix .USE directive problems:
    1. ${.*} variables did not get expanded in dependencies.
    2. expanded ${.*} variables in .USE dependencies can cause tree
       restructuring; handle it.
    3. in compat mode, expand .USE before evaluating the list of targets,
       instead of doing .USE expansions on demand, because they can cause
       tree restructuring.

Revision 1.7.4.1 / (download) - annotate - [select for diffs], Sun Jan 26 05:51:53 1997 UTC (27 years, 2 months ago) by rat
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.7: +15 -12 lines
Diff to previous 1.7 (colored) next main 1.8 (colored) to selected 1.164 (colored)

Update make(1) from trunk, by request from Christos Zoulas.  Fixes many bugs.

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sat Dec 28 04:41:19 1996 UTC (27 years, 3 months ago) by tls
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.1: +108 -32 lines
Diff to previous 1.1.1.1 (colored) to selected 1.164 (colored)

Import 4.4BSD-Lite2 sources onto CSRG branch (already merged at head)

Revision 1.10 / (download) - annotate - [select for diffs], Wed Nov 6 17:59:27 1996 UTC (27 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.9: +11 -11 lines
Diff to previous 1.9 (colored) to selected 1.164 (colored)

- Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
  be considered to be out of date, since it does not have a TOC.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Aug 30 17:59:43 1996 UTC (27 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.8: +6 -3 lines
Diff to previous 1.8 (colored) to selected 1.164 (colored)

Tidy up some RCS ids a bit.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Aug 13 16:42:21 1996 UTC (27 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored) to selected 1.164 (colored)

Add estrdup(), a checked version of strdup and use it.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Apr 8 18:57:49 1996 UTC (27 years, 11 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored) to selected 1.164 (colored)

Changed to use 1900 + tm_year instead of hardcoding "19" as the century.
From PR #2308 by Stephen J. Roznowski <sjr@zombie.ncsc.mil>.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 16 05:03:15 1995 UTC (28 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored) to selected 1.164 (colored)

- Added .WAIT to synchronize between sources like other pmake variants.
- Updated documentation to include .ORDER .PARALLEL .NO_PARALLEL .NONPARALLEL

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jun 14 15:20:08 1995 UTC (28 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored) to selected 1.164 (colored)

- $NetBSD$ rcsids
- Fixed so that .[A-Z]* targets that do not match keywords are ignored as
  Posix mandates
- Added .PHONY target keyword

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jun 6 22:45:47 1994 UTC (29 years, 9 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.3: +99 -27 lines
Diff to previous 1.3 (colored) to selected 1.164 (colored)

Fixes from Christos Zoulas, who used purify, objectcenter and testcenter
to find memory leaks and illegal memory accesses.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 5 00:35:13 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.2: +10 -6 lines
Diff to previous 1.2 (colored) to selected 1.164 (colored)

fixes/improvements from Christos Zoulas <christos@deshaw.com>.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:11:39 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored) to selected 1.164 (colored)

Add RCS identifiers.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored) to selected 1.164 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: MAIN
Diff to selected 1.164 (colored)

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>