#
71e9c21d |
| 24-Jan-2023 |
sjg <sjg@NetBSD.org> |
make: .SYSPATH: to add dirs to sysIncPath
.SYSPATH: with no sources will clear sysIncPath otherwise sources are added
Reviewed by: rillig
|
#
7a2ef0f2 |
| 15-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: remove redundant comments for multiple-inclusion guards
|
#
b96fe8fd |
| 15-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: mark several functions whose result must be used
Suggested by sjg, to catch more bugs like the memory leak in cond.c 1.303 from 2021-12-13.
No binary change.
|
#
4ec8d01b |
| 03-Apr-2021 |
rillig <rillig@NetBSD.org> |
make: use C99 bool type instead of defining its own
No functional change.
|
#
7ade2e5b |
| 05-Feb-2021 |
rillig <rillig@NetBSD.org> |
make: add const to SearchPath_Print
|
#
cdbcae32 |
| 23-Jan-2021 |
rillig <rillig@NetBSD.org> |
make(1): rename Dir_AddDir, reorder parameters of SearchPath_ToFlags
|
#
06f0b175 |
| 23-Jan-2021 |
rillig <rillig@NetBSD.org> |
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.
|
#
20eafb1b |
| 01-Dec-2020 |
rillig <rillig@NetBSD.org> |
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
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.
show more ...
|
#
1ae3ec88 |
| 29-Nov-2020 |
rillig <rillig@NetBSD.org> |
make(1): use space instead of tab for preprocessor directives
|
#
680080a7 |
| 29-Nov-2020 |
rillig <rillig@NetBSD.org> |
make(1): unexport CachedDir internals
|
#
5f3a3f79 |
| 28-Nov-2020 |
rillig <rillig@NetBSD.org> |
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 path
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.
show more ...
|
#
e3326960 |
| 28-Nov-2020 |
rillig <rillig@NetBSD.org> |
make(1): rename some Dir functions to SearchPath
These functions have the search path as their main subject.
|
#
d8b3a2ae |
| 23-Nov-2020 |
rillig <rillig@NetBSD.org> |
make(1): migrate CachedDir.files from HashTable to HashSet
|
#
94da6547 |
| 14-Nov-2020 |
rillig <rillig@NetBSD.org> |
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),
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.
show more ...
|
#
4e4c2b6e |
| 08-Nov-2020 |
rillig <rillig@NetBSD.org> |
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->mt
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.
show more ...
|
#
aa7bad47 |
| 25-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): replace Dir_CopyDir with Dir_CopyDirSearchPath
Callback functions for the Lst functions do not belong in the public API of a module.
|
#
060d570e |
| 19-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): clean up headers, no functional change
|
#
ee5c1a58 |
| 18-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): remove underscore from Hash_Table and Hash_Entry
For consistency with the other type names, such as GNodeListNode.
|
#
b5ce9f83 |
| 05-Oct-2020 |
rillig <rillig@NetBSD.org> |
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 i
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.
show more ...
|
#
c65cf2c5 |
| 05-Oct-2020 |
rillig <rillig@NetBSD.org> |
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,
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.
show more ...
|
#
22ea481b |
| 27-Sep-2020 |
rillig <rillig@NetBSD.org> |
make(1): improve documentation of CachedDir and Dir_AddDir
|
#
37343ba6 |
| 27-Sep-2020 |
rillig <rillig@NetBSD.org> |
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.
|
#
7852942d |
| 22-Sep-2020 |
rillig <rillig@NetBSD.org> |
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.
|
#
3cabfa74 |
| 22-Sep-2020 |
rillig <rillig@NetBSD.org> |
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 sear
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.
show more ...
|
#
6689eb37 |
| 02-Sep-2020 |
rillig <rillig@NetBSD.org> |
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
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.
show more ...
|