The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.286 / (download) - annotate - [select for diffs], Fri Dec 29 18:53:24 2023 UTC (3 months, 2 weeks ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.285: +12 -14 lines
Diff to previous 1.285 (colored) to selected 1.223 (colored)

make: fix declared types of list nodes

No functional change.

Revision 1.285 / (download) - annotate - [select for diffs], Tue Dec 19 19:33:39 2023 UTC (3 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.284: +5 -12 lines
Diff to previous 1.284 (colored) to selected 1.223 (colored)

make: clean up comments

No binary change, except for line numbers in assertions.

Revision 1.284 / (download) - annotate - [select for diffs], Sun Dec 17 08:53:54 2023 UTC (4 months ago) by rillig
Branch: MAIN
Changes since 1.283: +10 -10 lines
Diff to previous 1.283 (colored) to selected 1.223 (colored)

make: clean up names of local variables

No binary change.

Revision 1.283 / (download) - annotate - [select for diffs], Thu Sep 21 20:30:59 2023 UTC (6 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.282: +79 -202 lines
Diff to previous 1.282 (colored) to selected 1.223 (colored)

make: remove obsolete comments, clean up comments and identifiers

No binary change, except for the line numbers in assertions.

Revision 1.282 / (download) - annotate - [select for diffs], Fri Jun 23 04:56:54 2023 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.281: +5 -3 lines
Diff to previous 1.281 (colored) to selected 1.223 (colored)

make: warn about malformed patterns in ':M', ':N' and '.if make(...)'

These patterns shouldn't occur in practice, as their results are tricky
to predict.  Generate a warning for now, and maybe an error later.

Reviewed by sjg@.

Revision 1.281 / (download) - annotate - [select for diffs], Thu Jun 22 09:09:08 2023 UTC (9 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.280: +5 -5 lines
Diff to previous 1.280 (colored) to selected 1.223 (colored)

make: clean up comments related to pattern matching

Revision 1.280 / (download) - annotate - [select for diffs], Tue Jan 24 00:24:02 2023 UTC (14 months, 3 weeks ago) by sjg
Branch: MAIN
Changes since 1.279: +17 -2 lines
Diff to previous 1.279 (colored) to selected 1.223 (colored)

make: .SYSPATH: to add dirs to sysIncPath

.SYSPATH: with no sources will clear sysIncPath
otherwise sources are added

Reviewed by: rillig

Revision 1.279 / (download) - annotate - [select for diffs], Sat May 7 21:19:43 2022 UTC (23 months, 1 week 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.278: +3 -3 lines
Diff to previous 1.278 (colored) to selected 1.223 (colored)

make: fix grammar in comment of DirFindDot

Revision 1.278 / (download) - annotate - [select for diffs], Fri Feb 4 23:22:19 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.277: +3 -3 lines
Diff to previous 1.277 (colored) to selected 1.223 (colored)

make: use unsigned int for line numbers everywhere

Previously, some line numbers were stored as signed int while others
were stored as size_t.  Since line numbers are never negative, use an
unsigned type.  Since the maximum file size for makefiles is 1 GB (see
loadfile), unsigned int is large enough even on 64-bit platforms.

Using a single data types reduces the number of type conversions.  Using
unsigned int improves compatibility with C90 (printf %u instead of %zu),
which is needed by bmake, which is derived from usr.bin/make.

No functional change.

Revision 1.277 / (download) - annotate - [select for diffs], Sun Jan 30 13:21:08 2022 UTC (2 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.276: +3 -3 lines
Diff to previous 1.276 (colored) to selected 1.223 (colored)

Make the GNode lineno unsigned to fix lint warning in var.c calling
PrintLocation()

Revision 1.276 / (download) - annotate - [select for diffs], Wed Dec 15 12:24:13 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.275: +11 -10 lines
Diff to previous 1.275 (colored) to selected 1.223 (colored)

make: use consistent indentation for statements and continuations

No binary change, except for line numbers in assertions in suff.c.

Revision 1.275 / (download) - annotate - [select for diffs], Sun Nov 28 21:46:17 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.274: +10 -16 lines
Diff to previous 1.274 (colored) to selected 1.223 (colored)

make: eliminate CachedStatsFlags

Having two boolean flags as parameters should be easier to understand
than bit manipulations.  The variable names now match more directly.

No functional change.

Revision 1.274 / (download) - annotate - [select for diffs], Sun Nov 28 19:51:06 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.273: +3 -3 lines
Diff to previous 1.273 (colored) to selected 1.223 (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.273 / (download) - annotate - [select for diffs], Tue Sep 21 21:39:32 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.272: +4 -5 lines
Diff to previous 1.272 (colored) to selected 1.223 (colored)

make: remove unnecessary const from parameters

These were leftovers from earlier refactorings, when extracting code to
separate functions.

No functional change.

Revision 1.272 / (download) - annotate - [select for diffs], Sun Apr 4 10:13:09 2021 UTC (3 years 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.271: +3 -3 lines
Diff to previous 1.271 (colored) to selected 1.223 (colored)

make: remove filler word 'Do' from function names for parsing

No functional change, except for debug logging.

Revision 1.271 / (download) - annotate - [select for diffs], Sat Apr 3 11:08:40 2021 UTC (3 years ago) by rillig
Branch: MAIN
Changes since 1.270: +30 -30 lines
Diff to previous 1.270 (colored) to selected 1.223 (colored)

make: use C99 bool type instead of defining its own

No functional change.

Revision 1.270 / (download) - annotate - [select for diffs], Fri Feb 5 05:48:19 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.269: +3 -3 lines
Diff to previous 1.269 (colored) to selected 1.223 (colored)

make: add const to SearchPath_Print

Revision 1.269 / (download) - annotate - [select for diffs], Fri Feb 5 04:41:17 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.268: +3 -3 lines
Diff to previous 1.268 (colored) to selected 1.223 (colored)

make: add shortcut Global_Delete for deleting a global variable

Revision 1.268 / (download) - annotate - [select for diffs], Thu Feb 4 21:33:13 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.267: +3 -3 lines
Diff to previous 1.267 (colored) to selected 1.223 (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.267 / (download) - annotate - [select for diffs], Wed Feb 3 13:53:12 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.266: +8 -8 lines
Diff to previous 1.266 (colored) to selected 1.223 (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.266 / (download) - annotate - [select for diffs], Wed Feb 3 08:00:36 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.265: +8 -8 lines
Diff to previous 1.265 (colored) to selected 1.223 (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.265 / (download) - annotate - [select for diffs], Sat Jan 30 20:53:29 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.264: +3 -3 lines
Diff to previous 1.264 (colored) to selected 1.223 (colored)

make(1): split Buf_Destroy into Buf_Done and Buf_DoneData

In all cases except one, the boolean argument to Buf_Destroy was
constant.  Removing that argument by splitting the function into two
separate functions makes the intention clearer on the call site.  It
also removes the possibility for using the return value of Buf_Done,
which would have made no sense.

The function Buf_Done now pairs with Buf_Init, just as in HashTable and
Lst.

Even though Buf_Done is essentially a no-op, it is kept as a function,
both for symmetry with Buf_Init and for clearing the Buffer members
after use (this will be done only in CLEANUP mode, in a follow-up
commit).

Revision 1.264 / (download) - annotate - [select for diffs], Sun Jan 24 20:11:55 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.263: +28 -27 lines
Diff to previous 1.263 (colored) to selected 1.223 (colored)

make(1): convert SearchPath to struct

This prepares for making dotLast a simple struct member instead of a
fake CachedDir, which is easier to understand.

Revision 1.263 / (download) - annotate - [select for diffs], Sat Jan 23 12:36:02 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.262: +114 -94 lines
Diff to previous 1.262 (colored) to selected 1.223 (colored)

make(1): split Dir_FindFile into separate functions

Revision 1.262 / (download) - annotate - [select for diffs], Sat Jan 23 12:25:35 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.261: +4 -4 lines
Diff to previous 1.261 (colored) to selected 1.223 (colored)

make(1): remove the remaining beasts from the comments

Revision 1.261 / (download) - annotate - [select for diffs], Sat Jan 23 11:44:10 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.260: +7 -4 lines
Diff to previous 1.260 (colored) to selected 1.223 (colored)

make(1): extend comments in dir.c

Revision 1.260 / (download) - annotate - [select for diffs], Sat Jan 23 11:34:41 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.259: +11 -11 lines
Diff to previous 1.259 (colored) to selected 1.223 (colored)

make(1): rename Dir_AddDir, reorder parameters of SearchPath_ToFlags

Revision 1.259 / (download) - annotate - [select for diffs], Sat Jan 23 11:14:59 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.258: +53 -45 lines
Diff to previous 1.258 (colored) to selected 1.223 (colored)

make(1): extract SearchPath_ExpandMiddle from SearchPath_Expand

Revision 1.258 / (download) - annotate - [select for diffs], Sat Jan 23 11:06:04 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.257: +17 -16 lines
Diff to previous 1.257 (colored) to selected 1.223 (colored)

make(1): split local variable in SearchPath_Expand

Revision 1.257 / (download) - annotate - [select for diffs], Sat Jan 23 10:52:03 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.256: +23 -23 lines
Diff to previous 1.256 (colored) to selected 1.223 (colored)

make(1): rename parameter of SearchPath_Expand

Revision 1.256 / (download) - annotate - [select for diffs], Sat Jan 23 10:48:49 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.255: +7 -6 lines
Diff to previous 1.255 (colored) to selected 1.223 (colored)

make(1): rename Dir_Expand to SearchPath_Expand

The main subject of this function is the search path.  In this search
path the pattern is expanded.

Revision 1.255 / (download) - annotate - [select for diffs], Sun Jan 10 21:20:46 2021 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.254: +10 -8 lines
Diff to previous 1.254 (colored) to selected 1.223 (colored)

make(1): consistently use boolean expressions in conditions

Most of the make code already followed the style of explicitly writing
(ptr != NULL) instead of the shorter (ptr) in conditions.

The remaining 50 instances have been found by an experimental,
unpublished check in lint(1) that treats bool expressions as
incompatible to any other scalar type, just as in Java, C#, Pascal and
several other languages.

The only unsafe operation on Boolean that is left over is (flags &
FLAG), for an enum implementing a bit set.  If Boolean is an ordinary
integer type (the default), some high bits may get lost.  But if Boolean
is the same as _Bool (by compiling with -DUSE_C99_BOOLEAN), C99 6.3.1.2
defines that a conversion from any scalar to the type _Bool acts as a
comparison to 0, which cannot lose any bits.

Revision 1.254 / (download) - annotate - [select for diffs], Wed Dec 30 10:03:16 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.253: +70 -36 lines
Diff to previous 1.253 (colored) to selected 1.223 (colored)

make(1): format multi-line comments

Revision 1.253 / (download) - annotate - [select for diffs], Sun Dec 27 11:47:04 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.252: +3 -3 lines
Diff to previous 1.252 (colored) to selected 1.223 (colored)

make(1): exit 2 on technical errors

This allows the -q option to distinguish errors from out-of-date
targets.  Granted, it's an edge case but it should be solved
consistently anyway.

The majority of cases in which make exits with exit status 1, even in -q
mode, is when there are parse errors.  These have been kept as-is for
now as they affect many of the unit tests.

The technical errors, on the other hand, occur so rarely that it's hard
to write reliable tests for them that fail consistently on all platforms
supported by make.

Revision 1.252 / (download) - annotate - [select for diffs], Sun Dec 13 20:14:48 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.251: +7 -12 lines
Diff to previous 1.251 (colored) to selected 1.223 (colored)

make(1): add str_basename to reduce duplicate code

The function basename from POSIX has a few unfortunate properties, it is
allowed to return a pointer to static memory.  This is too unreliable,
therefore this trivial own implementation.

Revision 1.251 / (download) - annotate - [select for diffs], Sun Dec 6 18:13:17 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.250: +9 -16 lines
Diff to previous 1.250 (colored) to selected 1.223 (colored)

make(1): remove comment decoration

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

make(1): inline macros for debug logging

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

Revision 1.249 / (download) - annotate - [select for diffs], Fri Dec 4 14:39:56 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.248: +6 -5 lines
Diff to previous 1.248 (colored) to selected 1.223 (colored)

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

Revision 1.248 / (download) - annotate - [select for diffs], Fri Dec 4 14:28:50 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.247: +5 -5 lines
Diff to previous 1.247 (colored) to selected 1.223 (colored)

make(1): use fixed format for debug output of the directory cache

The previous output format had a %-20s conversion specifier.  This
produced different output depending on the length of the pathname, which
was too difficult to normalize.  By moving the directory name to the
end, it is no longer necessary to fill up any space, and the numbers are
always aligned properly.

As a result, 3 of the unit tests no longer need any special
postprocessing of their output.

Revision 1.247 / (download) - annotate - [select for diffs], Tue Dec 1 20:47:52 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.246: +7 -7 lines
Diff to previous 1.246 (colored) to selected 1.223 (colored)

make(1): rename local variable in Dir_SetPATH

The variable name should reflect the close relationship to the .DOTLAST
keyword that can be used in search paths.

Revision 1.246 / (download) - annotate - [select for diffs], Tue Dec 1 19:28:32 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.245: +2 -9 lines
Diff to previous 1.245 (colored) to selected 1.223 (colored)

make(1): remove Dir_InitDir

The function name had been too ambiguous since it didn't mention the
particular directory that was initialized.  Instead of that function,
Dir_InitCur is called directly from main_Init.

The pseudo CachedDir entry ".DOTLAST" is initialized at the very
beginning.  The observable behavior is unchanged since this a
memory-only object with no connection to the file system.

Revision 1.245 / (download) - annotate - [select for diffs], Mon Nov 30 20:25:37 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.244: +16 -26 lines
Diff to previous 1.244 (colored) to selected 1.223 (colored)

make(1): clean up variable names in Dir_FindFile

The special path entry is called .DOTLAST, therefore the local variable
should have the same name.

A variable named 'base' must not point to the slash of a pathname.  It
may only point to the character after the slash, everything else is
confusing, even if it's only for a brief moment.

Revision 1.244 / (download) - annotate - [select for diffs], Mon Nov 30 20:17:00 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.243: +7 -5 lines
Diff to previous 1.243 (colored) to selected 1.223 (colored)

make(1): document difference between 'cur' and 'dot'

Revision 1.243 / (download) - annotate - [select for diffs], Mon Nov 30 18:49:58 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.242: +4 -5 lines
Diff to previous 1.242 (colored) to selected 1.223 (colored)

make(1): fix memory leak for lstat cache in -DCLEANUP mode

Revision 1.242 / (download) - annotate - [select for diffs], Sun Nov 29 21:50:50 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.241: +13 -9 lines
Diff to previous 1.241 (colored) to selected 1.223 (colored)

make(1): initialize global variables in dir.c

Calling CachedDir_Assign requires that the variable be initialized.  On
most systems, NULL is represented as all-zero bits already.  This change
is only for the few other systems.

Add some comments explaining the implementation of Dir_AddDir since that
is tricky to read from the code alone.

Revision 1.241 / (download) - annotate - [select for diffs], Sun Nov 29 18:49:36 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.240: +41 -66 lines
Diff to previous 1.240 (colored) to selected 1.223 (colored)

make(1): clean up memory management for CachedDirs

Previously, the reference count for a newly created CacheDir had been
set to 1 in CacheNewDir.  This was wrong because at that point, the
object had not been referenced by any nonlocal variable.  The reference
count is no longer incremented at this point.

All callers of CacheNewDir either append the newly created CachedDir to
a SearchPath via Lst_Append and CachedDir_Ref, or they assign it to a
global variable via CachedDir_Assign.

Since the reference count is no longer wrongly incremented, it does not
need to be decremented more than necessary in Dir_End.  To keep the code
simple and maintainable, all assignments to global variables are now
handled by CachedDir_Assign.  Adding a CachedDir to a list is still done
manually via Lst_Append, and the corresponding code for decrementing is
in SearchPath_Clean and SearchPath_Free.  These details may be cleaned
up in a follow-up commit.

As a result, when OpenDirs_Done is called in the unit tests, the list of
open directories is empty.  It had been non-empty in a single unit test
before (dep-wildcards.mk), as a result of calling Dir_Expand.

The additional debug logging for the reference counting is not enabled
by default since it contains memory addresses, which makes the output
dependent on the memory allocator.

The function CachedDir_Destroy has been merged into CachedDir_Undef,
which had only been used in Dir_End before.  The new name emphasizes
that it corresponds to CachedDir_Ref.

Revision 1.240 / (download) - annotate - [select for diffs], Sun Nov 29 16:37:10 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.239: +20 -7 lines
Diff to previous 1.239 (colored) to selected 1.223 (colored)

make(1): fix the reference count of dotLast going negative

The memory management for dotLast is quite simple.  It is initialized
exactly once main_Init > Init_Objdir > Dir_InitDir and freed exactly
once in main_CleanUp > Dir_End.  Previously, dotLast was not freed at all.

The first call to CachedDir_Unref decremented the refCount to 0 but
didn't free anything.  Next, CachedDir_Destroy was called, which
decremented the reference count to -1, therefore skipping the actual
freeing.  This was probably an implementation mistake.

Since Dir_End is called at the very end of main_CleanUp, no code
accesses dotLast after it has been freed.

Revision 1.239 / (download) - annotate - [select for diffs], Sun Nov 29 16:04:34 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.238: +12 -13 lines
Diff to previous 1.238 (colored) to selected 1.223 (colored)

make(1): move CachedDir_Destroy up to the related functions

Revision 1.238 / (download) - annotate - [select for diffs], Sun Nov 29 15:58:37 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.237: +18 -11 lines
Diff to previous 1.237 (colored) to selected 1.223 (colored)

make(1): extract CachedDir_Free0 from CachedDir_Destroy

Revision 1.237 / (download) - annotate - [select for diffs], Sun Nov 29 15:14:32 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.236: +3 -12 lines
Diff to previous 1.236 (colored) to selected 1.223 (colored)

make(1): remove wrong comment in Dir_InitCur

In a makefile with repeated ".CURDIR=." lines, Dir_AddDir is called with
a NULL path, once per line.  Since the path is NULL, the search for
OpenDirs_Find is skipped and the directory is always read from disk.
The freshly read directory has a refCount of 1, and the refCount never
raises above 2.

In Dir_InitCur, the directory of the previous .CURDIR has a refCount of
2, which is decremented twice and then freed.  After this, the new
directory is placed in the global 'cur', after incrementing its refCount
to 2.

It still seems wrong that the refCount of 'cur' is 2 instead of 1, but
it works well.

Revision 1.236 / (download) - annotate - [select for diffs], Sun Nov 29 14:29:19 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.235: +6 -2 lines
Diff to previous 1.235 (colored) to selected 1.223 (colored)

make(1): add debug logging for OpenDirs_Done

Revision 1.235 / (download) - annotate - [select for diffs], Sun Nov 29 12:30:40 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.234: +58 -37 lines
Diff to previous 1.234 (colored) to selected 1.223 (colored)

make(1): extract CacheNewDir from Dir_AddDir

Change the debug output for directories that are not found.

Revision 1.234 / (download) - annotate - [select for diffs], Sun Nov 29 11:17:41 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.233: +4 -2 lines
Diff to previous 1.233 (colored) to selected 1.223 (colored)

make(1): make documentation of CachedDir.refCount more precise

Revision 1.233 / (download) - annotate - [select for diffs], Sun Nov 29 10:57:16 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.232: +63 -35 lines
Diff to previous 1.232 (colored) to selected 1.223 (colored)

make(1): add debug logging for reference counting of CachedDir

Revision 1.232 / (download) - annotate - [select for diffs], Sun Nov 29 09:51:39 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.231: +46 -42 lines
Diff to previous 1.231 (colored) to selected 1.223 (colored)

make(1): normalize order of declarations in dir.c

Revision 1.231 / (download) - annotate - [select for diffs], Sun Nov 29 09:42:54 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.230: +3 -12 lines
Diff to previous 1.230 (colored) to selected 1.223 (colored)

make(1): remove comment about returning const

The callers modify the reference count of the CachedDir, therefore it
must be modifiable.

Revision 1.230 / (download) - annotate - [select for diffs], Sun Nov 29 09:38:04 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.229: +11 -11 lines
Diff to previous 1.229 (colored) to selected 1.223 (colored)

make(1): rename Dir_Destroy to CachedDir_Destroy

It is no longer exported by the Dir module.

Revision 1.229 / (download) - annotate - [select for diffs], Sun Nov 29 08:48:24 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.228: +28 -2 lines
Diff to previous 1.228 (colored) to selected 1.223 (colored)

make(1): unexport CachedDir internals

Revision 1.228 / (download) - annotate - [select for diffs], Sun Nov 29 01:40:26 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.227: +7 -9 lines
Diff to previous 1.227 (colored) to selected 1.223 (colored)

make(1): reduce memory allocation for dirSearchPath

Revision 1.227 / (download) - annotate - [select for diffs], Sat Nov 28 23:22:14 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.226: +10 -10 lines
Diff to previous 1.226 (colored) to selected 1.223 (colored)

make(1): reduce memory allocation in OpenDirs

Revision 1.226 / (download) - annotate - [select for diffs], Sat Nov 28 22:59:53 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.225: +4 -5 lines
Diff to previous 1.225 (colored) to selected 1.223 (colored)

make(1): replace void pointer in Dir_Destroy with proper pointer

Revision 1.225 / (download) - annotate - [select for diffs], Sat Nov 28 22:56:01 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.224: +23 -6 lines
Diff to previous 1.224 (colored) to selected 1.223 (colored)

make(1): replace Dir_Destroy with SearchPath_Free

The function Dir_Destroy is an implementation detail of the cached
directories, and it should not be exported to the other modules.  The
search paths, on the other hand, are the high-level API that may be used
by the other modules, as the concept of search paths is documented in
the manual page.

Revision 1.224 / (download) - annotate - [select for diffs], Sat Nov 28 22:13:56 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.223: +12 -10 lines
Diff to previous 1.223 (colored)

make(1): rename some Dir functions to SearchPath

These functions have the search path as their main subject.

Revision 1.223 / (download) - annotate - [selected], Sat Nov 28 19:22:32 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.222: +3 -3 lines
Diff to previous 1.222 (colored)

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

Revision 1.222 / (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.221: +9 -9 lines
Diff to previous 1.221 (colored) to selected 1.223 (colored)

make(1): use comparisons in boolean expressions

The generated code stays exactly the same.

Revision 1.221 / (download) - annotate - [select for diffs], Mon Nov 23 23:00:36 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.220: +62 -62 lines
Diff to previous 1.220 (colored) to selected 1.223 (colored)

make(1): indent remaining functions in dir.c with tabs

Revision 1.220 / (download) - annotate - [select for diffs], Mon Nov 23 22:57:56 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.219: +47 -39 lines
Diff to previous 1.219 (colored) to selected 1.223 (colored)

make(1): extract ResolveMovedDepends from ResolveFullName

Revision 1.219 / (download) - annotate - [select for diffs], Mon Nov 23 22:31:04 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.218: +32 -19 lines
Diff to previous 1.218 (colored) to selected 1.223 (colored)

make(1): extract ResolveFullName from Dir_UpdateMTime

Revision 1.218 / (download) - annotate - [select for diffs], Mon Nov 23 22:14:54 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.217: +19 -11 lines
Diff to previous 1.217 (colored) to selected 1.223 (colored)

make(1): in Dir_Expand, don't re-use local variables

While here, add a few remarks from a previous attempt at flattening
the function.

Revision 1.217 / (download) - annotate - [select for diffs], Mon Nov 23 22:05:58 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.216: +26 -23 lines
Diff to previous 1.216 (colored) to selected 1.223 (colored)

make(1): update the deactivated code in Dir_FindFile

While here, reduce the scope of the variable ln.

Revision 1.216 / (download) - annotate - [select for diffs], Mon Nov 23 21:48:42 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.215: +80 -80 lines
Diff to previous 1.215 (colored) to selected 1.223 (colored)

make(1): indent Dir_Expand with tabs instead of spaces

Revision 1.215 / (download) - annotate - [select for diffs], Mon Nov 23 21:45:30 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.214: +85 -70 lines
Diff to previous 1.214 (colored) to selected 1.223 (colored)

make(1): flatten Dir_Expand

While here, leave comments in all places where unexpected edge cases
might have hidden.

Revision 1.214 / (download) - annotate - [select for diffs], Mon Nov 23 20:52:59 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.213: +5 -5 lines
Diff to previous 1.213 (colored) to selected 1.223 (colored)

make(1): use properly typed comparisons in boolean contexts

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

make(1): align end-of-line comments with tabs

Revision 1.212 / (download) - annotate - [select for diffs], Mon Nov 23 20:21:34 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.211: +708 -700 lines
Diff to previous 1.211 (colored) to selected 1.223 (colored)

make(1): indent dir.c using tabs instead of spaces

Except for Dir_Expand and Dir_UpdateMTime, which are nested too deeply
to use tabs right now.  They first have to be split into separate
functions.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Nov 23 18:24:05 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.210: +11 -11 lines
Diff to previous 1.210 (colored) to selected 1.223 (colored)

make(1): migrate CachedDir.files from HashTable to HashSet

Revision 1.210 / (download) - annotate - [select for diffs], Sat Nov 14 21:29:44 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.209: +8 -18 lines
Diff to previous 1.209 (colored) to selected 1.223 (colored)

make(1): replace a few HashTable_CreateEntry with HashTable_Set

Instead of HashTable_CreateEntry and HashEntry_Set, several places just
need the HashEntry for storing a value in it.  This makes the calling
code simpler to understand.

These parts of the code are already hard enough to understand since they
are about memory management and aliasing.  Having a too detailed API for
the HashTable only distracts from these topics.

Revision 1.209 / (download) - annotate - [select for diffs], Sat Nov 14 19:36:31 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.208: +3 -5 lines
Diff to previous 1.208 (colored) to selected 1.223 (colored)

make(1): inline local variable in Dir_UpdateMTime

Now that the signature of cached_stats is cleaned up, the line is short
enough to contain the whole condition.

Revision 1.208 / (download) - annotate - [select for diffs], Sat Nov 14 19:24:24 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.207: +35 -57 lines
Diff to previous 1.207 (colored) to selected 1.223 (colored)

make(1): remove redundant struct make_stat

In the cache for stat(2) and lstat(2), only one of the two timestamps
was ever used.  To prevent a result from stat(2) leaking into the cache
for lstat(2), there have been two completely separate caches all the
time.  Using different fields in the struct was therefore unnecessary.

By removing the redundant field, the internal struct in the cache is the
same as the external struct.  This makes one of them redundant, thus
struct make_stat has been renamed to cached_stat, which better describes
its purpose, and the internal struct cache_st has been removed.

Just as before, the cache prevents any direct access to its internal
data.  When passing it to the caller, it is copied.

Just as before, the field names of struct cached_stat cannot correspond
to those from struct stat, since the latter are often defined as macros.
Therefore they are prefixed with cst instead of st.

The redundancy had been added on 2020-06-05.

Revision 1.207 / (download) - annotate - [select for diffs], Sat Nov 14 11:51:58 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.206: +7 -6 lines
Diff to previous 1.206 (colored) to selected 1.223 (colored)

make(1): remove redundant parameter from cached_stats

The hash table for the cached data depends only on the passed flags,
therefore the caller does not need to know about their existence.

Revision 1.206 / (download) - annotate - [select for diffs], Sat Nov 14 11:22:17 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.205: +20 -16 lines
Diff to previous 1.205 (colored) to selected 1.223 (colored)

make(1): clean up cached_stats

No functional change.

Revision 1.205 / (download) - annotate - [select for diffs], Sat Nov 14 06:15:11 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.204: +10 -10 lines
Diff to previous 1.204 (colored) to selected 1.223 (colored)

make(1): clarify what 'recently' means in the comments in dir.c

Revision 1.204 / (download) - annotate - [select for diffs], Sat Nov 14 06:10:28 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.203: +3 -3 lines
Diff to previous 1.203 (colored) to selected 1.223 (colored)

make(1): fix typo in comments

This typo may have been influenced by all the '$' in the code.

Revision 1.203 / (download) - annotate - [select for diffs], Sat Nov 14 06:08:24 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.202: +25 -16 lines
Diff to previous 1.202 (colored) to selected 1.223 (colored)

make(1): flatten Dir_InitCur

Revision 1.202 / (download) - annotate - [select for diffs], Sun Nov 8 11:57:49 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.201: +5 -2 lines
Diff to previous 1.201 (colored) to selected 1.223 (colored)

make(1): document inefficient cache lookup in DirMatchFiles

Revision 1.201 / (download) - annotate - [select for diffs], Sun Nov 8 09:34:55 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.200: +20 -31 lines
Diff to previous 1.200 (colored) to selected 1.223 (colored)

make(1): change return type of Dir_MTime to void

Only some callers actually needed the updated time, and because of the
many branches, it was difficult to see that the return value was indeed
gn->mtime all the time.

Revision 1.200 / (download) - annotate - [select for diffs], Sun Nov 8 09:15:19 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.199: +4 -3 lines
Diff to previous 1.199 (colored) to selected 1.223 (colored)

make(1): change return type of Arch_MTime to void

This makes it easier to prove that Dir_MTime always returns gn->mtime,
without looking at the implementation of Arch_UpdateMTime.

Revision 1.199 / (download) - annotate - [select for diffs], Sun Nov 8 09:06:22 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.198: +4 -4 lines
Diff to previous 1.198 (colored) to selected 1.223 (colored)

make(1): change return type of Arch_MemberMTime to void

This makes it easier to prove that Dir_MTime always returns gn->mtime,
without looking at the implementation of Arch_UpdateMemberMTime.

Revision 1.198 / (download) - annotate - [select for diffs], Sat Nov 7 20:45:21 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.197: +13 -10 lines
Diff to previous 1.197 (colored) to selected 1.223 (colored)

make(1): use proper enum constant instead of 0 for CachedStatsFlags

Revision 1.197 / (download) - annotate - [select for diffs], Sat Nov 7 14:11:58 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.196: +3 -3 lines
Diff to previous 1.196 (colored) to selected 1.223 (colored)

make(1): make API of Buf_Init simpler

In most cases, the caller doesn't want to specify the exact number of
preallocated bytes.

Revision 1.196 / (download) - annotate - [select for diffs], Sat Nov 7 10:16:18 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.195: +6 -6 lines
Diff to previous 1.195 (colored) to selected 1.223 (colored)

make(1): clean up code stylistically

* Replace character literal 0 with '\0'.
* Replace pointer literal 0 with NULL.
* Remove redundant parentheses.
* Parentheses in multi-line conditions are not redundant at the
  beginning of a line.
* Replace a few !ptr with ptr == NULL.
* Replace a few ptr with ptr != NULL.
* Replace (expr & mask) == 0 with !(expr & mask).
* Remove redundant braces for blocks in cases where the generated code
  stays the same.  (Assertions further down in the code would get
  different line numbers.)
* Rename parameters in CondParser_String to reflect the data flow.
* Replace #ifdef notdef with #if 0.

The generated code stays exactly the same, at least with GCC 5.5.0 on
NetBSD 8.0 amd64 using the default configuration.

Revision 1.195 / (download) - annotate - [select for diffs], Fri Nov 6 23:59:21 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored) to selected 1.223 (colored)

make(1): rename Arch_MemMTime to Arch_MemberMTime

The abbreviation Mem was ambiguous, it could have meant memory as well.

Revision 1.194 / (download) - annotate - [select for diffs], Thu Nov 5 17:27:16 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.193: +6 -6 lines
Diff to previous 1.193 (colored) to selected 1.223 (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.193 / (download) - annotate - [select for diffs], Sat Oct 31 17:39:20 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.192: +5 -10 lines
Diff to previous 1.192 (colored) to selected 1.223 (colored)

make(1): remove dead code for filename expansion using curly braces

Any string containing curly braces is already handled in the very first
if statement.

Revision 1.192 / (download) - annotate - [select for diffs], Fri Oct 30 15:39:17 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.191: +3 -3 lines
Diff to previous 1.191 (colored) to selected 1.223 (colored)

make(1): fix indentation in source code

Revision 1.191 / (download) - annotate - [select for diffs], Tue Oct 27 06:55:18 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.190: +73 -77 lines
Diff to previous 1.190 (colored) to selected 1.223 (colored)

make(1): rewrap and reword the large comment for directory caching

Hashing the directories is not a problem at all, it's the caching that
makes things complicated.

Revision 1.190 / (download) - annotate - [select for diffs], Mon Oct 26 23:28:52 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.189: +12 -55 lines
Diff to previous 1.189 (colored) to selected 1.223 (colored)

make(1): remove "Results: none" from the documentation of void functions

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

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

Revision 1.188 / (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.187: +30 -29 lines
Diff to previous 1.187 (colored) to selected 1.223 (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.187 / (download) - annotate - [select for diffs], Sun Oct 25 10:00:20 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.186: +14 -17 lines
Diff to previous 1.186 (colored) to selected 1.223 (colored)

make(1): replace Dir_CopyDir with Dir_CopyDirSearchPath

Callback functions for the Lst functions do not belong in the public API
of a module.

Revision 1.186 / (download) - annotate - [select for diffs], Sun Oct 25 09:51:52 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.185: +8 -12 lines
Diff to previous 1.185 (colored) to selected 1.223 (colored)

make(1): clean up Dir_HasWildcards

Revision 1.185 / (download) - annotate - [select for diffs], Sun Oct 25 09:30:45 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.184: +14 -48 lines
Diff to previous 1.184 (colored) to selected 1.223 (colored)

make(1): clean up DirLookupSubdir and DirLookupAbs

As with cp2, the variable names p1 and p2 are not expressive.

Revision 1.184 / (download) - annotate - [select for diffs], Sun Oct 25 09:19:10 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.183: +8 -6 lines
Diff to previous 1.183 (colored) to selected 1.223 (colored)

make(1): omit trailing space in debug output for expanding file patterns

Revision 1.183 / (download) - annotate - [select for diffs], Sun Oct 25 09:10:46 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.182: +8 -27 lines
Diff to previous 1.182 (colored) to selected 1.223 (colored)

make(1): clean up documentation of DirExpandInt, rename it

The code in that function is so trivial that there is no point in
writing this much redundant documentation.

Revision 1.182 / (download) - annotate - [select for diffs], Sun Oct 25 09:03:05 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.181: +4 -3 lines
Diff to previous 1.181 (colored) to selected 1.223 (colored)

make(1): document pattern matching edge case in DirMatchFiles

Revision 1.181 / (download) - annotate - [select for diffs], Sun Oct 25 08:59:26 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.180: +37 -33 lines
Diff to previous 1.180 (colored) to selected 1.223 (colored)

make(1): refactor DirMatchFiles

Split the conditions since the comment only applies to one of them.
Use local variables for common subexpressions.

Revision 1.180 / (download) - annotate - [select for diffs], Sun Oct 25 08:10:03 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.179: +9 -32 lines
Diff to previous 1.179 (colored) to selected 1.223 (colored)

make(1): clean up documentation of DirExpandCurly and Dir_Expand

Revision 1.179 / (download) - annotate - [select for diffs], Sun Oct 25 07:59:09 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.178: +12 -18 lines
Diff to previous 1.178 (colored) to selected 1.223 (colored)

make(1): document that the SearchPath of Dir_FindFile may be NULL

Revision 1.178 / (download) - annotate - [select for diffs], Sun Oct 25 07:46:05 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.177: +10 -21 lines
Diff to previous 1.177 (colored) to selected 1.223 (colored)

make(1): remove unused parameter from DirFindDot

Revision 1.177 / (download) - annotate - [select for diffs], Sun Oct 25 07:44:16 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.176: +5 -5 lines
Diff to previous 1.176 (colored) to selected 1.223 (colored)

make(1): rename parameter of DirLookup

The DirLookup functions work on "name", which may be a complete path,
and on "base" or "cp", which is the basename of the file.  Don't use
"name" for the basename, since that would be confusing.

Revision 1.176 / (download) - annotate - [select for diffs], Sun Oct 25 07:32:07 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.175: +8 -20 lines
Diff to previous 1.175 (colored) to selected 1.223 (colored)

make(1): remove unused parameters from DirLookup

Revision 1.175 / (download) - annotate - [select for diffs], Sun Oct 25 07:27:06 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.174: +5 -3 lines
Diff to previous 1.174 (colored) to selected 1.223 (colored)

make(1): only define OpenDirs_Done if necessary

Revision 1.174 / (download) - annotate - [select for diffs], Sat Oct 24 23:27:33 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.173: +5 -9 lines
Diff to previous 1.173 (colored) to selected 1.223 (colored)

make(1): remove UNCONST from Dir_Expand

That code is called so seldom that one more memory allocation doesn't
hurt.  It needs a wildcard character in a dependency declaration, which
is rare in practice; see dep-wildcards.mk for an example.

Revision 1.173 / (download) - annotate - [select for diffs], Sat Oct 24 09:18:09 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.172: +9 -15 lines
Diff to previous 1.172 (colored) to selected 1.223 (colored)

make(1): inline DirFindName

Revision 1.172 / (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.171: +4 -5 lines
Diff to previous 1.171 (colored) to selected 1.223 (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.171 / (download) - annotate - [select for diffs], Mon Oct 19 21:57:37 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.170: +3 -3 lines
Diff to previous 1.170 (colored) to selected 1.223 (colored)

make(1): inline simple Lst getters

The function call variant takes more screen space than the direct field
access.  Having an abstract API is usually a good idea, in this case of
simple read-only member access it makes the code more difficult to read.

LstNode_Set has been kept as a function since it is not a read-only
accessor function.

Revision 1.170 / (download) - annotate - [select for diffs], Sun Oct 18 17:19:54 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.169: +3 -3 lines
Diff to previous 1.169 (colored) to selected 1.223 (colored)

make(1): add tags to enum types

This allows IDEs to offer better type information than "anonymous enum".

Revision 1.169 / (download) - annotate - [select for diffs], Sun Oct 18 14:36:09 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.168: +6 -8 lines
Diff to previous 1.168 (colored) to selected 1.223 (colored)

make(1): replace Lst_Open with simple iteration in Dir_SetPATH

Revision 1.168 / (download) - annotate - [select for diffs], Sun Oct 18 14:32:04 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.167: +14 -30 lines
Diff to previous 1.167 (colored) to selected 1.223 (colored)

make(1): replace Lst_Open with simple iteration in Dir_FindFile

Revision 1.167 / (download) - annotate - [select for diffs], Sun Oct 18 13:02:10 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.166: +5 -5 lines
Diff to previous 1.166 (colored) to selected 1.223 (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.166 / (download) - annotate - [select for diffs], Sun Oct 18 12:47:43 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.165: +6 -7 lines
Diff to previous 1.165 (colored) to selected 1.223 (colored)

make(1): rename HashEntry.name to key

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

make(1): remove underscore from Hash_Table and Hash_Entry

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

Revision 1.164 / (download) - annotate - [select for diffs], Sun Oct 18 10:44:25 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.163: +5 -7 lines
Diff to previous 1.163 (colored) to selected 1.223 (colored)

make(1): make API for iterating over hash tables simpler

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

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

Revision 1.162 / (download) - annotate - [select for diffs], Sat Oct 17 17:47:14 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.161: +6 -6 lines
Diff to previous 1.161 (colored) to selected 1.223 (colored)

make(1): fix indentation

Revision 1.161 / (download) - annotate - [select for diffs], Mon Oct 5 22:45:47 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.160: +19 -29 lines
Diff to previous 1.160 (colored) to selected 1.223 (colored)

make(1): remove pathname limit for Dir_FindHereOrAbove

While trying to compile the code with GCC's -Wformat-truncation, the
snprintf calls felt quite complicated.  The function Dir_FindHereOrAbove
is not in a bottleneck execution path, therefore it doesn't hurt to
dynamically allocate the memory instead of using size-limited stack
memory.

Revision 1.160 / (download) - annotate - [select for diffs], Mon Oct 5 20:21:30 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.159: +4 -4 lines
Diff to previous 1.159 (colored) to selected 1.223 (colored)

make(1): make dir.c, for.c and hash.c ready for WARNS=6

Some types have changed from int to unsigned int, size_t or time_t.

The variable i in hash.c has been kept as int since it counts down to
-1, which generates efficient machine code, at least on x86_64.

Revision 1.159 / (download) - annotate - [select for diffs], Mon Oct 5 19:30:37 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.158: +9 -3 lines
Diff to previous 1.158 (colored) to selected 1.223 (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.158 / (download) - annotate - [select for diffs], Mon Oct 5 19:27:47 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.157: +64 -24 lines
Diff to previous 1.157 (colored) to selected 1.223 (colored)

make(1): revert previous commit

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

Revision 1.157 / (download) - annotate - [select for diffs], Mon Oct 5 19:24:29 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.156: +24 -64 lines
Diff to previous 1.156 (colored) to selected 1.223 (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.156 / (download) - annotate - [select for diffs], Sat Oct 3 21:52:50 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.155: +2 -3 lines
Diff to previous 1.155 (colored) to selected 1.223 (colored)

make(1): clean up #include sections

Revision 1.155 / (download) - annotate - [select for diffs], Fri Oct 2 22:20:25 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.154: +64 -23 lines
Diff to previous 1.154 (colored) to selected 1.223 (colored)

make(1): use hash table for looking up open directories by name

As long as there are less than 20 open directories, it's perfectly fine
to use a doubly-linked list for name lookup.  A singly linked list or
even an array list would have been better, but anyway.

When the number of directories rises above 1000, which happens with
dirdeps.mk, linear list lookup becomes too expensive, especially since
each list entry is compared using a strcmp call, in a callback function
that is not inlined.

Using a hash table is much more efficient than linear lookup.  While
here, abstract all operations regarding the openDirectories list into a
new data type that provides a simple and straight-forward API.  This
strongly typed API is especially important since the current
implementation of the list and hash table is weakly typed, using void *
for the actual data, and StringList and CachedDirList refer to the
exactly same type, they just have different names to help the human
readers but don't provide any type safety.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Oct 1 22:42:00 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.153: +2 -9 lines
Diff to previous 1.153 (colored) to selected 1.223 (colored)

make(1): remove redundant function prototypes

Revision 1.153 / (download) - annotate - [select for diffs], Mon Sep 28 23:13:57 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.152: +27 -27 lines
Diff to previous 1.152 (colored) to selected 1.223 (colored)

make(1): replace += 1 with ++ and -= 1 with --

Just for visual consistency.  The generated code stays exactly the same.

Revision 1.152 / (download) - annotate - [select for diffs], Mon Sep 28 22:23:35 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.151: +12 -13 lines
Diff to previous 1.151 (colored) to selected 1.223 (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.151 / (download) - annotate - [select for diffs], Mon Sep 28 20:46:11 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.150: +5 -11 lines
Diff to previous 1.150 (colored) to selected 1.223 (colored)

make(1): make debugging code shorter

Revision 1.150 / (download) - annotate - [select for diffs], Sun Sep 27 22:17:07 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.149: +11 -21 lines
Diff to previous 1.149 (colored) to selected 1.223 (colored)

make(1): improve documentation of CachedDir and Dir_AddDir

Revision 1.149 / (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.148: +34 -32 lines
Diff to previous 1.148 (colored) to selected 1.223 (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.148 / (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.147: +6 -7 lines
Diff to previous 1.147 (colored) to selected 1.223 (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.147 / (download) - annotate - [select for diffs], Fri Sep 25 06:49:13 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.146: +11 -18 lines
Diff to previous 1.146 (colored) to selected 1.223 (colored)

make(1): replace a few calls to Lst_Open with simple loops

This avoids relying on the internal iterator of the list, which is
supposed to be removed in the near future.

Revision 1.146 / (download) - annotate - [select for diffs], Thu Sep 24 07:49:58 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.145: +17 -24 lines
Diff to previous 1.145 (colored) to selected 1.223 (colored)

make(1): inline Lst_ForEach for debugging output in search paths

Revision 1.145 / (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.144: +6 -6 lines
Diff to previous 1.144 (colored) to selected 1.223 (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.144 / (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.143: +34 -28 lines
Diff to previous 1.143 (colored) to selected 1.223 (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.143 / (download) - annotate - [select for diffs], Tue Sep 22 02:26:22 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.142: +108 -106 lines
Diff to previous 1.142 (colored) to selected 1.223 (colored)

make(1): rename type Path to CachedDir

The word "path" is commonly used either as an abbreviation for pathname
(a string consisting of several directory or file names) or as an
abbreviation for search path (a list of directory names used for
searching files), but not for a single directory.

Revision 1.142 / (download) - annotate - [select for diffs], Sun Sep 13 15:15:51 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.141: +3 -14 lines
Diff to previous 1.141 (colored) to selected 1.223 (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.141 / (download) - annotate - [select for diffs], Sat Sep 12 23:12:44 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.140: +7 -6 lines
Diff to previous 1.140 (colored) to selected 1.223 (colored)

make(1): fix assertion failure in Dir_Destroy in -DCLEANUP mode

When the openDirectories path list is cleaned up, each path from it is
first dequeued and then freed via Dir_Destroy.  At this point, the path
is no longer in openDirectories, which triggered an assertion in
Lst_Remove, called by Dir_Destroy.

Revision 1.140 / (download) - annotate - [select for diffs], Sat Sep 12 12:24:21 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.139: +7 -7 lines
Diff to previous 1.139 (colored) to selected 1.223 (colored)

make(1): fix indentation in dir.c

Revision 1.139 / (download) - annotate - [select for diffs], Sat Sep 12 12:15:22 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.138: +23 -23 lines
Diff to previous 1.138 (colored) to selected 1.223 (colored)

make(1): rename local variable in Dir_FindFile

The name "cp" is not appropriate for a variable containing the basename
of a path.

Revision 1.138 / (download) - annotate - [select for diffs], Fri Sep 11 04:32:39 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.137: +4 -4 lines
Diff to previous 1.137 (colored) to selected 1.223 (colored)

make(1): replace *a->b with a->b[0]

This allows the code to be read strictly from left to right.  In most
places this style was already used.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Sep 7 19:48:08 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.136: +3 -4 lines
Diff to previous 1.136 (colored) to selected 1.223 (colored)

make(1): document that nested braces work as expected now

Revision 1.136 / (download) - annotate - [select for diffs], Sat Sep 5 13:55:08 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.135: +7 -7 lines
Diff to previous 1.135 (colored) to selected 1.223 (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.135 / (download) - annotate - [select for diffs], Wed Sep 2 04:32:13 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.134: +6 -6 lines
Diff to previous 1.134 (colored) to selected 1.223 (colored)

make(1): fix cached_stat for files with st_mtime 0

Revision 1.134 / (download) - annotate - [select for diffs], Wed Sep 2 04:19:52 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.133: +6 -3 lines
Diff to previous 1.133 (colored) to selected 1.223 (colored)

make(1): fix aliasing problem in cached_stat from the previous commit

When the struct stat was used for both calling the actual stat and for
returning the result, no copying was needed.  This also had the side
effect that for the first call of cached_stat, the returned struct stat
included all the fields properly filled in, and on later calls, these
fields were all zeroed out.

These two variables are separate now, thus the fields need to be copied
explicitly.  There are no existing unit tests for this, but ./build.sh
failed reliably.

Revision 1.133 / (download) - annotate - [select for diffs], Wed Sep 2 04:08:54 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.132: +32 -31 lines
Diff to previous 1.132 (colored) to selected 1.223 (colored)

make(1): reduce number of stat fields returned by cached_stat

Only st_mtime and st_mode are actually filled, the remaining fields had
been set to zero.  To prevent these from ever being accessed, a custom
struct make_stat replaces the previously used struct stat.

The fields in struct make_stat are intentionally named different from
the fields in struct stat because NetBSD and some other operating
systems define st_mtime as a macro, and that would not work in a field
declaration.

Revision 1.132 / (download) - annotate - [select for diffs], Wed Sep 2 03:28:12 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.131: +5 -5 lines
Diff to previous 1.131 (colored) to selected 1.223 (colored)

make(1): use proper types in API of cached_stat and cached_lstat

Revision 1.131 / (download) - annotate - [select for diffs], Wed Sep 2 03:15:21 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.130: +9 -9 lines
Diff to previous 1.130 (colored) to selected 1.223 (colored)

make(1): use Hash API from dir.c

When the Hash struct fields are renamed the next time, this should not
influence any code outside hash.h and hash.c.

Revision 1.130 / (download) - annotate - [select for diffs], Tue Sep 1 21:11:31 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.129: +8 -8 lines
Diff to previous 1.129 (colored) to selected 1.223 (colored)

make(1): rename Hash_Table fields

Back in the 1980s it made sense to have the type information encoded in
the variable names.  At the time when make was imported into the NetBSD
tree (1993-03-21), the functions did indeed not have prototypes, they
only had return types.  The void type was already invented at that time.
Since the compiler could not verify the types of function parameters, it
made perfect sense to have each variable tell whether it was a pointer
or not.

Since ISO C90 this is no longer necessary since the compiler checks
this.  The variable names can now focus on the application level and
their high-level meaning, expressing the relationship to other
variables instead of encoding redundant type information.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Sep 1 20:17:18 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.128: +19 -24 lines
Diff to previous 1.128 (colored) to selected 1.223 (colored)

make(1): improve variable names and data types in Dir_FindHereOrAbove

Revision 1.128 / (download) - annotate - [select for diffs], Tue Sep 1 17:56:32 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.127: +15 -14 lines
Diff to previous 1.127 (colored) to selected 1.223 (colored)

make(1): make data types in Dir_HasWildcards more precise

Revision 1.127 / (download) - annotate - [select for diffs], Sun Aug 30 14:11:42 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.126: +4 -4 lines
Diff to previous 1.126 (colored) to selected 1.223 (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.126 / (download) - annotate - [select for diffs], Sun Aug 30 11:15:05 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.125: +16 -16 lines
Diff to previous 1.125 (colored) to selected 1.223 (colored)

make(1): rename Lst_Datum to LstNode_Datum

Revision 1.125 / (download) - annotate - [select for diffs], Sun Aug 30 11:12:05 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.124: +7 -7 lines
Diff to previous 1.124 (colored) to selected 1.223 (colored)

make(1): rename Lst_Memeber to Lst_FindDatum

The new name nicely aligns with Lst_Find and Lst_FindFrom.

Revision 1.124 / (download) - annotate - [select for diffs], Sat Aug 29 12:39:32 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.123: +12 -40 lines
Diff to previous 1.123 (colored) to selected 1.223 (colored)

make(1): clean up comments in dir.c

Revision 1.123 / (download) - annotate - [select for diffs], Sat Aug 29 10:41:12 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.122: +4 -4 lines
Diff to previous 1.122 (colored) to selected 1.223 (colored)

make(1): rename LstNode functions to match their type

Revision 1.122 / (download) - annotate - [select for diffs], Sat Aug 29 10:12:06 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.121: +6 -6 lines
Diff to previous 1.121 (colored) to selected 1.223 (colored)

make(1): rename Lst_FindB back to Lst_Find

The migration from "comparison function" to "match function" is done,
the "B" in the names is no longer needed.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Aug 29 09:30:10 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.120: +11 -27 lines
Diff to previous 1.120 (colored) to selected 1.223 (colored)

make(1): start replacing Lst_Find with Lst_FindB

Lst_Find is called with a "comparison" function that returns the integer
0 if the desired node is found.  This leads to confusion since there are
so many different return value conventions for int, such as 0/1 for
mimicking false/true, -1/0 as in close(2), and the sign as in strcmp(3).
This API is much easier to understand if the "comparison" function is
not called a comparison function (since that is too close to strcmp),
but a "match" function that just returns a boolean.

In Lst_FindFromB, the node argument may be null.  This deviates from the
other Lst functions, which require Lst and LstNode to generally be
non-null.  In this case it is useful though to make the calling code
simpler.

In arch.c, this makes a lot of the previous documentation redundant.

In cond.c, the documentation is reduced a little bit since it had
already been cleaned up before.  It also removes the strange negation
from CondFindStrMatch.

In dir.c, the documentation collapses as well.

In main.c, separating the ReadMakefile function from the callbacks for
Lst_FindB allows the former to get back its natural function signature,
with proper types and no unused parameters.

To catch any accidental mistakes during the migration from Lst_Find to
Lst_FindB, the code can be compiled with -DUSE_DOUBLE_BOOLEAN, which
will complain about incompatible function pointer types.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Aug 28 04:59:17 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.119: +35 -38 lines
Diff to previous 1.119 (colored) to selected 1.223 (colored)

make(1): clean up Dir_AddDir

Extract the null check for path to the top level.  This has the
side-effect of only incrementing dotLast.refCount if that entry is
actually used.

Reduce the indentation of the code by returning early from the simple
branches.

Revision 1.119 / (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.118: +70 -70 lines
Diff to previous 1.118 (colored) to selected 1.223 (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.118 / (download) - annotate - [select for diffs], Fri Aug 28 04:28:45 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.117: +7 -5 lines
Diff to previous 1.117 (colored) to selected 1.223 (colored)

make(1): migrate Lst_Find to Lst_FindS

Revision 1.117 / (download) - annotate - [select for diffs], Fri Aug 28 04:16:57 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.116: +4 -4 lines
Diff to previous 1.116 (colored) to selected 1.223 (colored)

make(1): remove unused reference to Lst_Last

Revision 1.116 / (download) - annotate - [select for diffs], Fri Aug 28 04:14:31 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.115: +6 -6 lines
Diff to previous 1.115 (colored) to selected 1.223 (colored)

make(1): migrate Lst_First to Lst_FirstS

Revision 1.115 / (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.114: +5 -5 lines
Diff to previous 1.114 (colored) to selected 1.223 (colored)

make(1): migrate Lst_IsEmpty to Lst_IsEmptyS

Revision 1.114 / (download) - annotate - [select for diffs], Thu Aug 27 07:00:29 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.113: +4 -4 lines
Diff to previous 1.113 (colored) to selected 1.223 (colored)

make(1): migrate Lst_Succ to Lst_SuccS

Revision 1.113 / (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.112: +5 -5 lines
Diff to previous 1.112 (colored) to selected 1.223 (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.112 / (download) - annotate - [select for diffs], Thu Aug 27 06:28:44 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.111: +22 -19 lines
Diff to previous 1.111 (colored) to selected 1.223 (colored)

make(1): migrate remaining code from Lst_Open to Lst_OpenS

Revision 1.111 / (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.110: +6 -6 lines
Diff to previous 1.110 (colored) to selected 1.223 (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.110 / (download) - annotate - [select for diffs], Sun Aug 23 16:58:02 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.109: +5 -5 lines
Diff to previous 1.109 (colored) to selected 1.223 (colored)

make(1): reverse order of the Lst_Find parameters

The other callbacks all have (function, param), only the Lst_Find had
(param, function), which was inconsistent.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Aug 22 23:06:51 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.108: +7 -4 lines
Diff to previous 1.108 (colored) to selected 1.223 (colored)

make(1): migrate Lst_AtFront to Lst_PrependS

This makes Lst_AtFront unused, as well as LstInsertBefore.

Revision 1.108 / (download) - annotate - [select for diffs], Sat Aug 22 22:57:53 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.107: +4 -8 lines
Diff to previous 1.107 (colored) to selected 1.223 (colored)

make(1): replace Lst_Duplicate with Lst_CopyS

Lst_Duplicate would have passed through any null pointer, which was not
needed for make.  It was the last function that used Lst_AtEnd, which in
turn was the last function that used LstInsertAfter.  As a result, these
two functions have been removed.

Revision 1.107 / (download) - annotate - [select for diffs], Sat Aug 22 19:57:43 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.106: +31 -32 lines
Diff to previous 1.106 (colored) to selected 1.223 (colored)

make(1): use Lst_OpenS in Dir_SetPATH

Since dirSearchPath is initialized in Dir_Init, opening the list can
never fail.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Aug 22 17:34:25 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.105: +5 -5 lines
Diff to previous 1.105 (colored) to selected 1.223 (colored)

make(1): fix indentation

Revision 1.105 / (download) - annotate - [select for diffs], Sat Aug 22 15:55:22 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.104: +10 -5 lines
Diff to previous 1.104 (colored) to selected 1.223 (colored)

make(1): extract percentage calculation out of Dir_PrintDirectories

Revision 1.104 / (download) - annotate - [select for diffs], Sat Aug 22 15:43:32 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.103: +7 -7 lines
Diff to previous 1.103 (colored) to selected 1.223 (colored)

make(1): require argument of Lst_Member to be non-null

Since the lists don't contain null pointers, it doesn't make sense to
search for a null pointer.  All calls but one already had obviously
non-null arguments.  The one remaining call using targ->suff has been
guarded for now.

The code for Lst_Member became much simpler than before.  Partly because
the old code had an extra condition for circular lists, which are not
used by make.

Revision 1.103 / (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.102: +16 -17 lines
Diff to previous 1.102 (colored) to selected 1.223 (colored)

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

Revision 1.102 / (download) - annotate - [select for diffs], Sat Aug 22 14:39:12 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.101: +4 -5 lines
Diff to previous 1.101 (colored) to selected 1.223 (colored)

make(1): convert Lst_Enqueue and Lst_Dequeue to nonnull variants

Except for once instance in parse.c, the usage pattern for Lst_Dequeue
was to first test whether the list is empty.  This pattern allowed the
implementation of Lst_Dequeue to become simpler since the null check is
not needed anymore.

The calls to Lst_Enqueue never pass an invalid list or a null pointer,
therefore making them strict was trivial.

Revision 1.101 / (download) - annotate - [select for diffs], Sat Aug 22 14:04:22 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.100: +4 -9 lines
Diff to previous 1.100 (colored) to selected 1.223 (colored)

make(1): remove wrong comment for Dir_Init

Neither the list nor the hash table modules have anything to do with
opening directories.

Revision 1.100 / (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.99: +10 -10 lines
Diff to previous 1.99 (colored) to selected 1.223 (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.99 / (download) - annotate - [select for diffs], Sat Aug 22 09:40:18 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.98: +4 -4 lines
Diff to previous 1.98 (colored) to selected 1.223 (colored)

make(1): add Lst_Append to add an item at the end of the list

The previous variant of using a special case of Lst_InsertAfter was
unnecessarily complicated.  Linked lists are a very basic data
structure, and there is no need to overcomplicate things by introducing
unnecessary conditions and branches.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Aug 22 09:03:53 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.97: +4 -9 lines
Diff to previous 1.97 (colored) to selected 1.223 (colored)

make(1): remove unused return value for DirMatchFiles

Revision 1.97 / (download) - annotate - [select for diffs], Sat Aug 22 00:48:02 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.96: +15 -20 lines
Diff to previous 1.96 (colored) to selected 1.223 (colored)

make(1): split Dir_Init into two functions

There's just no point in having a function consisting of a big
if-then-else.

Revision 1.96 / (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.95: +17 -17 lines
Diff to previous 1.95 (colored) to selected 1.223 (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.95 / (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.94: +10 -10 lines
Diff to previous 1.94 (colored) to selected 1.223 (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.94 / (download) - annotate - [select for diffs], Fri Aug 21 03:36:03 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.93: +5 -5 lines
Diff to previous 1.93 (colored) to selected 1.223 (colored)

make(1): make list library code stricter

Up to now, the list library didn't distinguish between programming
mistakes (violations of invariants, illegal parameter values) and
actually interesting situations like "element not found in list".

The current code contains many branches for conditions that are neither
exercised by the unit tests nor by real-world usage.  There is no point
in keeping this unnecessary code.

The list functions will be migrated from their lenient variants to the
stricter variants in small parts, each function getting the S suffix
when it is made strict, to avoid any confusion about how strict a
particular function is.  When all functions have been migrated, they
will be renamed back to their original names.

While here, the comments of the functions are cleaned up since they
mention irrelevant implementation details in the API comments, as well
as "side effects" that are really main effects.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Aug 21 02:20:47 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.92: +6 -6 lines
Diff to previous 1.92 (colored) to selected 1.223 (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.92 / (download) - annotate - [select for diffs], Thu Aug 13 03:33:56 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.91: +44 -92 lines
Diff to previous 1.91 (colored) to selected 1.223 (colored)

make(1): clean up debug logging in dir.c

In C90, the variadic macro argument __VA_ARGS__ is not known, therefore
fall back to the forms listing the number of actual printf arguments.

Revision 1.91 / (download) - annotate - [select for diffs], Thu Aug 13 03:07:49 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.90: +13 -5 lines
Diff to previous 1.90 (colored) to selected 1.223 (colored)

make(1): avoid negated conditions in DirExpandCurly

Revision 1.90 / (download) - annotate - [select for diffs], Thu Aug 13 03:00:44 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.89: +8 -23 lines
Diff to previous 1.89 (colored) to selected 1.223 (colored)

make(1): clean up DirExpandCurly

Now that nested curly braces work as expected and are covered by unit
tests, the debug log is no longer necessary.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Aug 13 02:53:15 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.88: +14 -9 lines
Diff to previous 1.88 (colored) to selected 1.223 (colored)

make(1): use enum instead of #define for cached_stats

Revision 1.88 / (download) - annotate - [select for diffs], Wed Aug 12 03:05:57 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.87: +10 -14 lines
Diff to previous 1.87 (colored) to selected 1.223 (colored)

make(1): make Dir_MakeFlags simpler

This avoids unnecessary string allocations, especially for long lists.

There is no unit test to cover this code.  Since this is an obscure,
undocumented part of make, I wasn't able to come up with a unit test.
Therefore I resorted to write a separate testing program to verify the
expected results.

$ cat <<'EOF' >dir_test.c
#include <stdio.h>

#include "make.h"
#include "dir.h"

int main(int argc, char **argv)
{
    int i;
    Lst lst;
    char *flags;

    lst = Lst_Init(FALSE);
    for (i = 1; i < argc; i++)
    	Dir_AddDir(lst, argv[i]);
    flags = Dir_MakeFlags("-I", lst);

    printf("%s\n", flags);
    free(flags);
    return 0;
}
EOF

# Needs some trivial patches to Makefile and main.c
$ make PROG=dir_test EXTRA_SRCS=dir_test.c EXTRA_CPPFLAGS=-DNO_MAIN \
       COPTS.main.c=-Wno-unused-function NOMAN=1

$ ./dir_test a b c

$ mkdir a b c
$ ./dir_test a b c
 -Ia -Ib -Ic
$ rmdir a b c

Revision 1.87 / (download) - annotate - [select for diffs], Mon Aug 10 19:53:19 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.86: +9 -10 lines
Diff to previous 1.86 (colored) to selected 1.223 (colored)

make(1): replace str_concat with str_concat2 and str_concat3

The new functions have a simpler interface, and str_concat3 is even more
general-purpose, since the middle string is no longer required to be
exactly of length 1.

Revision 1.86 / (download) - annotate - [select for diffs], Mon Aug 10 19:30:30 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.85: +4 -4 lines
Diff to previous 1.85 (colored) to selected 1.223 (colored)

make(1): fix parameter name of str_concat

The previous documentation mentioned Str_Concat, but str_concat has been
written in lowercase for years.  The "flags" are not flags since they
cannot be combined, not even when they are written in hex.

Revision 1.85 / (download) - annotate - [select for diffs], Sun Aug 9 19:51:02 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.84: +240 -239 lines
Diff to previous 1.84 (colored) to selected 1.223 (colored)

make(1): format the source code consistently, at least per file

Some files use 4 spaces per indentation level, others use 8.  At least
for the few files from this commit, they use a consistent style
throughout each file now.

In Cond_Eval, the #define has changed into an enum since the identifiers
need not be visible to the C preprocessor.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Aug 3 20:26:09 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.83: +13 -8 lines
Diff to previous 1.83 (colored) to selected 1.223 (colored)

make(1): no declaration-after-statement anymore

NetBSD make is intended to be maximally portable, therefore it uses only
C89.  This was not declared in the Makefile before.

There are still a few places in parse.c and metachar.c that use
end-of-line comments.  These will be fixed in a follow-up commit.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Aug 1 14:47:49 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.82: +6 -6 lines
Diff to previous 1.82 (colored) to selected 1.223 (colored)

make(1): use consistent indentation in source code

Tabs for multiples of 8, then spaces.

The usage string has been kept as-is since the spaces there are
indentional and do influence the output.

Revision 1.82 / (download) - annotate - [select for diffs], Fri Jul 31 20:57:38 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.81: +4 -3 lines
Diff to previous 1.81 (colored) to selected 1.223 (colored)

make(1): document another instance of undefined behavior

The UNCONST macro is really terrible.

This segmentation fault can be forced by setting _PATH_DEFSYSMK in
pathnames.h to "./sys*.mk" or any other string that has a slash and a
wildcard to the right of the slash.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Jul 31 20:02:44 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.80: +4 -4 lines
Diff to previous 1.80 (colored) to selected 1.223 (colored)

make(1): fix regression and add test for empty brace expansion

This had been broken in r1.80 of dir.c, a few minutes ago.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Jul 31 19:50:44 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.79: +92 -88 lines
Diff to previous 1.79 (colored) to selected 1.223 (colored)

make(1): refactor DirExpandCurly

Separating the low-level parts into small functions reduces the need for
summarizing comments between the code lines.

Using a consistent naming scheme for the variables and expressive names
makes the code easier to understand.  The number of variables has
increased from 7 to 11, their clearer names compensate for that, plus
the fact that they come in triples (x, x_end, x_len). Placing the
variables into appropriate registers and eliminating memory access is
left as an exercise to the compiler.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Jul 31 19:06:33 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.78: +9 -8 lines
Diff to previous 1.78 (colored) to selected 1.223 (colored)

make(1): fix parsing of nested braces in dependency lines

Before, make could not parse {{thi,fou}r,fif}teen properly. It did
correctly split up the outer brace into "" + "{thi,fou}r,fif" + "teen",
but then, when expanding the inner braces, it interpreted the first
comma already as a separator, even though this comma was enclosed in
another set of braces.

This resulted in the wrong expansion "{thiteen", which produced the
error message.  The next word "fouteen" was produced since the parser
stopped at the next closing brace.  After this, parsing continued after
the closing brace, producing "rteen".  Finally, the last expansion was
the correct "fifteen".

Revision 1.78 / (download) - annotate - [select for diffs], Fri Jul 31 17:41:35 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.77: +14 -6 lines
Diff to previous 1.77 (colored) to selected 1.223 (colored)

make(1): trying to understand how DirExpandCurly works

Revision 1.77 / (download) - annotate - [select for diffs], Fri Jul 31 16:59:34 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.76: +9 -6 lines
Diff to previous 1.76 (colored) to selected 1.223 (colored)

make(1): prefer memcpy over strncpy in DirExpandCurly

strncpy has unnecessary overhead when the source memory is already
guaranteed to contain no '\0'.

Revision 1.76 / (download) - annotate - [select for diffs], Fri Jul 3 08:13:23 2020 UTC (3 years, 9 months ago) by rillig
Branch: MAIN
Changes since 1.75: +16 -16 lines
Diff to previous 1.75 (colored) to selected 1.223 (colored)

make(1): remove trailing whitespace

Revision 1.75 / (download) - annotate - [select for diffs], Fri Jul 3 08:02:55 2020 UTC (3 years, 9 months ago) by rillig
Branch: MAIN
Changes since 1.74: +15 -15 lines
Diff to previous 1.74 (colored) to selected 1.223 (colored)

make(1): remove redundant parentheses around return values

Revision 1.74 / (download) - annotate - [select for diffs], Fri Jun 5 18:03:59 2020 UTC (3 years, 10 months ago) by sjg
Branch: MAIN
Changes since 1.73: +20 -11 lines
Diff to previous 1.73 (colored) to selected 1.223 (colored)

cached_stats: do not conflate stat and lstat

While make uses lstat quite rarely, it does so for reason.
Avoid confusing the results.

Reviewed by: christos

Revision 1.71.12.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:10:21 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.71: +18 -49 lines
Diff to previous 1.71 (colored) next main 1.72 (colored) to selected 1.223 (colored)

Sync with HEAD

Revision 1.71.10.1 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:14 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.71: +18 -49 lines
Diff to previous 1.71 (colored) next main 1.72 (colored) to selected 1.223 (colored)

Sync with HEAD

Revision 1.73 / (download) - annotate - [select for diffs], Thu Jul 12 18:03:31 2018 UTC (5 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, 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, is-mlppp-base, is-mlppp
Changes since 1.72: +16 -24 lines
Diff to previous 1.72 (colored) to selected 1.223 (colored)

Fix previous: cached_stats() returning < 0 means that the file is not found,
not that it was found in the cache, and centralize reporting.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Jul 12 17:46:37 2018 UTC (5 years, 9 months ago) by reinoud
Branch: MAIN
Changes since 1.71: +8 -31 lines
Diff to previous 1.71 (colored) to selected 1.223 (colored)

Remove duplicate code in make(1)'s dir.c.

When the cached_stats() code was added, some old logic stayed around that
implements the cached_stats() too.

Revision 1.68.2.2 / (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.68.2.1: +28 -12 lines
Diff to previous 1.68.2.1 (colored) to branchpoint 1.68 (colored) next main 1.69 (colored) to selected 1.223 (colored)

Sync with HEAD

Revision 1.68.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.68: +35 -17 lines
Diff to previous 1.68 (colored) next main 1.69 (colored) to selected 1.223 (colored)

Sync with HEAD

Revision 1.71 / (download) - annotate - [select for diffs], Sun Apr 16 21:14:47 2017 UTC (7 years ago) by riastradh
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-20170426, pgoyette-compat-base, 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, perseant-stdc-iso10646-base, perseant-stdc-iso10646, 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, bouyer-socketcan-base1
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.70: +24 -8 lines
Diff to previous 1.70 (colored) to selected 1.223 (colored)

Plug memory leaks in Dir_FindFile.

CID 978364

Revision 1.70 / (download) - annotate - [select for diffs], Sun Apr 16 19:53:58 2017 UTC (7 years ago) by riastradh
Branch: MAIN
Changes since 1.69: +7 -7 lines
Diff to previous 1.69 (colored) to selected 1.223 (colored)

Use, don't kludge, MAKE_ATTR_UNUSED.

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

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:58:04 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.68: +10 -8 lines
Diff to previous 1.68 (colored) to selected 1.223 (colored)

Sync with HEAD

Revision 1.69 / (download) - annotate - [select for diffs], Tue Jan 31 06:54:23 2017 UTC (7 years, 2 months ago) by sjg
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.68: +10 -8 lines
Diff to previous 1.68 (colored) to selected 1.223 (colored)

Partially initialize Dir before MainParseArgs can be called.

The rest can be done once curdir is finalized.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jun 7 00:40:00 2016 UTC (7 years, 10 months ago) by sjg
Branch: MAIN
CVS Tags: pgoyette-localcount-base, 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.67: +86 -29 lines
Diff to previous 1.67 (colored) to selected 1.223 (colored)

Extend the mtimes cache used by dir.c so it can be used by others.

We store both st_mtime and st_mode, since some callers care about the
later.

Reviewed by: christos

Revision 1.63.4.3 / (download) - annotate - [select for diffs], Thu May 22 11:42:45 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.63.4.2: +9 -6 lines
Diff to previous 1.63.4.2 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored) to selected 1.223 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:29:00 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.65: +9 -6 lines
Diff to previous 1.65 (colored) next main 1.66 (colored) to selected 1.223 (colored)

resync from head

Revision 1.67 / (download) - annotate - [select for diffs], Tue Mar 5 22:01:43 2013 UTC (11 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, 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-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, 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, netbsd-7, agc-symver-base, agc-symver
Changes since 1.66: +9 -7 lines
Diff to previous 1.66 (colored) to selected 1.223 (colored)

Add a .STALE special target that gets invoked when dependency files contain
stail entries.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Mar 5 02:04:10 2013 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.65: +6 -5 lines
Diff to previous 1.65 (colored) to selected 1.223 (colored)

Keep track of the location where a dependency is defined, so we can report
about it.

Revision 1.63.4.2 / (download) - annotate - [select for diffs], Tue Oct 30 19:00:21 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.63.4.1: +6 -6 lines
Diff to previous 1.63.4.1 (colored) to branchpoint 1.63 (colored) to selected 1.223 (colored)

sync with head

Revision 1.65 / (download) - annotate - [select for diffs], Tue Jun 12 19:21:50 2012 UTC (11 years, 10 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, dholland-make-base
Branch point for: tls-maxphys
Changes since 1.64: +6 -6 lines
Diff to previous 1.64 (colored) to selected 1.223 (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.63.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:09:35 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.63: +18 -17 lines
Diff to previous 1.63 (colored) to selected 1.223 (colored)

sync with head

Revision 1.64 / (download) - annotate - [select for diffs], Sat Apr 7 18:29:08 2012 UTC (12 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4
Changes since 1.63: +18 -17 lines
Diff to previous 1.63 (colored) to selected 1.223 (colored)

Remove recheck hackery that caused extra stats, and explicitly ask for
recheck when needed. Before it used to be the case that we could only
use the cached entry once. Once the cached entry was used, we removed
it from the cache. Now it is kept forever.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Mar 5 23:57:05 2011 UTC (13 years, 1 month ago) by sjg
Branch: MAIN
CVS Tags: 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, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.62: +13 -3 lines
Diff to previous 1.62 (colored) to selected 1.223 (colored)

Treat some/dir/ the same as some/dir/.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Nov 27 05:02:35 2010 UTC (13 years, 4 months ago) by sjg
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.61: +28 -3 lines
Diff to previous 1.61 (colored) to selected 1.223 (colored)

When a source file moves, make will ignore the stale dependency,
but if the file in question is one that needs to be compiled (.c or .cc),
it still hands the bogus name to the compiler.

If Dir_MTime() cannot find such a file (gn->iParents is not empty),
see if the basename can be found via .PATH, and if so set gn->path to
the found file.   This prevents the stale path being given to the
compiler.

In meta_oodate(), if a referenced file no longer exists, consider the
target out-of-date.

Also, if meta_oodate() decides a target is out-of-date, and it
it uses .OODATE in its commands, we need .OODATE recomputed.
Undo our call to Make_DoAllVar() so that the call from Make_OODate()
will do the right thing.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Jan 24 10:59:09 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.60: +11 -11 lines
Diff to previous 1.60 (colored) to selected 1.223 (colored)

Don't cast 'time_t' to 'void *' and back it will lose precision.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jan 23 21:58:27 2009 UTC (15 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.59: +8 -8 lines
Diff to previous 1.59 (colored) to selected 1.223 (colored)

Sprinkle some const.
In particular for Lst_Find() and Lst_FindFrom().
Remove some unneeded casts and some now-undeeded UNCONST().

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jan 23 21:26:30 2009 UTC (15 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.58: +14 -14 lines
Diff to previous 1.58 (colored) to selected 1.223 (colored)

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

Revision 1.58 / (download) - annotate - [select for diffs], Sun Dec 28 18:32:54 2008 UTC (15 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.57: +14 -3 lines
Diff to previous 1.57 (colored) to selected 1.223 (colored)

if mtime == 0, make it 1 because the code expects 0 time to mean that the
file does not exist

Revision 1.57 / (download) - annotate - [select for diffs], Sat Dec 13 15:19:29 2008 UTC (15 years, 4 months ago) by dsl
Branch: MAIN
Changes since 1.56: +28 -28 lines
Diff to previous 1.56 (colored) to selected 1.223 (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.56 / (download) - annotate - [select for diffs], Mon Oct 6 22:09:21 2008 UTC (15 years, 6 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.55: +18 -18 lines
Diff to previous 1.55 (colored) to selected 1.223 (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.55 / (download) - annotate - [select for diffs], Fri Feb 15 21:29:50 2008 UTC (16 years, 2 months 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.54: +9 -11 lines
Diff to previous 1.54 (colored) to selected 1.223 (colored)

back all changes out until I fix it properly.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Feb 14 22:11:20 2008 UTC (16 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: christos-broken
Changes since 1.53: +14 -12 lines
Diff to previous 1.53 (colored) to selected 1.223 (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.51.4.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:05:28 2007 UTC (16 years, 7 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.51: +11 -7 lines
Diff to previous 1.51 (colored) next main 1.52 (colored) to selected 1.223 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Tue Jun 5 20:53:28 2007 UTC (16 years, 10 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.51: +11 -7 lines
Diff to previous 1.51 (colored) next main 1.52 (colored) to selected 1.223 (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.53 / (download) - annotate - [select for diffs], Mon Jan 1 21:31:51 2007 UTC (17 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-base, matt-armv6, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Changes since 1.52: +8 -4 lines
Diff to previous 1.52 (colored) to selected 1.223 (colored)

Remove 'else' after 'return', and similar whitspace changes.
Extra debug on where files are actually found.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Dec 16 08:51:12 2006 UTC (17 years, 4 months ago) by dsl
Branch: MAIN
Changes since 1.51: +6 -6 lines
Diff to previous 1.51 (colored) to selected 1.223 (colored)

Fix a comment that has been wrong since rev 1.1, minor layout fix.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Oct 27 21:00:18 2006 UTC (17 years, 5 months ago) by dsl
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.50: +22 -22 lines
Diff to previous 1.50 (colored) to selected 1.223 (colored)

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

Revision 1.50 / (download) - annotate - [select for diffs], Sun Oct 15 08:38:21 2006 UTC (17 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.49: +35 -36 lines
Diff to previous 1.49 (colored) to selected 1.223 (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.49 / (download) - annotate - [select for diffs], Sat Apr 22 18:47:10 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored) to selected 1.223 (colored)

Coverity CID 528: Avoid NULL deref.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Aug 8 16:42:54 2005 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.47: +30 -31 lines
Diff to previous 1.47 (colored) to selected 1.223 (colored)

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

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

More KNF cleanups from Max Okumoto

Revision 1.46 / (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.45: +37 -37 lines
Diff to previous 1.45 (colored) to selected 1.223 (colored)

Whitespace KNF cleanup from Max Okumoto

Revision 1.45 / (download) - annotate - [select for diffs], Wed Feb 16 15:11:52 2005 UTC (19 years, 2 months 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.44: +75 -75 lines
Diff to previous 1.44 (colored) to selected 1.223 (colored)

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

Revision 1.44 / (download) - annotate - [select for diffs], Wed Dec 29 00:43:02 2004 UTC (19 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.43: +4 -4 lines
Diff to previous 1.43 (colored) to selected 1.223 (colored)

Dir_MTime did not search for a file using the correct parh; i.e. it was
ignoring suffix-specific path search. So if a node was marked .MADE,
then suffix rules would not be applied to it, and we would look for
the file only in the default path, not the suffix-specific path.

XXX: Now that we looked for the suffix, we can save it in the GNode,
but we don't do this yet.

Revision 1.43 / (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.42: +6 -15 lines
Diff to previous 1.42 (colored) to selected 1.223 (colored)

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

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jul 1 04:39:30 2004 UTC (19 years, 9 months ago) by jmc
Branch: MAIN
Changes since 1.41: +13 -3 lines
Diff to previous 1.41 (colored) to selected 1.223 (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.40.2.1 / (download) - annotate - [select for diffs], Mon May 10 15:44:02 2004 UTC (19 years, 11 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.40: +4 -4 lines
Diff to previous 1.40 (colored) next main 1.41 (colored) to selected 1.223 (colored)

Pull up revision 1.41 (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.41 / (download) - annotate - [select for diffs], Fri May 7 00:04:38 2004 UTC (19 years, 11 months ago) by ross
Branch: MAIN
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored) to selected 1.223 (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.40 / (download) - annotate - [select for diffs], Tue Feb 3 19:25:29 2004 UTC (20 years, 2 months ago) by chuck
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.39: +86 -3 lines
Diff to previous 1.39 (colored) to selected 1.223 (colored)

add parent directory search for make as discussed on tech-toolchain.
 - new dir.c function: Dir_FindHereOrAbove:
      Search for a path in the current directory and then all the directories
      above it in turn until the path is found or we reach the root ("/").
 - add hooks to use it in main.c for -m and syspath (compiled in
      _PATH_DEFSYSPATH and $MAKESYSPATH).
 - updated man page

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jan 11 12:22:40 2004 UTC (20 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.38: +26 -41 lines
Diff to previous 1.38 (colored) to selected 1.223 (colored)

Change DEBUG(DIR) traces to indent subsequent filenames instead of
generating very long lines (basically changes "..." into " ...\n   ").

Revision 1.38 / (download) - annotate - [select for diffs], Tue Sep 9 14:44:35 2003 UTC (20 years, 7 months ago) by drochner
Branch: MAIN
Changes since 1.37: +3 -9 lines
Diff to previous 1.37 (colored) to selected 1.223 (colored)

Remove some code which makes file lookup rely on the fact that
the first two directory entries are "." and "..".
This behaviour is not required by applicable standards, and
actually not provided by "coda".
Now we get the "." and ".." into the per-directiry hash tables,
but this should not hurt.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:49 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.36: +34 -3 lines
Diff to previous 1.36 (colored) to selected 1.223 (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.36 / (download) - annotate - [select for diffs], Mon Jul 14 18:19:11 2003 UTC (20 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.35: +38 -36 lines
Diff to previous 1.35 (colored) to selected 1.223 (colored)

Pass WARNS=3

Revision 1.35 / (download) - annotate - [select for diffs], Tue Nov 26 06:12:59 2002 UTC (21 years, 4 months ago) by sjg
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.34: +112 -20 lines
Diff to previous 1.34 (colored) to selected 1.223 (colored)

Whenever we update .PATH, set the variable ${.PATH} to reflect the
search list that will be used.  Thus 'dot' and 'cur' will appear in
${.PATH} either at the start or end depending on .DOTLAST even though
they are not strictly in dirSearchPath.

When .CURDIR is assigned to - re-set the 'cur' Path.

Finally, when checking subdirs, look in 'dot' and 'cur' (first or last
depending on .DOTLAST) just as we do in other situations.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jun 15 18:24:56 2002 UTC (21 years, 10 months ago) by wiz
Branch: MAIN
Changes since 1.33: +105 -96 lines
Diff to previous 1.33 (colored) to selected 1.223 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Sun Feb 3 20:08:30 2002 UTC (22 years, 2 months 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.32: +7 -4 lines
Diff to previous 1.32 (colored) to selected 1.223 (colored)

Resurrect revision 1.23: no need to stat .PHONY targets.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jan 31 12:38:34 2002 UTC (22 years, 2 months ago) by pk
Branch: MAIN
Changes since 1.31: +164 -102 lines
Diff to previous 1.31 (colored) to selected 1.223 (colored)

Fix the bug addressed in revision 1.27 properly. Analysis of the problem
(see also PR#15179):

  When looking up names which directory components (i.e. having slashes,
  except when of the form `./name'), FindFile()/DirLookup() first looks
  the final filename component in the cache for each directory on the search
  path and then proceeds to match the prefixed directory components by
  comparing them to the trailing directory components of the the search
  path being probed.

  This is not correct. When looking for `bar/target' in a path `.../src/foo',
  you want it to come up with `.../src/foo/bar/target' (if it exists). There's
  no point in comparing the the `bar' prefix on the target to the `foo' suffix
  on the search path. Indeed, this will cause a false match if those prefix
  and suffix components are actually equal and search path itself also has a
  file called `target'. For example, looking for `foo/target' in `.../src/foo'
  will spuriously match `.../src/foo/target', not `.../src/foo/foo/target'.

  This last bug prompted the change in dir.c, rev 1.27, which happens
  to partially workaround it by avoiding the above matching code in the
  case of the `curdir' search path entry (at the cost of incurring an
  exorbitant amount of cache misses). The situation is unchanged however,
  when processing other entries on the search path (e.g. those other than
  `dot' and `cur').

Drop the prefix matching code in DirLookup() entirely and use DirFindDot()
and DirLookup() only for names without proper directory components (i.e.
`target' and `./target). Otherwise, non-absolute names are dealt with by
DirLookupSubdir(), while absolute names can be checked for an exact match
of the directory components prefix against the directories on the current
search path. This allows for the use of the file cache to check the
existence of the file and additionally, provides a shortcut out of
Dir_FindFile() if we have the prefix match but not a cache entry (this
is especially beneficial for searches in .CURDIR when it's not equal
to `dot').

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jan 27 01:50:54 2002 UTC (22 years, 2 months ago) by reinoud
Branch: MAIN
Changes since 1.30: +11 -12 lines
Diff to previous 1.30 (colored) to selected 1.223 (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.30 / (download) - annotate - [select for diffs], Sat Jan 26 22:36:41 2002 UTC (22 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.29: +9 -8 lines
Diff to previous 1.29 (colored) to selected 1.223 (colored)

Don't bother to lookup for files in `.' that start with a `/'. Cuts in the
number of NAMI's from 1344 -> 830 in a full build of /usr/src/usr.bin/make.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jan 18 19:18:23 2002 UTC (22 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.28: +5 -4 lines
Diff to previous 1.28 (colored) to selected 1.223 (colored)

In Dir_FindFile() add a missing Lst_Close() and move another one to the
proper place.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Nov 12 21:58:17 2001 UTC (22 years, 5 months ago) by tv
Branch: MAIN
Changes since 1.27: +40 -21 lines
Diff to previous 1.27 (colored) to selected 1.223 (colored)

Redo the hashtable for "." if .OBJDIR changes.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Nov 11 21:36:06 2001 UTC (22 years, 5 months ago) by tv
Branch: MAIN
Changes since 1.26: +4 -5 lines
Diff to previous 1.26 (colored) to selected 1.223 (colored)

Fix long-standing bug where, if an objdir exists, searching the .PATH for a
file will strip any leading path on the filename when searching ${.CURDIR}.

This bug manifested itself more prominently with xsrc/xfree/xc/lib/GL/GL,
since we now always search ${.CURDIR} as an alternative to ${.OBJDIR}
(PR bin/14499).

Revision 1.26 / (download) - annotate - [select for diffs], Sun Apr 16 23:24:04 2000 UTC (24 years ago) by christos
Branch: MAIN
CVS Tags: 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
Changes since 1.25: +8 -3 lines
Diff to previous 1.25 (colored) to selected 1.223 (colored)

Don't core-dump when the current working directory is not readable

Revision 1.24.4.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:37:04 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.24: +5 -7 lines
Diff to previous 1.24 (colored) next main 1.25 (colored) to selected 1.223 (colored)

Pull up to last week's -current.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Nov 25 22:34:16 1999 UTC (24 years, 4 months ago) by mrg
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.24: +5 -7 lines
Diff to previous 1.24 (colored) to selected 1.223 (colored)

back out rev 1.23 (don't stat PHONY targets).  it broken the libcrypto
build by causing everything to be remade everytime.  this fixes PR#8419.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Sep 15 08:43:22 1999 UTC (24 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize
Changes since 1.23: +5 -3 lines
Diff to previous 1.23 (colored) to selected 1.223 (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.23 / (download) - annotate - [select for diffs], Wed Sep 15 05:56:33 1999 UTC (24 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +7 -5 lines
Diff to previous 1.22 (colored) to selected 1.223 (colored)

Fix another case where we stat(2)ed .PHONY targets.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 12 17:29:32 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored) to selected 1.223 (colored)

Correct an inverse initialization of a variable, which caused all .PATHs
to be treated as .DOTLAST.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 11 02:06:57 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.20: +112 -41 lines
Diff to previous 1.20 (colored) to selected 1.223 (colored)

Add a mechanism for specifying that ${.CURDIR} will be searched last
in the presence of .PATH directives by specifying:

.PATH: .DOTLAST

This will be used to fixup the build system to work with both crypto-us
and crypto-intl sub-trees.

Make(1) changes by Christos Zoulas, after much badgering by me :-)

Revision 1.20 / (download) - annotate - [select for diffs], Sun Sep 28 03:31:02 1997 UTC (26 years, 6 months ago) by lukem
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, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3
Changes since 1.19: +6 -2 lines
Diff to previous 1.19 (colored) to selected 1.223 (colored)

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

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

Add WARNS=1
RCSID police

Revision 1.18 / (download) - annotate - [select for diffs], Fri May 9 17:05:59 1997 UTC (26 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.17: +163 -111 lines
Diff to previous 1.17 (colored) to selected 1.223 (colored)

Change the way curdir is handled [this started at the previous version]...
Instead of adding it in .PATH, handle it specially the same way as "." is
handled.

Revision 1.17 / (download) - annotate - [select for diffs], Thu May 8 21:24:41 1997 UTC (26 years, 11 months ago) by gwr
Branch: MAIN
Changes since 1.16: +41 -15 lines
Diff to previous 1.16 (colored) to selected 1.223 (colored)

Add the new .NOPATH feature which can be used to disable .PATH search
for particular targets, i.e. .depend, objects, etc.  (from Christos).

Revision 1.16 / (download) - annotate - [select for diffs], Tue May 6 20:59:42 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.15: +6 -3 lines
Diff to previous 1.15 (colored) to selected 1.223 (colored)

Don't do a VPATH or .PATH search for .PHONY targets.  (From Christos.)

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 2 14:23:51 1997 UTC (26 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.14: +23 -16 lines
Diff to previous 1.14 (colored) to selected 1.223 (colored)

Make used to add every directory where it found files in the search path.
I.e. if you had a line in your Makefile:
	../foo.o: foo.c
`..' would be added in the search path. The addition of such paths has
been now disabled. If a pathname contains a slash, then the directory
where such a file is found is not added to the search path. Of course
this eliminates most (all?) use of this function.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Mar 29 16:51:26 1997 UTC (27 years ago) by christos
Branch: MAIN
Changes since 1.13: +3 -8 lines
Diff to previous 1.13 (colored) to selected 1.223 (colored)

Don't disable wildcards completely; they are used by other Makefiles.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Mar 27 17:20:18 1997 UTC (27 years ago) by christos
Branch: MAIN
Changes since 1.12: +30 -4 lines
Diff to previous 1.12 (colored) to selected 1.223 (colored)

- Disable globbing for targets/dependencies when POSIX is defined.
- Fix globbing so that patterns that don't have a matching number of [] or {}
  don't get expanded. (before the [ case got expanded to nothing!) This is
  disabled.

Revision 1.10.4.1 / (download) - annotate - [select for diffs], Sun Jan 26 05:51:34 1997 UTC (27 years, 2 months ago) by rat
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.10: +51 -51 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.223 (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:40:59 1996 UTC (27 years, 3 months ago) by tls
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.1: +87 -50 lines
Diff to previous 1.1.1.1 (colored) to selected 1.223 (colored)

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

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 6 17:59:04 1996 UTC (27 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.11: +42 -42 lines
Diff to previous 1.11 (colored) to selected 1.223 (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.11 / (download) - annotate - [select for diffs], Tue Aug 13 16:42:02 1996 UTC (27 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.10: +11 -11 lines
Diff to previous 1.10 (colored) to selected 1.223 (colored)

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

Revision 1.10 / (download) - annotate - [select for diffs], Sun Feb 4 22:20:38 1996 UTC (28 years, 2 months ago) by christos
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.9: +4 -4 lines
Diff to previous 1.9 (colored) to selected 1.223 (colored)

fix pr/1421 and pr/1997

Revision 1.9 / (download) - annotate - [select for diffs], Wed Nov 22 17:40:05 1995 UTC (28 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored) to selected 1.223 (colored)

Updates for POSIX/SVR4 compiling:

arch.c:		 Don't require ranlib stuff. Not everybody has it.
dir.c:		 SunOS-4 != Solaris; change #ifdef sun to #if sun && !__svr4__
job.c, compat.c: Don't use 'union wait', use int and the W*() macros.
main.c: 	 Check for uname() == -1; some unames return > 0...
util.c, job.c:	 Add signal() with BSD semantics for svr4, don't use bsd
		 sigmask and friends.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jun 14 15:19:07 1995 UTC (28 years, 10 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.7: +7 -2 lines
Diff to previous 1.7 (colored) to selected 1.223 (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.7 / (download) - annotate - [select for diffs], Sat Dec 24 16:54:24 1994 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored) to selected 1.223 (colored)

a few casts, for peace and quiet.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jun 6 22:45:25 1994 UTC (29 years, 10 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.5: +57 -21 lines
Diff to previous 1.5 (colored) to selected 1.223 (colored)

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

Revision 1.5 / (download) - annotate - [select for diffs], Sat Mar 5 00:34:41 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.4: +28 -28 lines
Diff to previous 1.4 (colored) to selected 1.223 (colored)

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

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jan 13 21:01:47 1994 UTC (30 years, 3 months ago) by jtc
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored) to selected 1.223 (colored)

Include appropriate header files to bring prototypes into scope.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Dec 8 00:37:37 1993 UTC (30 years, 4 months ago) by jtc
Branch: MAIN
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored) to selected 1.223 (colored)

Update to use <dirent.h>.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:11:51 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.223 (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, 1 month 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.223 (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, 1 month ago) by cgd
Branch: MAIN
Diff to selected 1.223 (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>