Commit Graph

282671 Commits

Author SHA1 Message Date
rillig 430e6af1a9 make(1): fix type of Job.suspended 2020-11-07 21:24:33 +00:00
rillig 4b7522eb2f make(1): clean up Make_OODate and Make_Run 2020-11-07 21:22:37 +00:00
rillig 6bcbf8f8c5 make(1): clean up Buf_AddEscaped in .for loops
All this dance of determining the needed escape characters before
iterating, saving them upfront, evaluating them later using complicated
boolean expressions was not necessary at all.  All that is needed is a
simple NeedsEscapes, called at just the right time.
2020-11-07 21:04:43 +00:00
rillig 82e2acd33b make(1): use proper enum constant instead of 0 for CachedStatsFlags 2020-11-07 20:45:21 +00:00
rillig 4189145590 make(1): clean up CondParser_Comparison 2020-11-07 20:39:56 +00:00
rillig 9dfbe25229 make(1): reword condition in CondParser_String
The parentheses were confusing for human readers.

The compiler doesn't really care about the wording of the condition, GCC
5 on amd64 generates non-obvious but nice code anyway, replacing the
logical or with a logical and.
2020-11-07 20:35:04 +00:00
rillig 3f0565e482 make(1): fix type mismatch between Boolean and Token
Even though the C boolean and Token are encoded the same, the code should
still distinguish them, for the benefit of human readers.
2020-11-07 20:14:15 +00:00
rillig 2a070b743a make(1): fix type mismatch in If_Eval
No practical consequences since TOK_FALSE == 0 and TOK_TRUE == 1.
2020-11-07 20:11:32 +00:00
rillig 337a59929f make(1): clean up JobStart
Initialize the fields in declaration order.
Initialize Job.flags in a single assignment.
2020-11-07 20:03:56 +00:00
rillig 595e4d4033 make(1): add test for job command flags 2020-11-07 20:01:17 +00:00
nia ab1f3176ac libepoxy: Only require egl on ports with egl support.
Reported by martin.
2020-11-07 18:12:16 +00:00
christos cab1687af0 make the buffer fit any 32 bit number. 2020-11-07 17:46:56 +00:00
christos 8cb1641ff6 PR/55794: Jan Schaumann: Eliminate unchecked malloc 2020-11-07 16:16:33 +00:00
skrll 2c41f31148 Use lower case for hex constants 2020-11-07 14:48:45 +00:00
rillig 9666e9b4ec make(1): add test for parse error in function defined() 2020-11-07 14:40:51 +00:00
rillig a26b3f9daa make(1): add test for parse error in condition using empty() 2020-11-07 14:37:30 +00:00
rillig b06323cade make(1): clean up Compat_Make 2020-11-07 14:32:12 +00:00
rillig 78a74ade12 make(1): clean up Compat_RunCommand 2020-11-07 14:27:16 +00:00
rillig f2a42695ee make(1): replace switch with if-else chain in Compat_RunCommand 2020-11-07 14:18:25 +00:00
rillig 84d259f4c7 make(1): make API of Buf_Init simpler
In most cases, the caller doesn't want to specify the exact number of
preallocated bytes.
2020-11-07 14:11:58 +00:00
rillig addc005f94 make(1): clean up Arch_LibOODate 2020-11-07 14:04:49 +00:00
rillig 8e125d92d8 make(1): fix indentation in JobPrintCommand 2020-11-07 13:53:12 +00:00
rillig 21f2256abd make(1): document duplicate code in arch.c 2020-11-07 13:43:39 +00:00
rillig 57f23c721b make(1): fix function names in archive debug output 2020-11-07 13:39:41 +00:00
rillig 1c3d769b00 make(1): fix out-of-bounds pointer in ArchStatMember (since 1993-03-21) 2020-11-07 13:34:46 +00:00
rillig 1f17fbd4ea make(1): reduce indentation in ArchStatMember 2020-11-07 13:29:38 +00:00
rillig 9a8256f3d1 make(1): replace hashed with cached in comments
The hash table is just an implementation detail, not worth to be
mentioned in comments.
2020-11-07 13:24:06 +00:00
rillig 8842c564a7 make(1): fix access to undefined memory (since 1994-03-18)
This bug was added in arch.c 1.6, "Do extended-name archives".
2020-11-07 13:21:57 +00:00
rillig d6b80bab62 make(1): clean up ArchStatMember
Whether an archive entry is hashed or not is completely irrelevant.  The
interesting thing is whether it ends up in a cache.
2020-11-07 13:17:04 +00:00
rillig 0ae82920a2 make(1): document the relation between VARE_ASSIGN and preserveUndefined 2020-11-07 13:13:19 +00:00
rillig a7c9be28ec make(1): properly handle errors for malformed archive target names
Error messages don't belong on stdout.
2020-11-07 13:09:13 +00:00
rillig 68c0f9fa5d make(1): rename local variable in Arch_ParseArchive 2020-11-07 13:03:58 +00:00
rillig 7946dd8753 make(1): rename parameter of ArchSVR4Entry
It cannot be made a const string, so rather document it clearly that the
string is modified.
2020-11-07 12:58:55 +00:00
rillig 39248585d5 make(1): remove unused macro definitions from arch.c
These definitions have originally been added in arch.c 1.27 on
1998-05-21.  Even back then they had been unused, at least they had not
been used directly.  Since macros are expanded at their use site, there
could have been an indirect use, but that is not the case anymore.
2020-11-07 12:54:44 +00:00
rillig 76f4da4086 make(1): fix archive handling
It's no wonder that nobody is using the archive handling of make.  The
archives created by GNU binutils cannot be processed using make since the
format of the archive names has changed.  GNU binutils appends a slash to
the member names.  Support that format from now on.

Add more debugging output in ArchFindMember.  Since nobody uses this part
of make, it doesn't hurt that the debug output is now very verbose.

In Arch_Touch and Arch_TouchLib, move the snprintf to where it belongs.
There's no point modifying a local variable just to throw it away
afterwards.
2020-11-07 12:47:16 +00:00
rillig 01ba44dc94 make(1): extract ArchiveMember_HasName from ArchFindMember
Comparing a string to a space-padded string is complicated enough to be
extracted to a separate function.

The behavior changes a little bit.  Before, when searching for an archive
member with a short name (one that is space-padded in the archive), that
member was not searched using the AR_EFMT1 archive format.  This doesn't
matter in practice though since no regular archive member has a name
starting with "#1/".
2020-11-07 12:34:49 +00:00
rillig 4cda1b336f make(1): clean up comments in arch.c 2020-11-07 11:36:49 +00:00
skrll 90e54f80ea Whitespace 2020-11-07 10:48:17 +00:00
skrll f4dac48a35 Indent and annotate FP registers much like the general registers 2020-11-07 10:47:35 +00:00
rillig 3a6dda4ef7 make(1): add pp_skip_hspace to skip horizontal whitespace during parsing 2020-11-07 10:44:53 +00:00
skrll 062f897915 Note if a register is Caller / Callee saved 2020-11-07 10:43:47 +00:00
rillig 2387420d4d make(1): document InitDefSysIncPath 2020-11-07 10:25:28 +00:00
rillig 0f06ab6304 make(1): omit redundant bitwise or in Compat_Make 2020-11-07 10:23:20 +00:00
rillig a0c9252554 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.
2020-11-07 10:16:18 +00:00
skrll 4135af567b Fix the use of the contiguous bit by checking the output address as well. 2020-11-07 08:48:11 +00:00
skrll f91c082fda In pmap_devmap_bootstrap only set pmap_devmap_bootstrap_done if there
is an entry and ALL of the entries have been done.  The entry required
for EARLYCONS might not be the first/only one...
2020-11-07 08:33:50 +00:00
skrll aac04908b2 Print the devmap we're using in the debug output 2020-11-07 08:28:15 +00:00
rillig a9ae1df50a make(1): fix references to Var_SetWithFlags in tests 2020-11-07 00:07:02 +00:00
rillig ec28553452 make(1): rename Var_Set_with_flags to Var_SetWithFlags
Now that the function is exported from the var module, it should stick
to the naming conventions for public functions.
2020-11-07 00:06:13 +00:00
rillig ec691613fa make(1): rename VarSet_Flags to VarSetFlags
Most other types don't have an underscore as well.
2020-11-07 00:02:54 +00:00