Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (47m)  netbsd-10 (4d)  netbsd-9 (4d)  netbsd-8 (9d) 

2024-05-20 21:33:31 UTC Now

2020-07-26 14:39:46 UTC MAIN commitmail json YAML

2020-07-26 14:16:45 UTC MAIN commitmail json YAML

make(1): add test for missing input validation in :[123] modifier

(rillig)

2020-07-26 13:39:30 UTC MAIN commitmail json YAML

make(1): add Buf_AddInt to make the calling code simpler

(rillig)

2020-07-26 13:09:53 UTC MAIN commitmail json YAML

make(1): add basic tests for the :S modifier

(rillig)

2020-07-26 12:27:09 UTC MAIN commitmail json YAML

make(1): make code in the :S modifier simpler

This code path is covered by the "sequences of letters" in modmisc.mk.

(rillig)

2020-07-26 12:19:37 UTC MAIN commitmail json YAML

make(1): fix bug in :S modifier from 2020-07-19

(rillig)

2020-07-26 12:18:12 UTC MAIN commitmail json YAML

make(1): demonstrate bug in the :S modifier with the 1 modifier

The bug has been introduced in var.c r1.268 on 2020-07-19.

(rillig)

2020-07-26 11:39:56 UTC MAIN commitmail json YAML

2020-07-26 11:19:04 UTC MAIN commitmail json YAML

make(1): add test for prefix mismatch in SysV substitution

(rillig)

2020-07-26 11:10:29 UTC MAIN commitmail json YAML

2020-07-26 10:59:56 UTC MAIN commitmail json YAML

make(1): add tests for appending to a variable

(rillig)

2020-07-26 10:48:21 UTC MAIN commitmail json YAML

2020-07-26 10:11:04 UTC MAIN commitmail json YAML

make(1): fix missing error message about missing @ delimiter

This had been broken since 2020-07-03, during a "refactoring".

(rillig)

2020-07-26 10:04:06 UTC MAIN commitmail json YAML

make(1): add test about missing delimiters in :@ modifier

These error conditions have been broken since var.c 1.236 on 2020-07-03.

(rillig)

2020-07-26 09:22:43 UTC MAIN commitmail json YAML

share/mk/bsd.README: fix typo

(rillig)

2020-07-26 09:22:15 UTC MAIN commitmail json YAML

style: fix typo about enum constants being capitalized

(rillig)

2020-07-26 09:17:24 UTC MAIN commitmail json YAML

make(1): remove references to the removed lst.lib

(rillig)

2020-07-26 07:24:27 UTC MAIN commitmail json YAML

make(1): replace macros with functions

(rillig)

2020-07-26 07:15:26 UTC MAIN commitmail json YAML

make(1): condense the list library into a single file

The list library is only used in make(1). Having it spread out over 28
files made it look more complex than it really is. In fact, it's just a
versatile generic data type like in hash.c.

Having all the list functions in a single file reduces the code size,
both by omitting the many RCS Ids and by inlining commonly used code.

(rillig)

2020-07-25 21:23:09 UTC MAIN commitmail json YAML

make(1): add newly added unit tests

(rillig)

2020-07-25 21:19:29 UTC MAIN commitmail json YAML

2020-07-25 21:00:48 UTC MAIN commitmail json YAML

make(1): make it easy to run gcov on the code

There seems to be no gcov support in share/mk yes, but it's still good
to have, especially for a complex program like make(1).

(rillig)

2020-07-25 20:50:00 UTC MAIN commitmail json YAML

make(1): indent Makefile directives like in pkgsrc

This makes it easier to see the corresponding .if/.endif, even without
comments.

(rillig)

2020-07-25 20:44:50 UTC MAIN commitmail json YAML

make(1): format Makefile consistently

(rillig)

2020-07-25 20:41:58 UTC MAIN commitmail json YAML

make(1): regroup source files

(rillig)

2020-07-25 20:37:46 UTC MAIN commitmail json YAML

make(1): add test for undefined (or empty) variable in :? modifier

(rillig)

2020-07-25 20:35:35 UTC MAIN commitmail json YAML

make(1): add test for brk_string with more than 50 words

(rillig)

2020-07-24 08:24:23 UTC MAIN commitmail json YAML

make(1): remove redundant condition

If there are multiple words from brk_string, none of them can be empty.
And if there is oneSingleWord that is empty, it doesn't hurt to add 0
bytes.

(rillig)

2020-07-24 08:22:05 UTC MAIN commitmail json YAML

make(1): prefer direct jump over indirect variable assignment

(rillig)

2020-07-24 08:20:24 UTC MAIN commitmail json YAML

make(1): make condition in ModifyWord_SubstRegex simpler

The generated code is still the same, at least with Clang.

(rillig)

2020-07-24 08:12:43 UTC MAIN commitmail json YAML

make(1): reduce lifetime of regmatch_t for :C modifier

(rillig)

2020-07-24 08:06:28 UTC MAIN commitmail json YAML

make(1): rename local variable

(rillig)

2020-07-24 08:03:28 UTC MAIN commitmail json YAML

make(1): allocate capturing groups for :C modifier statically

Since there are at most 10 capturing groups, it's easier to allocate them
on the stack.

To avoid growing the code size on x86_64, the matches have been moved to
the end of the struct, to keep the other offsets small.

(rillig)

2020-07-24 07:59:35 UTC MAIN commitmail json YAML

make(1): clean up Var_Export

(rillig)

2020-07-24 07:52:45 UTC MAIN commitmail json YAML

make(1): inline Var_Parse_State into ApplyModifiersState

There was no need to have this as a separate struct.  Especially none of
the modifiers used by ModifyWords modify this state, therefore it was
not necessary to pass it by reference.  This makes the code easier to
understand since there's less modifiable state.

(rillig)

2020-07-24 07:29:19 UTC MAIN commitmail json YAML

make(1): document ApplyModifiersState.cp

(rillig)

2020-07-24 07:24:22 UTC MAIN commitmail json YAML

make(1): eliminate ApplyModifiersState.tstr

This field always pointed to the beginning of the current modifier.
Therefore a better name is "mod", and there is no need to store it in the
shared state.

(rillig)

2020-07-23 20:24:22 UTC MAIN commitmail json YAML

make(1): only set missing_delim if it is actually missing

Just to make it easier to understand the code.

(rillig)

2020-07-23 19:49:39 UTC MAIN commitmail json YAML

make(1): fix wrong warning about missing delimiter

(rillig)

2020-07-23 19:46:55 UTC MAIN commitmail json YAML

make(1): demonstrate wrong error message about missing delimiter

The current practice of setting st->delim at the beginning of each
modifier and resetting it again at the end produces too many error
messages.  In this case, there is no missing delimiter.

(rillig)

2020-07-23 19:32:54 UTC MAIN commitmail json YAML

make(1): reduce code size on x86_64

(rillig)

2020-07-21 23:47:50 UTC MAIN commitmail json YAML

make(1): remove parameter from ModifyWordCallback

Most modifiers don't need a variable context, and those that do already
get all their parameters in a custom Args struct.

(rillig)

2020-07-21 23:22:45 UTC MAIN commitmail json YAML

make(1): make implementation of the :C modifier simpler

(rillig)

2020-07-21 23:19:46 UTC MAIN commitmail json YAML

make(1): add test for :S,,sep

The empty string does not match anywhere.  In other implementations of
string replacement, an empty string matches at every position of the
source string.

This only works for the :S modifier.  The :C modifier does not allow an
empty search pattern.

(rillig)

2020-07-21 21:34:41 UTC MAIN commitmail json YAML

2020-07-21 21:32:55 UTC MAIN commitmail json YAML

make(1): only ask for newline if :Q actually needs it

This simple change reduces the binary size of var.o by 96 bytes (Clang,
x86_64). Given that the code is still the same, just in a different
order, this is a bit surprising.

(rillig)

2020-07-21 21:13:24 UTC MAIN commitmail json YAML

make(1): clean up various things in var.c

(rillig)

2020-07-21 20:56:56 UTC MAIN commitmail json YAML

make(1): use consistent and descriptive names for callback functions

(rillig)

2020-07-21 20:08:44 UTC MAIN commitmail json YAML

make(1): remove unnecessary VarSelectWords_t struct

(rillig)

2020-07-20 21:33:13 UTC MAIN commitmail json YAML

make(1): extract :ts<separator> modifier into separate function

(rillig)

2020-07-20 20:56:39 UTC MAIN commitmail json YAML

make(1): clean up implementation of :[...] and other modifiers

(rillig)

2020-07-20 19:53:40 UTC MAIN commitmail json YAML

make(1): fix edge cases with $ at the end of the :@ modifier

In both parts of the :@ modifier, by passing &pflags to
ParseModifierPart, a final $ was interpreted as an anchor, which only
makes sense in the :S and :C modifiers.

This edge case is neither used by src nor by pkgsrc, except for the unit
tests that have been adjusted.

(rillig)

2020-07-20 19:03:26 UTC MAIN commitmail json YAML

make(1): add test for nested assignments

This test demonstrates that in ApplyModifier_Assign, the call to
ParseModifierPart must get its pflags.

(rillig)

2020-07-20 16:55:10 UTC MAIN commitmail json YAML

make(1): make conditions work without pattern flags

The "pattern flag" VARP_NOSUBST was used to prevent evaluating
irrelevant conditions.  Omitting the evaluation flag VARE_WANTRES has the
same effect.

(rillig)

2020-07-20 16:32:14 UTC MAIN commitmail json YAML

make(1): fix obscure edge case for ${VAR:e$=x}

The characters "$=" do not occur in either src or pkgsrc, therefore this
case is unlikely to occur in practice.

(rillig)

2020-07-20 16:27:55 UTC MAIN commitmail json YAML

make(1): demonstrate obscure edge case in SysV modifier

(rillig)

2020-07-20 16:12:52 UTC MAIN commitmail json YAML

make(1): move documentation for assignment modifiers

(rillig)

2020-07-20 16:12:02 UTC MAIN commitmail json YAML

2020-07-20 15:48:50 UTC MAIN commitmail json YAML

make(1): prefer memcmp over strncmp

(rillig)

2020-07-20 15:44:12 UTC MAIN commitmail json YAML

make(1): fix type of VarPattern.lhsLen and rhsLen

String length is measured in size_t, not int.

(rillig)

2020-07-20 15:15:32 UTC MAIN commitmail json YAML

make(1): fix undefined behavior in :S modifier

The expression word + wordLen - leftLen had resulted in an out-of-bounds
pointer before.  Luckily the heap addresses were high enough in typical
applications to prevent a wrap-around.

(rillig)

2020-07-20 15:10:35 UTC MAIN commitmail json YAML

make(1): make implementation of the :S modifier simpler

(rillig)

2020-07-20 14:50:41 UTC MAIN commitmail json YAML

make(1): make modifier handling simpler

Implementing a modifier such as :S or :M should not be concerned with
separating the words of the resulting string.  Ideally this should be
done in the same way by all modifiers.

Before, the :R (filename root) modifier added a separator even if the
resulting filename root was an empty string.  The chances that this
change in behavior breaks anything are epsilon.

The :@ modifier, if it appeared after a :ts modifier, did not use the
word separator from the :ts modifier (which all other modifiers do) but
always added a space.  This behavior has been preserved for now.  It's an
unnecessary inconsistency though.

In contrast to Buffer, the newly added SepBuf uses size_t for memory
sizes and also uses the conventional parameter order (mem, memsize)
instead of the unusual (memsize, mem).

(rillig)

2020-07-19 22:22:01 UTC MAIN commitmail json YAML

make(1): remove unnecessary UNCONST

(rillig)

2020-07-19 22:04:28 UTC MAIN commitmail json YAML

make(1): make ampersand in ${VAR:from=to&} an ordinary character

In SysV substitutions, wildcards are expressed with % instead of &.  The
& is not mentioned in the manual page, and having another wildcard for
the whole word would be such an obscure feature that not even pkgsrc uses
it.  The easiest way to discover this feature had been to read the source
code of make(1) or to use a fuzzer and accidentally stumble upon this
edge case.

(rillig)

2020-07-19 21:30:50 UTC MAIN commitmail json YAML

make(1): don't call VarSubstitute unnecessarily

(rillig)

2020-07-19 21:14:56 UTC MAIN commitmail json YAML

make(1): remove wrong VarPattern from ApplyModifier_Exclam

(rillig)

2020-07-19 21:10:35 UTC MAIN commitmail json YAML

make(1): remove wrong VarPattern from ApplyModifier_Assign

(rillig)

2020-07-19 21:03:55 UTC MAIN commitmail json YAML

make(1): add test for assignment operators in conditions

(rillig)

2020-07-19 20:56:34 UTC MAIN commitmail json YAML

make(1): flatten ApplyModifier_Assign

(rillig)

2020-07-19 20:49:45 UTC MAIN commitmail json YAML

2020-07-19 20:37:57 UTC MAIN commitmail json YAML

make(1): fix date in comment in unit test

(rillig)

2020-07-19 19:36:20 UTC MAIN commitmail json YAML

make(1): add tests for maximum number of capturing groups in :C

(rillig)

2020-07-19 19:27:08 UTC MAIN commitmail json YAML

make(1): fix off-by-one error in :C modifier

Previously this off-by-one error had invoked undefined behavior.
Until today there was no corresponding unit test though.

(rillig)

2020-07-19 18:35:54 UTC MAIN commitmail json YAML

make(1): fix double free introduced this morning in r1.258

(rillig)

2020-07-19 17:43:36 UTC MAIN commitmail json YAML

make(1): remove redundant loop control variable

(rillig)

2020-07-19 17:40:30 UTC MAIN commitmail json YAML

make(1): rename ApplyModifiersState.flags to eflags

There are just too many variables called "flags" in this file, and their
constants must not accidentally overlap.

(rillig)

2020-07-19 17:24:22 UTC MAIN commitmail json YAML

2020-07-19 16:48:48 UTC MAIN commitmail json YAML

make(1): clean up VarLoop structure

(rillig)

2020-07-19 16:22:44 UTC MAIN commitmail json YAML

make(1): remove unused parameter from ParseModifierPart

(rillig)

2020-07-19 16:08:24 UTC MAIN commitmail json YAML

make(1): rename VarGetPattern to ParseModifierPart

(rillig)

2020-07-19 15:51:51 UTC MAIN commitmail json YAML

make(1): eliminate unused local variables

(rillig)

2020-07-19 15:47:10 UTC MAIN commitmail json YAML

make(1): eliminate macro from VarGetPattern

(rillig)

2020-07-19 15:16:22 UTC MAIN commitmail json YAML

make(1): add test for stray dollar signs in :@ modifier

(rillig)

2020-07-19 14:23:02 UTC MAIN commitmail json YAML

make(1): add test for ampersand in SysV substitution modifier

(rillig)

2020-07-19 14:05:39 UTC MAIN commitmail json YAML

make(1): replace ApplyModifiersState field with local variable

(rillig)

2020-07-19 13:21:56 UTC MAIN commitmail json YAML

make(1): rename flags for :S and :C pattern matching

Renaming these flags makes it obvious that VarPattern is used in a few
places where it doesn't belong.  These will be fixed in follow-up
commits.

(rillig)

2020-07-19 12:51:06 UTC MAIN commitmail json YAML

make(1): convert VarFind flags to typed enum

(rillig)

2020-07-19 12:35:30 UTC MAIN commitmail json YAML

make(1): clean up unnecessary snprintf and multi-line function calls

(rillig)

2020-07-19 12:26:17 UTC MAIN commitmail json YAML

make(1): rename Varf_Flags to VarEvalFlags

In var.c there are lots of different flag types.  To make any accidental
mixture obvious, each flag group gets its own prefix.

The only flag group that is visible outside of var.c is concerned with
evaluating variables, therefore the "e", which replaces the former "f"
that probably just meant "flag".

(rillig)

2020-07-19 10:38:02 UTC MAIN commitmail json YAML

make(1): clean up handling of :? modifier

The VarPattern type had nothing to do with parsing conditions.

(rillig)

2020-07-19 10:28:44 UTC MAIN commitmail json YAML

make(1): clean up code in var.c

* use canonical comparison to zero in more cases
* omit unnecessary snprintf for string literal concatenation
* omit a few redundant parentheses and braces

(rillig)

2020-07-19 09:26:19 UTC MAIN commitmail json YAML

make(1): move SysV string matching to var.c

This kind of string matching is only used in variable modifiers, and only
if this feature is enabled by SYSVVARSUB.

(rillig)

2020-07-19 09:13:22 UTC MAIN commitmail json YAML

2020-07-19 07:08:10 UTC MAIN commitmail json YAML

make(1): demonstrate inconsistent :ts behavior among modifiers

(rillig)

2020-07-04 22:17:09 UTC MAIN commitmail json YAML

make(1): ignore system-specific error message from regcomp in test

NetBSD 8 has: repetition-operator operand invalid
Ubuntu has: Invalid preceding regular expression

(rillig)

2020-07-04 22:01:10 UTC MAIN commitmail json YAML

make(1): add post-processing for tests

By defining SED_CMDS.${test}, a test can do additional post-processing
on its output, for example to normalize paths or error messages.

The Makefile for the tests now follows the common style to have all
relevant definitions at the top of the file, and all the implementation
details at the bottom.

By using the += instead of backslashed lists, it becomes easier to
comment out a single test, either temporarily or permanently (such as
the POSIX tests).

The :C modifier has been replaced with the simpler :S, some :S modifiers
have been replaced with simpler := modifiers.

The postprocessing commands have been extracted from the actual command.
This makes editing and commenting them easier.

(rillig)

2020-07-04 21:04:25 UTC MAIN commitmail json YAML

make(1): improve documentation about adding new tests

(rillig)

2020-07-04 18:54:18 UTC MAIN commitmail json YAML

make(1): add tests for dollar characters in modifiers

(rillig)

2020-07-04 17:41:04 UTC MAIN commitmail json YAML

2020-07-04 17:10:34 UTC MAIN commitmail json YAML

make(1): add debugging output for :@ modifier

The inner working of the :@ modifier is quite tricky.  To understand what
really happens, it helps to look at each word as it is being modified.

(rillig)

2020-07-04 16:30:47 UTC MAIN commitmail json YAML

make(1): constify VarModify parameter

Since var.c r1.238 and r1.239, the callbacks for the :H :T :E :R modifiers
don't modify the word anymore, and the others didn't modify it at all.

(rillig)

2020-07-04 16:15:21 UTC MAIN commitmail json YAML

make(1): add test for an obscure edge case of using the :@ modifier

(rillig)

2020-07-04 15:44:07 UTC MAIN commitmail json YAML

make(1): fix :hash modifier on 16-bit platforms

On platforms where int has only 16 bits the shifts would have been in
16-bit arithmetic, which would invoke undefined behavior for "ustr[3] <<
24" as well as "ustr[2] << 16" (C99, 6.5.7p3).

(rillig)

2020-07-04 10:49:09 UTC MAIN commitmail json YAML

make(1): remove unnecessary _t suffix from VarLoop type

(rillig)

2020-07-04 10:46:32 UTC MAIN commitmail json YAML

make(1): fix documentation of Var_Subst, clean up other documentation

(rillig)

2020-07-04 10:35:30 UTC MAIN commitmail json YAML

make(1): remove unnecessary forward declarations, fix indentation

(rillig)

2020-07-04 10:19:39 UTC MAIN commitmail json YAML

make(1): remove unnecessary forward declarations

(rillig)

2020-07-04 09:21:30 UTC MAIN commitmail json YAML

2020-07-03 22:40:55 UTC MAIN commitmail json YAML

make(1): reduce line length in var.c

(rillig)

2020-07-03 22:34:22 UTC MAIN commitmail json YAML

make(1): refactor ApplyModifier_SysV to have less indentation

(rillig)

2020-07-03 22:10:42 UTC MAIN commitmail json YAML

make(1): clean up documentation, small refactorings for variables

- document the callback for VarModify
- clearly mark the callbacks
- shorten the documentation for some callback functions
- fix the documentation of VarSYSVMatch
- remove unnecessary null check from VarLoopExpand
- add test for applying modifiers to empty strings

(rillig)

2020-07-03 19:29:25 UTC MAIN commitmail json YAML

make(1): add another test for the SysV :%=% modifier

(rillig)

2020-07-03 19:21:11 UTC MAIN commitmail json YAML

make(1): add expected test result for modmisc

(rillig)

2020-07-03 18:41:50 UTC MAIN commitmail json YAML

make(1): fix bug in :E modifier, introduced in r1.239 today

That case was not covered by the tests before.

(rillig)

2020-07-03 17:48:47 UTC MAIN commitmail json YAML

make(1): fix indentation in var.c

Fixing the indentation manually is a tedious task.  indent(1) was no help
since it has several bugs and is not flexible enough for the original
make code.

(rillig)

2020-07-03 17:03:09 UTC MAIN commitmail json YAML

make(1): add Hash_ForEach to avoid duplicate code

(rillig)

2020-07-03 17:00:48 UTC MAIN commitmail json YAML

make(1): fix indentation and alignment

(rillig)

2020-07-03 15:42:43 UTC MAIN commitmail json YAML

make(1): make code for the :E and :R modifiers simpler

(rillig)

2020-07-03 15:41:37 UTC MAIN commitmail json YAML

2020-07-03 15:33:01 UTC MAIN commitmail json YAML

make(1): add more tests for :H, :T and :E modifiers

(rillig)

2020-07-03 15:24:31 UTC MAIN commitmail json YAML

make(1): clean up code for the :H and :T modifiers

(rillig)

2020-07-03 15:22:35 UTC MAIN commitmail json YAML

make(1): add test for :H and :T modifiers with several words

(rillig)

2020-07-03 14:59:17 UTC MAIN commitmail json YAML

2020-07-03 14:14:04 UTC MAIN commitmail json YAML

make(1): refactor ApplyModifiers

Previously, ApplyModifiers was 1200 lines long and pretty complicated.
Now each of the complicated modifiers has its own function, which reduces
the indentation and makes it possible to use early returns.

(rillig)

2020-07-03 08:37:57 UTC MAIN commitmail json YAML

2020-07-03 08:13:23 UTC MAIN commitmail json YAML

2020-07-03 08:02:56 UTC MAIN commitmail json YAML

2020-07-03 07:40:13 UTC MAIN commitmail json YAML

make(1): refactor Str_Match

- use shorter variable names to avoid line breaks
- eliminate c2 variable
- change return type to Boolean

(rillig)

2020-07-03 06:30:02 UTC MAIN commitmail json YAML

make(1): clean up Str_Match

- removed unnecessary parentheses
- uniform test for end of string

(rillig)

2020-07-03 06:25:23 UTC MAIN commitmail json YAML

make(1): clean up documentation of Str_Match

(rillig)

2020-07-02 19:11:01 UTC MAIN commitmail json YAML

cgram(6): use standard cursor keys, use standard shuffle algorithm

The previous shuffle algorithm asked for 100 random numbers, on average.
The new algorithm asks exactly for 26 random numbers.

Curses predefines numeric constants for keys, and there is no apparent
reason not to use these standard keys for cursor movement.

(rillig)

2020-07-02 16:52:34 UTC MAIN commitmail json YAML

make(1): fix unnecessary evaluation of variables in :@var@ modifier

(rillig)

2020-07-02 16:46:57 UTC MAIN commitmail json YAML

make(1): fix unnecessary evaluation for :S :C := modifiers

(rillig)

2020-07-02 16:37:56 UTC MAIN commitmail json YAML

make(1): demonstrate some more cases for unintended evaluation

(rillig)

2020-07-02 16:14:50 UTC MAIN commitmail json YAML

make(1): clean up code in var.c

- remove redundant parentheses in return statements
- add missing space after comma
- remove some redundant parentheses around comparisons
- use hexadecimal numbers for bit mask constants
- remove Var_GetTail and Var_GetHead, which had been unused for 19 years

(rillig)

2020-07-02 15:47:39 UTC MAIN commitmail json YAML

make(1): remove useless parameter from Var_Set

The enum corresponding to this int parameter is only defined in var.c,
which makes it impractical for the outside to set this parameter to
anything but 0.

On x86_64, this reduces the size of the resulting executable by 5 kB.

(rillig)

2020-07-02 15:26:21 UTC MAIN commitmail json YAML

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

(rillig)

2020-07-02 15:14:38 UTC MAIN commitmail json YAML

make(1): add more type safety for enums

There are several types of flags for variables, and these cannot be
mixed.  To prevent accidental typos, these are defined in separate enum
types.  Clang warns about direct assignments between distinct types, but
not about mixing distinct types in binary expressions like A | B.  GCC
does not warn at all.

(rillig)

2020-07-02 13:04:09 UTC MAIN commitmail json YAML

2020-07-02 12:37:18 UTC MAIN commitmail json YAML

make(1): demonstrate another unintended variable evaluation

(rillig)

2020-07-02 12:34:30 UTC MAIN commitmail json YAML

make(1): fix edge case for evaluating unnecessary conditions

(rillig)

2020-07-02 10:36:58 UTC MAIN commitmail json YAML

make(1): demonstrate another unnecessary condition evaluation

(rillig)

2020-07-02 09:44:51 UTC MAIN commitmail json YAML

make(1): document the actual cause for "recursive variable"

That wrong error message had nothing to do with the .for loop, it was
only caused because the .for loop uses the :U modifier internally.

(rillig)

2020-06-28 11:06:27 UTC MAIN commitmail json YAML

make(1): fix evaluation of unreachable conditions

Since 2015-10-11, make had evaluated unreachable conditions even though
the manual page said it didn't.

(rillig)

2020-06-28 09:42:41 UTC MAIN commitmail json YAML

2020-06-15 14:46:28 UTC MAIN commitmail json YAML

make(1): fix performance problem in specially crafted :M modifier

This fix was previously suspected to make the vax build fail.  The next
build succeeded though, and it started 2 hours before this fix was
reverted.

(rillig)

2020-06-14 23:13:21 UTC MAIN commitmail json YAML

usr.bin/make: revert performance improvement

That change might be the cause of a build failure for vax.
http://releng.netbsd.org/builds/HEAD/202006131940Z/ builds fine.
http://releng.netbsd.org/builds/HEAD/202006141020Z/ doesn't.

The build fails with:
/home/source/ab/HEAD/src/external/gpl3/gcc/dist/gcc/machmode.h:524:28:
error: 'mode_size_inline' was not declared in this scope

(rillig)

2020-06-13 21:16:27 UTC MAIN commitmail json YAML

usr.bin/make: make Str_Match faster for repeated asterisks

Conceptually related to https://en.wikipedia.org/wiki/ReDoS.

(rillig)

2020-06-13 07:49:00 UTC MAIN commitmail json YAML

usr.bin/make: remove redundant parentheses around return

(rillig)

2020-06-13 07:36:07 UTC MAIN commitmail json YAML

usr.bin/make: consistently use ++ for incrementing pointers

(rillig)

2020-06-13 07:30:02 UTC MAIN commitmail json YAML

usr.bin/make: fix typo in comment

(rillig)

2020-06-08 19:50:11 UTC MAIN commitmail json YAML

usr.bin/make: fix test failure

The two files include-sub.mk and include-subsub.mk were never intended to
be test cases on their own.  They belong to include-main.mk.

Fixes PR bin/55360.

(rillig)

2020-05-17 12:36:26 UTC MAIN commitmail json YAML

2020-05-17 09:37:48 UTC MAIN commitmail json YAML

usr.bin/make: fix test for dollar and backslash at eol

The previous version of this test relied on the way how the shell
interprets a lonely backslash at the end of the line.  The NetBSD and
FreeBSD shells print the backslash, while Bash doesn't.

While here, make the escaping a bit simpler and align the test
descriptions with the actual test data.

(rillig)

2020-05-10 13:03:40 UTC MAIN commitmail json YAML

2020-05-10 12:42:11 UTC MAIN commitmail json YAML

usr.bin/make: sort test cases alphabetically

(rillig)

2020-05-10 12:34:01 UTC MAIN commitmail json YAML

2020-05-03 12:10:28 UTC MAIN commitmail json YAML

usr.bin/make: refactor brk_string

The variables are renamed to reflect to which memory region each pointer
belongs.

The variable "curlen" was always zero.

The type of "ch" has changed to char, and its scope is now limited to
its actual use.

Comparisons of pointers are now consistently written as p != NULL
instead of !p, like character comparisons are written as ch != '\0'.

The "store_words_buf" is updated when the function returns, not before.

(rillig)

2020-05-01 16:29:34 UTC MAIN commitmail json YAML

usr.bin/make: add test demonstrating that .for stops at newline

(rillig)

2020-05-01 16:26:41 UTC MAIN commitmail json YAML

usr.bin/make: fix test for late evaluated condition

(rillig)

2020-04-29 23:15:22 UTC MAIN commitmail json YAML

2020-03-13 23:27:55 UTC MAIN commitmail json YAML

t_glob.c: clean up test code

In struct vfs_file, using an int as a boolean is an anachronism and has
been replaced with a single-character file type, like in ls(1).

Some other redundant test code has been removed as well since it was
either unreachable or existed only for performance reasons.

(rillig)

2020-03-13 22:58:31 UTC MAIN commitmail json YAML

t_glob.c: add test cases for hidden directory and file

The existing test code was geared towards every little bit of
performance. It even duplicated the file definitions in vfs_stat in order
to avoid a few strcmp calls. This made the test code fragile. Therefore,
vfs_stat has been rewritten completely to not duplicate any information
from the vfs.

In vfs_stat, the returned st_mode is now more realistic. It had been 0
before. The file mode is only logged when it makes sense. In the ENOENT
case it is not logged anymore.

The debug logging for opendir/closedir now logs the same pointer, so that
the corresponding calls can be matched easily. Failed vfs_opendir calls
are logged as well, to get a more complete picture of which callbacks are
called.

(rillig)

2020-03-13 21:44:25 UTC MAIN commitmail json YAML

t_glob.c: use distinct names for test structures

Before, the structures and functions defined by the test used the same
prefix as the code to be tested. This made it difficult to draw a line
between these parts.

(rillig)

2020-03-13 20:48:33 UTC MAIN commitmail json YAML

t_glob.c: move expected globbing result directly into the test cases

This makes the tests more self-contained. The example directory tree that
is common to all the tests is still defined elsewhere, but in the same
file. Setting up the example directory structure in each test would make
the tests even more independent and read.

(rillig)

2020-01-07 22:42:14 UTC MAIN commitmail json YAML

usr.bin/make: document probabilities for random test failures

Side node: this test will never fail between 2024-04-15 and 2024-07-06.

(rillig)

2020-01-07 21:24:16 UTC MAIN commitmail json YAML

usr.bin/make: remove dead code

The preprocessor conditions contradicted each other: __hpux__ or __hpux
would need to be defined, and at the same time none of them would need to
be defined.

(rillig)

2020-01-07 20:50:12 UTC MAIN commitmail json YAML

usr.bin/make: fix typos in comment

(rillig)

2019-12-02 01:01:08 UTC MAIN commitmail json YAML

2019-12-01 23:53:49 UTC MAIN commitmail json YAML

2019-11-30 03:53:45 UTC MAIN commitmail json YAML

2019-11-30 02:55:47 UTC MAIN commitmail json YAML

Fix unit test for edge case in :M modifier

(rillig)

2019-11-30 02:35:28 UTC MAIN commitmail json YAML

Ignore temporary files from running the unit tests

(rillig)

2019-11-30 02:31:19 UTC MAIN commitmail json YAML

2019-11-30 00:38:51 UTC MAIN commitmail json YAML

2018-10-07 23:17:52 UTC MAIN commitmail json YAML

When listing aliases, sort them alphabetically.

(rillig)

2018-09-14 05:59:10 UTC MAIN commitmail json YAML

Fix "every" typo in quote from The Mythical Man-Month

(rillig)