Commit Graph

283736 Commits

Author SHA1 Message Date
rillig
7b010c3449 make(1): add test for misspelled directives
This test allows the other directive-* tests to focus on the purpose of
the individual directive, allowing these tests to continue after
parsing, without errors.
2020-12-13 00:46:25 +00:00
roy
fccfea72eb t_ossaudio was installed for clang, so remove gcc marking 2020-12-13 00:37:43 +00:00
roy
3728077580 diffutils: execl requires a NULL sentinel 2020-12-13 00:04:40 +00:00
rillig
6188dab3ce make(1): reduce indentation of ParseDirective 2020-12-12 21:35:21 +00:00
rillig
ffcddf1eb1 make(1): eliminate boolean argument of Var_Export 2020-12-12 21:20:30 +00:00
rillig
63402ea177 make(1): extract ExportVarsExpand from Var_Export 2020-12-12 20:00:51 +00:00
rillig
d32acaa90f make(1): fix undefined behavior when exporting ${:U } 2020-12-12 19:39:34 +00:00
rillig
32590eee1b make(1): extract ExportVars from Var_Export 2020-12-12 19:31:17 +00:00
rillig
ab1d2fd5b0 make(1): remove redundant call to strlen in Str_Words 2020-12-12 19:13:47 +00:00
rillig
bd57be24af make(1): rename Var_ExportVars to Var_ReexportVars 2020-12-12 18:53:53 +00:00
christos
b98337e278 Use the NetBSD-specific back-end. 2020-12-12 18:45:11 +00:00
christos
d95e80469e Add a NetBSD-specific back-end. (riastradh@) 2020-12-12 18:44:38 +00:00
christos
9050a28947 Be more clear and don't rely on cur being the first member. 2020-12-12 18:41:13 +00:00
uwe
ae95c1c5e7 vfs_cache - do not write outside allocated memory.
In cache_cpu_init allocate struct nchcpu, not struct nchstats_percpu.
cache_update_stats expects the former (that contains two percpu
structs).  Stat updates where smashing whatever was in the next pool
allocation.

Reported by martin@ as crashes in ptyfs on Krups.
2020-12-12 18:35:59 +00:00
christos
e84e9f5696 Don't try to memcpy (size_t)-1 bytes! 2020-12-12 18:19:34 +00:00
rillig
6f740ba472 make(1): error out on misspelled .export directives 2020-12-12 18:11:42 +00:00
rillig
2997f3b2f1 make(1): error out on misspelled .unexport-env 2020-12-12 18:00:18 +00:00
rillig
dc6cc25fbe make(1): add number of uncovered lines to coverage report 2020-12-12 16:54:20 +00:00
jmcneill
0eb6f089ee Add support for decoding Platform Communications Channel Tables ("PCCT"). 2020-12-12 16:08:39 +00:00
rillig
e7e184a2e8 make(1): add target test-coverage 2020-12-12 16:06:27 +00:00
rillig
e667d310c7 make(1): add test for a shell with error control
None of the predefined shells has error control, and the corresponding
code had not been covered by the existing unit tests.
2020-12-12 15:06:11 +00:00
rillig
9b6628dd29 make(1): clean up comments around JobPrintSpecials 2020-12-12 13:13:34 +00:00
rillig
322623ce41 make(1): rename ParseRunOptions to ParseCommandFlags 2020-12-12 12:56:56 +00:00
rillig
51a24315f9 make(1): extract ShellWriter_ErrOn from JobPrintCommand
It had been conceptually wrong to modify cmdFlags.echo just to suppress
echoing while enabling error checking.

Now the code in JobPrintCommand speaks for itself and no longer needs
any comments.  The few lines at the end have the sole purpose of
restoring the default state (echo + errChk) in the shell file.
2020-12-12 12:54:58 +00:00
rillig
52b5fecfcb make(1): fix typo in comment of JobPrintCommand 2020-12-12 12:28:06 +00:00
rillig
8538421bd4 make(1): reduce number of test cases in sh-flags.mk
The field job->echo is initialized in JobStart (and in JobOpenTmpFile).
After that, it is not modified anymore.  Therefore it is not necessary
to run these test cases redundantly.

The field job->ignerr, on the other hand, is modified later on.  For
these cases, the many remaining test cases are still needed.
2020-12-12 12:19:18 +00:00
rillig
c9c491710a make(1): demonstrate that -s and .SILENT have the same effect 2020-12-12 12:13:12 +00:00
rillig
a3c2b1275d make(1): make Job_Touch simpler 2020-12-12 11:33:10 +00:00
rillig
2a405df44e make(1): split JobFinishDone into smaller functions 2020-12-12 11:28:29 +00:00
rillig
5ea7eea1c6 make(1): extract JobFinishDone from JobFinish 2020-12-12 11:03:43 +00:00
wiz
25cc446e11 Mention pkg_install-20201212 2020-12-12 11:02:06 +00:00
wiz
de1f604daa merge pkg_install-20201212 2020-12-12 11:00:57 +00:00
rillig
83fedb2d4a make(1): clean up comments in JobFinish 2020-12-12 10:58:13 +00:00
rillig
e924b5d63d make(1): inline ShellWriter_PrintCmd
The parameter name escCmd was wrong for the call in JobPrintCommand.
2020-12-12 10:45:24 +00:00
rillig
1702e7bd48 make(1): rename Shell.exitFlag to errFlag
Now its name matches the user-visible .SHELL parameter again, reducing a
tiny bit of that mapping chaos.
2020-12-12 10:40:42 +00:00
rillig
e0fa644c43 make(1): move Job.xtraced to ShellWriter
This flag was placed wrong in the Job since it is only necessary as long
as the shell commands are written to the shell file.

Resetting it in JobStart and JobExec was completely misguided since that
is far away from writing the shell commands; this should have been done
in JobPrintCommands instead.

The status of this flag doesn't need to be printed in debugging mode
since it is controlled by a single command line option (-dx) and does
not interact with all the other switches.
2020-12-12 10:21:50 +00:00
rillig
b48717edf1 make(1): in jobs mode, extract echo control into separate functions
This removes the clutter from the code that calls these functions.  That
code is still complicated enough since it modifies variables it
shouldn't.
2020-12-12 10:05:15 +00:00
skrll
ff970d373c Move evbarm/fdt/fdt_memory.[ch] to sys/dev/fdt and simplify the api and
some operations.  This allows other architectures to use it.
2020-12-12 09:27:31 +00:00
tsutsui
1464ae0c47 Remove options (NVNODE, NBUF, and BUFPAGES) for small RAM machines.
These options make extracting binary sets much slower even on miniroot.
Instead, use "options BUFCACHE=5" (use 5% of memory for buffercache) and
also specify "-fno-unwind-tables" for COPTS to shrink INSTALL kernel.

Worth to pullup to netbsd-9.
2020-12-12 05:48:55 +00:00
tsutsui
562e3dda50 Fetch files via ftp using auto-fetching with URL per each binary set.
On slower machines, it takes more than five minutes to get a large
set binary and it could cause timeout of ftp control session, so
getting multiple binary sets in a single ftp session always fails.

Briefly tested on HP 9000/425e with 9.1 tree and ftp.netbsd.org binaries.
No particular comments on tech-install@ and port-hp300@.

Maybe should be pulled up to netbsd-9.
2020-12-12 05:23:21 +00:00
pgoyette
803bf850bc Also add the new test to the sets lists. 2020-12-12 03:03:14 +00:00
pgoyette
56b2bfc290 Add directory entry for new libossaudio test 2020-12-12 02:50:26 +00:00
rillig
38e8ece1e7 make(1): make printing of shell commands independent from the job 2020-12-12 02:03:36 +00:00
rillig
8db63e3598 make(1): in jobs mode, extract writing of shell commands
Right now, the test sh-flags.mk demonstrates many variants to configure
echoing of the shell commands (-s, .SILENT, '@'), error handling (-i,
.IGNORE, '-') and whether the commands are run (-n, -N, .MAKE,
.RECURSIVE, '+').

Even more variants are possible by configuring the shell to have error
control.  None of the built-in shell definitions has error control, so
it is unlikely that anybody uses them, but who knows.

Being able to configure these details at 3 levels is good, but what
makes all this really hard to understand is that some of these switches
interact in non-obvious ways.  For example, in jobs mode, a single
command can change job->ignerr (in JobPrintSpecialsEchoCtl), which will
affect all further commands of that job.

The goal of this refactoring is to make the code easier to understand by
making the switches on the job level constant and by moving all
modifications to them to the ShellWriter.
2020-12-12 01:42:33 +00:00
rillig
27790ccd7f make(1): inline local variable in ApplyModifiersIndirect 2020-12-12 00:53:23 +00:00
rillig
741fced9be make(1): in ApplyModifiersIndirect, rename local variable
In other places, the parsing position is abbreviated as pp as well.
2020-12-12 00:42:35 +00:00
rillig
df6fa3cc00 make(1): remove const from function parameters
These have been left-overs from refactoring, when these pieces were
extracted to separate functions.
2020-12-12 00:33:25 +00:00
rillig
f650bd93fa make(1): inline Targ_Ignore and Targ_Silent
Each of these functions was only used 2 times, and each of these calls
used a different part of the whole expression.
2020-12-12 00:05:05 +00:00
rillig
ad7305d632 make(1): clean up comments for command line options 2020-12-11 23:00:59 +00:00
rillig
a4123952e2 make(1): fix documentation of POSIX configuration
Empty commands are always allowed, whether in POSIX mode or not.
2020-12-11 22:53:08 +00:00