Commit Graph

282653 Commits

Author SHA1 Message Date
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
rillig 94119fc036 make(1): rename Arch_MemMTime to Arch_MemberMTime
The abbreviation Mem was ambiguous, it could have meant memory as well.
2020-11-06 23:59:21 +00:00
rillig b3350f600e make(1): rename getBoolean and s2Boolean 2020-11-06 23:11:11 +00:00
rillig c6fda0697c make(1): fix comment of Error 2020-11-06 23:05:20 +00:00
rillig a5d8e822d9 make(1): clean up Cmd_Exec stylistically 2020-11-06 23:04:20 +00:00
rillig c699fce5aa make(1): merge duplicate code for skipping horizontal whitespace 2020-11-06 22:39:10 +00:00
rillig 13f3350e29 make(1): move name of inline functions to the beginning of the line 2020-11-06 22:37:07 +00:00
rillig b790432830 make(1): rename dieQuietly to shouldDieQuietly
It was too confusing to have a function named die that doesn't actually
die.  Plus, the return type int didn't give any clue about what the
function actually returns.
2020-11-06 21:20:31 +00:00
rillig 0a495e5a5e make(1): document DEBUG_LINT 2020-11-06 21:12:19 +00:00
rillig 345b90d029 make(1): sort and renumber debug flags 2020-11-06 21:09:06 +00:00
rillig aed622d743 make(1): fix typo from previous commit 2020-11-06 21:01:43 +00:00
rillig cb04a499e0 make(1): fix wrong condition in mkTempFile (since 2020-10-31)
The wrong negation had been added in main.c 1.414 from 2020-10-31.
Found by GCC 10, which complained about a potential null pointer
dereference in line 2188.
2020-11-06 20:59:52 +00:00
rillig 238b0c9726 make(1): fix tests directive-ifmake and varcmd with custom boolean
When make is compiled with -DUSE_UCHAR_BOOLEAN, these tests failed.
Merge duplicate code and don't depend on the actual value of TRUE when
evaluating conditions.
2020-11-06 20:50:48 +00:00
rillig 5909008f0e make(1): fix indentation in test directive-ifmake 2020-11-06 20:29:35 +00:00
rillig 0413618a39 make(1): document progname 2020-11-06 20:24:08 +00:00
rillig ccc3382b36 make(1): clean up comments in make.h 2020-11-06 20:20:00 +00:00
martin 35097c7d0a Minimize the installer for crunched install media 2020-11-06 19:47:31 +00:00
martin 6d554402a1 Bump ramdisk size slightly 2020-11-06 18:36:20 +00:00
christos 39d08fed26 PR/55789: Ruslan Nikolaev: New rump drivers 2020-11-06 15:35:33 +00:00