Commit Graph

279481 Commits

Author SHA1 Message Date
rillig b1ac54abf1 make(1): improve error message in case of unfinished modifiers
The previous error message "Unclosed substitution" was wrong for several
reasons.

It is not about "unclosed", but about "unfinished" since in the
:@var@...@ modifier the missing '@' does not really close anything.

The word "substitution" may have originated in a time where :S and
:from=to were the only modifiers, and these were indeed substitutions,
but several other modifiers aren't.

The :S and :C modifiers allow an arbitrary delimiter, therefore it is
helpful to enclose the delimiter in quotes, just in case someone chooses
')' or '{' or even ' ' as delimiter.
2020-08-08 13:27:42 +00:00
rillig 2cb05daf5c make(1): align the code in Var_Append with Var_Set
The code has the same effect in both functions, therefore it should also
look the same.
2020-08-08 13:17:39 +00:00
rillig 186e0c68e8 make(1): consistently use postfix-increment 2020-08-08 13:13:34 +00:00
rillig f609a55b29 make(1): add test for the :gmtime modifier with indirect time 2020-08-08 13:09:55 +00:00
rillig 7c0e567b16 make(1): clean up VarStrftime
The parameter names were confusing and had outdated types.
2020-08-08 13:05:24 +00:00
rillig 06931d912a make(1): add test for unknown sub-modifier of the :S modifier 2020-08-08 13:03:13 +00:00
rillig 01cc1d54b4 make(1): clean up Var_UnExport
Mark the parameter as constant since it is not modified.

Remove tests for '\n' since these can never succeed.

newenv can never be NULL since neither of bmake_malloc or bmake_realloc
returns NULL.

Improve variable names: vlist was too unexpressive.

Add debug logging since unexporting variables is an uncommon operation
that directly affects the observable environment of the child processes.

Fix CRLF line endings in a few unit tests.
2020-08-08 13:00:07 +00:00
rillig f82a1e0dc7 make(1): clean up Var_Export
The string from the .export directive can never be NULL.

The test for local single-char variables is already done in Var_Export1.
2020-08-08 12:43:06 +00:00
rillig bf2986782c make(1): change return type of Var_Export1 to Boolean 2020-08-08 12:39:48 +00:00
rillig 5ce03c140f make(1): fix yoda-style comparisons in var.c 2020-08-08 12:37:37 +00:00
rillig 46a0c1e071 make(1): condense comment for ApplyModifiers
This comment only repeats what is written in the manual page.
Furthermore, it didn't get updated consistently.  The missing modifiers
were :_, :gmtime, :localtime, :hash, :Q, :range, :Or.
2020-08-08 12:35:15 +00:00
rillig 4ce4d5d943 make(1): fix debug output for indirect modifiers
The trailing part after the modifier was confusing at best.  It does
make sense to log the string from p to p+rlen, but not from p+len to
p+len+len.

Consistently use double quotes for strings.
2020-08-08 12:32:26 +00:00
rillig cc2e211d78 make(1): add test for debugging message for indirect modifiers
The current output format stops in the middle of the next modifier,
which was probably not intended.
2020-08-08 12:22:10 +00:00
christos 230f192a92 Find the if a device points to an active filesystem by looking at the mount
list.
2020-08-08 11:44:55 +00:00
macallan ace6ee3736 the drawing engine needs a stride that's a multiple of 8 in pixels, so
let's actually distinguish between width and stride, and always round the stride
up to the next multiple of 8
now modes with odd widths work
2020-08-07 23:31:07 +00:00
rillig c601ed6750 make(1): format the code in var.c a little more consistently 2020-08-07 20:35:03 +00:00
wiz 29f550240c Remove trailing whitespace. 2020-08-07 20:17:59 +00:00
rillig 5482409e1c make(1): add tests for creative variable names in the :@ modifier 2020-08-07 20:10:35 +00:00
rillig 98f2f3e4fd make(1): add test for exporting variables 2020-08-07 19:24:27 +00:00
christos 043adc738f pcu_available_p is only used in KASSERT(), fix non-diagnostic build. 2020-08-07 18:46:00 +00:00
jdc dc4dbbe4f6 Also set the bits for horizontal sync start delay. This makes machfb work
correctly for some modes (e.g. 1152x720).
Modify mach64_get_mode() to get the mode from the chip registers (only used
with debug on).
Whilst here tidy up some other debug output.
2020-08-07 18:26:33 +00:00
christos ad1efe3529 accmode should be accmode_t 2020-08-07 18:14:21 +00:00
christos 9a91acb10a Catch up with genfs_can argument changes 2020-08-07 18:13:19 +00:00
christos ccc5c96d19 Catch up with lktype addition. 2020-08-07 17:59:32 +00:00
rillig fa943d1d8d make(1): document why the suffixes test must stay disabled 2020-08-07 14:40:59 +00:00
rillig 8f5dddc2c9 make(1): enable test phony-end
This at least documents the actual behavior.  Not sure what the expected
behavior is and why.
2020-08-07 14:26:18 +00:00
fcambus a7806f4de1 Use CPU_IS_PRIMARY macro on alpha and sparc64. 2020-08-07 14:20:08 +00:00
rillig 174675d6b2 make(1): enable test for .IMPSRC
Having this test disabled was very confusing since its content didn't
match the actual behavior, and this also differs from the GNU make
behavior.
2020-08-07 13:43:50 +00:00
christos 503a97f998 PR/55548: Soumendra Ganguly: Since isatty(3) is implemented using
tcgetattr(3), call it directly to avoid calling it twice. This
makes error handling more precise. Also don't call err(3) when
tcsetattr(3) fails.
2020-08-07 13:36:28 +00:00
skrll 599fa05849 Provide a pmap_segtab_deactivate for symmetry with pmap_segtab_activate
and use it in pmap_deactivate

Call pmap_md_xtab_{,de}activate from pmap_segtab_{,de}activate to be used
for PMAP_HWPAGEWALKER and any caches ops that might be required.

Provide empty (for now) pmap_md_xtab_{,de}activate functions on the
platforms that use sys/uvm/pmap
2020-08-07 07:19:45 +00:00
rillig 9e214e56ad make(1): one file per line in the Makefile
Suggested by sjg.
2020-08-07 05:13:04 +00:00
snj 61057d564f s/developement/development/ 2020-08-07 00:43:47 +00:00
snj 036ace7152 fix typo.
new sentence, new line.
2020-08-07 00:27:11 +00:00
rillig 7b21ea36c4 make(1): use consistent name for result of Cmd_Exec 2020-08-06 17:51:21 +00:00
rillig 6aab009d48 make(1): reduce code size in :D and :U modifier
This affects both the source code size and the binary code size, at
least on x86_64.
2020-08-06 17:48:41 +00:00
rillig 2b65efbd0d make(1): clean up code for variable handling
The VarFlags type doesn't need an underscore.  The underscore is
typically only used for exported functions.

Document the memory allocation details for Var.name.

Use consistent names for Hash_Entry variables.  Quite possibly one of
them was a Lst_Node in ancient times, but that's not a reason to keep
this variable name forever.
2020-08-06 17:32:40 +00:00
rillig f8e2689802 make(1): remove unused macro Hash_Size 2020-08-06 17:22:15 +00:00
sjg db1bc126a0 Use -r for recursive 2020-08-06 16:23:52 +00:00
sjg d853df19d7 Update test result 2020-08-06 16:09:33 +00:00
sjg 6f16d24167 Remove VARE_WANTRES for LINT
We need the parsing checked.
I might make sense to add a VARE_LINT flag for corner cases.
Time will tell.

Reviewed by: rillig
2020-08-06 16:03:04 +00:00
skrll bf8d907e75 Centralise SYNC/BDSYNC in asm.h and introduce a new LLCSCSYNC and use it
before any ll/sc sequences.

Define LLSCSYNC as syncw; syncw for cnMIPS - issue two as early cnMIPS
has errat{um,a} that means the first can fail.
2020-08-06 10:00:20 +00:00
knakahara e3a3fcce9b add missing {IP,IP6}_STAT_NOIPSEC to netstat. 2020-08-06 07:38:54 +00:00
ryo 867351c480 No need to recover from fault from within a hardware interrupt handler. 2020-08-06 06:50:39 +00:00
ryo ca0d02f942 revert the changes of http://mail-index.netbsd.org/source-changes/2020/08/03/msg120183.html
This change is overengineered.
bus_space_{peek,poke}_N does not have to be reentrant nor available for interrupt context.

requested by skrll@
2020-08-06 06:49:55 +00:00
rillig 70ce9aabc4 make(1): add rationale and expected behavior to "recursive" test 2020-08-06 05:52:45 +00:00
rillig 4d4fd97a93 make(1): add test for unintended "recursive variable" in -dL mode 2020-08-06 05:36:32 +00:00
rillig 237062f441 make(1): revert previous commit; "make retest" was already possible
What I really meant to allow was to run "make sync-mi" directly from the
main directory.  But adding that to TARGETS didn't do anything.
2020-08-06 05:32:26 +00:00
rillig 10728724ed make(1): allow "make retest" directly from the main directory 2020-08-06 05:27:31 +00:00
maxv 8994067651 Add CTASSERT. 2020-08-05 16:36:33 +00:00
tsutsui 0d5c31706f No need to build fbcmap_mi.c in each DDX server.
Per upstream commit:
 https://cgit.freedesktop.org/xorg/xserver/commit/?id=432fc37e2ca833f1ec3cb614cbdc3a7ae13f22b7
> Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb
> or libwfb convenience library.

Tested on sun3 and x68k.
2020-08-05 15:48:09 +00:00