| #
ad6e61b1 |
| 07-Jul-2024 |
rillig <rillig@NetBSD.org> |
make: only generate code for cleanup functions in CLEANUP mode
|
| #
90451b79 |
| 06-Jul-2024 |
rillig <rillig@NetBSD.org> |
make: error out on a matching malformed matching pattern '[['
|
| #
9c7f0367 |
| 14-Apr-2024 |
rillig <rillig@NetBSD.org> |
make: make string matching platform-independent
Previously, whether the character range '[a-ä]' matched, depended on the signedness of the plain 'char' type. Since make operates on byte strings and
make: make string matching platform-independent
Previously, whether the character range '[a-ä]' matched, depended on the signedness of the plain 'char' type. Since make operates on byte strings and does not support UTF-8 or other multi-byte character encodings, this edge case is not expected to occur in practice.
No change in the unit tests as this edge case is not covered by tests.
show more ...
|
| #
f60719f0 |
| 05-Jan-2024 |
rillig <rillig@NetBSD.org> |
make: miscellaneous cleanups
|
| #
c45c2cbe |
| 17-Dec-2023 |
rillig <rillig@NetBSD.org> |
make: speed up pattern matching in the ':M' modifier
In the common patterns where '*' is followed by a regular character, such as in the patterns '*.c' or '*.mk', search the next possible matching p
make: speed up pattern matching in the ':M' modifier
In the common patterns where '*' is followed by a regular character, such as in the patterns '*.c' or '*.mk', search the next possible matching position in a small loop, instead of repeatedly comparing the first remaining pattern character to all special characters.
show more ...
|
| #
9b0d3746 |
| 16-Dec-2023 |
rillig <rillig@NetBSD.org> |
make: eliminate a local variable in Str_Match
No functional change.
|
| #
a77b90bf |
| 23-Jun-2023 |
rillig <rillig@NetBSD.org> |
make: reduce indentation in pattern matching code
No functional change.
|
| #
599ae7ae |
| 23-Jun-2023 |
rillig <rillig@NetBSD.org> |
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 er
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@.
show more ...
|
| #
ce117351 |
| 22-Jun-2023 |
rillig <rillig@NetBSD.org> |
make: unclutter string matching code
|
| #
beecb5fe |
| 22-Jun-2023 |
rillig <rillig@NetBSD.org> |
make: rename variables in string matching, remove redundant code
No functional change.
|
| #
64136ea7 |
| 22-Jun-2023 |
rillig <rillig@NetBSD.org> |
make: speed up pattern matching in the ':M' and ':N' modifiers
In the code coverage report, the highest count for Str_Match goes from 5,298,924 down to 79,646.
|
| #
6f61b62f |
| 07-Dec-2022 |
rillig <rillig@NetBSD.org> |
make: clean up comments
|
| #
d905262d |
| 11-Jun-2022 |
rillig <rillig@NetBSD.org> |
make: clean up comments for string splitting and string matching
No binary change.
|
| #
3badfdab |
| 11-Jun-2022 |
rillig <rillig@NetBSD.org> |
make: condense Str_Match
The test for '\\' followed by '\0' was redundant since at that point, *str is guaranteed to be not '\0', which takes the next 'return false'.
No functional change.
|
| #
0988b72d |
| 13-May-2022 |
rillig <rillig@NetBSD.org> |
make: document platform dependency in string pattern matching
No unit test for this edge case since all other unit tests are platform- independent.
To reproduce: $ make clean $ make -s PROG=s-make
make: document platform dependency in string pattern matching
No unit test for this edge case since all other unit tests are platform- independent.
To reproduce: $ make clean $ make -s PROG=s-make NOMAN=yes USER_CFLAGS=-fsigned-char $ make clean $ make -s PROG=u-make NOMAN=yes USER_CFLAGS=-funsigned-char $ make clean $ range=$(lua -e 'print(("[%c-%c]"):format(0xe4, 0x61))') $ ./s-make -V "\${:UM:M$range}\${:UN:N$range}" M $ ./u-make -V "\${:UM:M$range}\${:UN:N$range}" N
show more ...
|
| #
0d91dacc |
| 13-May-2022 |
rillig <rillig@NetBSD.org> |
make: clean up low-level comments, eliminate common subexpression
No functional change.
|
| #
74067160 |
| 03-Mar-2022 |
rillig <rillig@NetBSD.org> |
make: make code for string matching syntactically more consistent
No functional change.
|
| #
d9ab151b |
| 15-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: in CLEANUP mode, free interned strings at the very end
Noticed by sjg.
|
| #
5da10dfc |
| 13-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: fix memory leak for filenames in .for loops (since 2013-06-18)
Previously, each time a .for directive pushed its buffer on the input file stack, the current filename was duplicated. This was
make: fix memory leak for filenames in .for loops (since 2013-06-18)
Previously, each time a .for directive pushed its buffer on the input file stack, the current filename was duplicated. This was a waste of memory.
The name of a file is typically only used while it is read in. There is one situation when the filename is needed for longer, which is when a target is defined.
Since .for loops are implemented as a special form of included files, each .for loop duplicated the current filename as well.
$ cat << EOF > for.mk .for i in 1 2 3 4 5 6 7 8 9 0 .for i in 1 2 3 4 5 6 7 8 9 0 .for i in 1 2 3 4 5 6 7 8 9 0 .for i in 1 2 3 4 5 6 7 8 9 0 .for i in 1 2 3 4 5 6 7 8 9 0 .for i in 1 2 3 4 5 6 7 8 9 0 .for i in 1 2 3 4 5 6 7 8 9 0 .endfor .endfor .endfor .endfor .endfor .endfor .endfor
all: @ps -o rsz -p ${.MAKE.PID} EOF
$ make-2021.12.13.03.55.16 -r -f for.mk RSZ 10720
$ ./make -r -f for.mk RSZ 1716
The difference is 8 MB, which amounts to 1 million .for loops.
show more ...
|
| #
8e716a59 |
| 21-Jun-2021 |
rillig <rillig@NetBSD.org> |
make: eliminate local variable in Substring_Words
No functional change.
|
| #
0137ba05 |
| 30-May-2021 |
rillig <rillig@NetBSD.org> |
make: inline str_concat4
This function is only ever used for forming strings of the form "archive(member)".
No functional change.
|
| #
b740ab5e |
| 11-Apr-2021 |
rillig <rillig@NetBSD.org> |
make: avoid unnecessary calls to strlen when evaluating modifiers
No functional change.
|
| #
a71bce01 |
| 03-Apr-2021 |
rillig <rillig@NetBSD.org> |
make: backport to C90
In the past few months I had accidentally used C99 features in the make code. According to tools/README, tools that are used in the build system should restrict themselves to
make: backport to C90
In the past few months I had accidentally used C99 features in the make code. According to tools/README, tools that are used in the build system should restrict themselves to C90.
This allows make to build with GCC's options "-pedantic -Wno-system-headers -Dinline= -Wno-error=cast-qual".
I didn't notice anyone actively complaining though, I just wanted to see how much work this backporting would be. The identifier __func__ is still used, as in other tools.
No functional change.
show more ...
|
| #
244fd9f4 |
| 03-Apr-2021 |
rillig <rillig@NetBSD.org> |
make: use C99 bool type instead of defining its own
No functional change.
|
| #
21f0a9e6 |
| 01-Feb-2021 |
rillig <rillig@NetBSD.org> |
make: document necessary tests for Str_Match
|