chiark / gitweb /
Ian Jackson [Sun, 29 Dec 2019 11:00:39 +0000 (11:00 +0000)]
tests/example: Correct filename for for-test.mk
&^/ means "this source directory" so &^/lib/ in lib/ is nonsense and
produces lib/lib/. Also we didn't want the source directory:
anyway: config.status produces outputs in the build tree.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 28 Dec 2019 23:17:07 +0000 (23:17 +0000)]
regen.mk.in: Debugging, controlled by SUBDIRMK_REGEN_NDEBUG
And enable this in test/example/check.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 19:21:51 +0000 (19:21 +0000)]
tests: Test Perdir.sd.mk
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 28 Dec 2019 00:16:58 +0000 (00:16 +0000)]
README: Do not assert that all directive arguments are &-expanded
Since
Syntax: only some directives' RHS should be &-expanded
this has not been true for &:changequote, and it is not true in
the general case. It depends on the directive.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 22 Dec 2019 18:25:55 +0000 (18:25 +0000)]
README: Document NEWQUOTE\$ in changequote
This also adds a doctest.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 18 Dec 2019 21:44:15 +0000 (21:44 +0000)]
Syntax: Line joining with &\
make has a weird rule for line joining in recipes, where the \ is
retained. This is very annoying espcially when writing little scripts
in other languages in recipes. The GNU make documentation suggests
using a `define' block, in which the \ are still necessary, but
vanish. But that separates out the recipe from the rule, and also
demands that the recipe text be given a name.
(Note that .ONESHELL offers an alternative but sadly is not available
on a per-rule basis. This is even less sensible with non-recursive
make, where you might want different directories to have different
settings.)
So, provide &\ which does the other thing, swallowing the newline and
discarding the &\, even in rules.
Add a test case too.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 17:14:40 +0000 (17:14 +0000)]
tests: Test &TARGETS feature
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Mon, 9 Dec 2019 15:05:22 +0000 (15:05 +0000)]
Syntax: Refine &TARGETS_things, mostly to avoid # wrinkle
We will add a test case in a moment, since it is quite a noisy diff.
We have to upate clean.sd.mk, which uses this feature.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 17:08:19 +0000 (17:08 +0000)]
Syntax: only some directives' RHS should be &-expanded
In principle this is an incompatible change but only for strange input
files and only if they use &:changequote.
We need an ad-hoc test for this.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Mon, 9 Dec 2019 16:31:59 +0000 (16:31 +0000)]
Syntax: Provide &$VARIABLE
Testing is done by the doctests.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 15:43:38 +0000 (15:43 +0000)]
doctests: Test in sub/dir too
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 15:43:00 +0000 (15:43 +0000)]
doctests: Add missing & from include
This makes no difference in this file but we'll want the same in
sub/dir/ and they should be the same.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 15:42:16 +0000 (15:42 +0000)]
doctests: check: Define i and o vars
This makes bash -x debugging easier.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 24 Dec 2019 23:04:07 +0000 (23:04 +0000)]
doctests: Fail on extraction if we don't understand the README
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 01:21:54 +0000 (01:21 +0000)]
tests/filter/check: Enable pipefail
So we must use bash.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 24 Dec 2019 00:49:00 +0000 (00:49 +0000)]
doctests: Extract and use
Include the doctests from the toplevel Subdir.sd.mk.
In check, extract the doctests, and seddery the expected output into
the combined expected output file. This involves adding a comment in
Subdir.mk.expected to indicate where the doctests will appear.
In update-expected, contrive to strip the doctest output back out of
the actual output so we can update only the manually-edited part.
Consequential changes to MAKEFILE_TEMPLATES in main.mk.expected
and .gitignore.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 12:55:48 +0000 (12:55 +0000)]
doctests: Fix newline handling in changequote mode section
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 12:55:02 +0000 (12:55 +0000)]
README, doctests: Use NEWQUOTE instead of STUFF
STUFF is rather generic. Also we want to seddery it in the rubric for
the doctest to avoid it triggering.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 22 Dec 2019 18:27:10 +0000 (18:27 +0000)]
doctests: Provide extract-doctest
This is not called yet. There are a few things that need fixing
first.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 22 Dec 2019 18:25:08 +0000 (18:25 +0000)]
README: Do not use => inappropriately
Our notation is that => introduces the ouput string.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Mon, 9 Dec 2019 14:49:43 +0000 (14:49 +0000)]
Syntax: Use &\ for escaping; abolish \&
"\&" causes lots of trouble, including difficulty specifying certain
resulting strings.
Previously I proposed a scheme using &$@ but this is only useful to
provide a way to write &s.
The $-doubling regime which will come later wants a way to produce a
single literal $, so introduce that now using the same syntax.
And &\ feels quite natural to me.
Incompatible change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 10 Dec 2019 01:21:43 +0000 (01:21 +0000)]
Syntax: Introduce &. and friends
Incompatible change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 01:09:18 +0000 (01:09 +0000)]
generate: Provide $var_prefix_name to process_input_mk
Nothing uses this yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 11 Dec 2019 13:24:47 +0000 (13:24 +0000)]
Syntax: Introduce &:changequote
Incompatible change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 24 Dec 2019 00:28:30 +0000 (00:28 +0000)]
generate: Track output Makefiles properly
This fixes a bug where the intermediate directory Makefile was not
included whe it should be.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 24 Dec 2019 00:18:46 +0000 (00:18 +0000)]
tests/filter: Add .../sub/dir
This will let us test output which depends on the subdirectory,
which is kind of the whole point...
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Wed, 25 Dec 2019 17:28:34 +0000 (17:28 +0000)]
tests: Shuffle, make tests/check run all the tests
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 21 Dec 2019 11:40:54 +0000 (11:40 +0000)]
tests/filter: New test framework for generate
This test case bypasses autoconf and runs generate directly.
It also gives us somewhere to write examples of each of the
&-expansions without further cluttering test-example.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 22 Dec 2019 19:52:10 +0000 (19:52 +0000)]
generate: Handle nodes with no own Subdir.sd.mk
If a directory is not mentioned on the command line, we would assume
it had a Subdir.sd.mk anyway. Instead, expect it not to have one.
We do still generate a per-subdirectory fragment for such unmentioned
nodes: this serves to wire its children ino the parent, make running
`make' in that directory possible, etc.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 21 Dec 2019 11:34:12 +0000 (11:34 +0000)]
generate: Add missing final newline to main.mk
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 21 Dec 2019 11:17:41 +0000 (11:17 +0000)]
tests: Add some section comments.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 21 Dec 2019 11:15:23 +0000 (11:15 +0000)]
example: Add a comment next to for-test bits
This may help unconfuse people using this as an example.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 17 Dec 2019 22:19:37 +0000 (22:19 +0000)]
README: Fix a mistake in the file reference table
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 28 Dec 2019 22:18:19 +0000 (22:18 +0000)]
Merge from secnet
Ian Jackson [Sun, 8 Dec 2019 23:12:25 +0000 (23:12 +0000)]
&TARGETS*: make autogenerated targets .PHONY
Suggested-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 8 Dec 2019 18:06:50 +0000 (18:06 +0000)]
docs: Minor fix to README
Reported-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 8 Dec 2019 18:06:37 +0000 (18:06 +0000)]
docs: Minor fixes to regen.mk.in comment
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 3 Dec 2019 20:44:11 +0000 (20:44 +0000)]
test-example: Fix a dependency on Subdir.mk
This should be *this* directory's Subdir.mk.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 3 Dec 2019 20:42:36 +0000 (20:42 +0000)]
test-example: Replace a literal with $@
No functional change. This makes the command a bit more general.
At some much later point this will make a future commit simpler...
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 6 Dec 2019 22:59:57 +0000 (22:59 +0000)]
comprehensive-test: Test that clean target works
We have to have a list of exceptions for the output of configure.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Nov 2019 22:50:21 +0000 (22:50 +0000)]
build system: Add some missing clean and cdeps hooks
Tested with
git-clean -nX | grep -v \*~ | grep -v '~$' | grep -v Makefile | grep -v '\.mk$'
We now clean, additionally,
.msgcode-test.d
.version.d
ipaddrset.confirm
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Nov 2019 22:48:40 +0000 (22:48 +0000)]
build system: Switch to using subdirmk's clean and cdeps
Even in the toplevel. This cleans some more things but doesn't fix
all the lack of clean bugs. Right now the effect is to remove
Subdir.mk.tmp and main.mk.tmp, if they exist.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 5 Dec 2019 01:48:04 +0000 (01:48 +0000)]
stest: Fix breakage if nproc is not installed
This needs to echo 1, not try to run it. The effect is a message on
stderr and passing `make -j'. That is actually mostly OK since we
have few tests right now...
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 15 Nov 2019 23:32:15 +0000 (23:32 +0000)]
build system, tests: Marginally speed some things up with -f
This avoids an additional redirection through the stub Makefiles.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 6 Dec 2019 23:08:36 +0000 (23:08 +0000)]
comprehensive-test: Test the stest/ and mtest/ directories
Running these separately after make clean will help spot missing
dependencies.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 6 Dec 2019 23:21:34 +0000 (23:21 +0000)]
pretest-to-tested: Script for helping run comprehensive-test
This runs it on every commit between tested and pretest, advancing
tested as it goes.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 7 Dec 2019 15:28:29 +0000 (15:28 +0000)]
subdirmk: Suppress MAKEFILE_TEMPLATES when running `make clean'
See the README hunk for the reasoning.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 6 Dec 2019 22:24:26 +0000 (22:24 +0000)]
comprehensive-test: new script
This does an in-tree build, and two out-of-tree builds, one absolute,
and one relative. It runs `make check' (not fullcheck, which is very
slow indeed).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 7 Dec 2019 15:17:12 +0000 (15:17 +0000)]
subdirmk: break out subdirmk_target in generated Makefile
We are going to want to reuse this. Make it a simply-expanded make
variable rather than a perl variable, so that it only gets computed
once.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 5 Dec 2019 02:21:56 +0000 (02:21 +0000)]
stest/udp-preload: Be more relaxed about paths
We would give ENAMETOOLONG if the specified path plus a maximal IPv6
address string wouldn't fit. But in practice we don't use IPv6
addresses which stringify to anything that long, and this imposes an
annoyingly short restriction on the length of the emulation socket
directory path (a restriction which is going to be not met in my own
working tree when I add more sophisticated tests).
Instead, pass the suffix string to sun_prep and do the length check on
the actual length. This means that addresses with short strings can
work, even if in principle addresses with long strings might fail.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 5 Dec 2019 02:15:45 +0000 (02:15 +0000)]
stest/udp-preload.c: Fix error handling of sun_prep
If sun_prep returned an error (eg, path too long), this would
segfault.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 29 Nov 2019 20:18:14 +0000 (20:18 +0000)]
build system: Cope if HEAD refers to a packed ref
In this case, there may be no corresponding .git/refs/<whatever>.
Simply tolerate this.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 7 Dec 2019 15:28:29 +0000 (15:28 +0000)]
subdirmk: Suppress MAKEFILE_TEMPLATES when running `make clean'
See the README hunk for the reasoning.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 7 Dec 2019 15:17:12 +0000 (15:17 +0000)]
subdirmk: break out subdirmk_target in generated Makefile
We are going to want to reuse this. Make it a simply-expanded make
variable rather than a perl variable, so that it only gets computed
once.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 3 Dec 2019 23:07:00 +0000 (23:07 +0000)]
subdirmk: stub Makefiles: filter out `all'
Otherwise `make all' generates this:
Makefile:3: target 'all' given more than once in the same rule
which is harmless but mildly irritating.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 3 Dec 2019 23:07:00 +0000 (23:07 +0000)]
subdirmk: stub Makefiles: filter out `all'
Otherwise `make all' generates this:
Makefile:3: target 'all' given more than once in the same rule
which is harmless but mildly irritating.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Mon, 25 Nov 2019 13:35:00 +0000 (13:35 +0000)]
Ian Jackson [Sun, 24 Nov 2019 22:45:07 +0000 (22:45 +0000)]
subdirmk: clean.sd.mk: Delete .*~ too (eg .gitignore~)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Nov 2019 22:45:07 +0000 (22:45 +0000)]
subdirmk: clean.sd.mk: Delete .*~ too (eg .gitignore~)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Nov 2019 22:44:36 +0000 (22:44 +0000)]
subdirmk: cdeps.sd.mk: Honour &CDEPS_OBJECTS
This makes this facility more flexible.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Nov 2019 22:44:36 +0000 (22:44 +0000)]
subdirmk: cdeps.sd.mk: Honour &CDEPS_OBJECTS
This makes this facility more flexible.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Nov 2019 22:08:45 +0000 (22:08 +0000)]
Ian Jackson [Sat, 23 Nov 2019 18:42:31 +0000 (18:42 +0000)]
subdirmk: Fix bug in regen.mk.in
Apparently, if you just write `;', make knows that the command can't
have done anything. It therefore concludes tha the target file cannot
have been updated and doesn't bother rereading it.
The result is that you end up using last run's makefiles.
Writing @: fixes this.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sat, 23 Nov 2019 18:42:31 +0000 (18:42 +0000)]
subdirmk: Fix bug in regen.mk.in
Apparently, if you just write `;', make knows that the command can't
have done anything. It therefore concludes tha the target file cannot
have been updated and doesn't bother rereading it.
The result is that you end up using last run's makefiles.
Writing @: fixes this.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 24 Nov 2019 18:43:20 +0000 (18:43 +0000)]
Ian Jackson [Sun, 17 Nov 2019 01:26:26 +0000 (01:26 +0000)]
subdirmk: Change stub force target to `run-main.mk'
This produces significantly better error messages:
[some error from actual makefiles]
make[1]: Leaving directory '/home/ian/wherever'
Makefile:6: recipe for target 'run-main.mk' failed
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 17 Nov 2019 01:26:26 +0000 (01:26 +0000)]
subdirmk: Change stub force target to `run-main.mk'
This produces significantly better error messages:
[some error from actual makefiles]
make[1]: Leaving directory '/home/ian/wherever'
Makefile:6: recipe for target 'run-main.mk' failed
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 17 Nov 2019 01:21:51 +0000 (01:21 +0000)]
subdirmk: Fix bug when target in subdir exists
If you try to make a file that exists, the % rule doesn't seem to
match. But providing the dependency for all of $(MAKCMDGOALS)
works.
We have to mention `all' explicitly because it might not appear in
$(MAKECMDGOALS).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Sun, 17 Nov 2019 01:21:51 +0000 (01:21 +0000)]
subdirmk: Fix bug when target in subdir exists
If you try to make a file that exists, the % rule doesn't seem to
match. But providing the dependency for all of $(MAKCMDGOALS)
works.
We have to mention `all' explicitly because it might not appear in
$(MAKECMDGOALS).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 23:41:59 +0000 (23:41 +0000)]
changelog: start 0.5.2~
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 23:13:24 +0000 (23:13 +0000)]
stest: Suppress a GCC warning (for stretch)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 23:10:09 +0000 (23:10 +0000)]
finalise 0.5.1
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 23:09:54 +0000 (23:09 +0000)]
make-secnet-sites: Add test for -P option
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 23:04:12 +0000 (23:04 +0000)]
make-secnet-sites: Actually fix -P option (!)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 23:04:00 +0000 (23:04 +0000)]
mtest: Provide for sedderyb
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 22:32:28 +0000 (22:32 +0000)]
Release checklist: mention Subdir.sd.mk
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 22:13:07 +0000 (22:13 +0000)]
changelog: Prepare 0.5.1 (more)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 21 Nov 2019 01:01:23 +0000 (01:01 +0000)]
changelog: Prepare 0.5.1
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 22 Nov 2019 22:30:32 +0000 (22:30 +0000)]
Ian Jackson [Tue, 19 Nov 2019 00:42:31 +0000 (00:42 +0000)]
build system: Add warning suppressions for GCC9
We suppress 4 instances like:
udp.c:113:45: error: increment of a boolean expression [-Werror=bool-operation]
113 | if (us->experienced[!!dest][af][success]++)
| ^~
This is a very convenient idiom (using the saturating property of
boolean addition) and there is no sensible replacement.
And we suppress 6 instances like:
tun.c:322:6: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
322 | strncpy(ifr.ifr_name,st->interface_name,IFNAMSIZ);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All write to ifr_name. strncpy is precisely right for this, since the
API supports non-null-terminated names of length IFNAMSIZ. That is
why I used strncpy.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 19 Nov 2019 01:16:29 +0000 (01:16 +0000)]
polypath.c: Fix a compiler warning
polypath.c:520:20: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
520 | *allreasonable *= reasonable;
| ^~
This is not really a very helpful suggstion because there is no &&=.
Happily the compiler doesn't (currently) complain about &= which is
the same when both arguments are bools.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 19 Nov 2019 01:03:44 +0000 (01:03 +0000)]
make-secnet-sites: sort the properties in level.output_props
This makes the test suite less sensitive to python version.
Now it works with 2.7.13, 3.5.3,, 3.7.5.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 19 Nov 2019 00:54:58 +0000 (00:54 +0000)]
make-secnet-sites: sort the properties
This makes the test suite less sensitive to python version.
Now it works with 2.7.13, 3.5.3.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 19 Nov 2019 00:51:10 +0000 (00:51 +0000)]
mtest: diff: Write output files and seddery rune
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 19 Nov 2019 00:49:54 +0000 (00:49 +0000)]
tests: Introduce `diff' proc
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Tue, 19 Nov 2019 01:04:47 +0000 (01:04 +0000)]
build system: tests: Add missing standard clean
We want (i) recursion from the parent (ii) automatic cleaning of
&CLEAN (which is set by cdeps.sd.mk, amongst other things).
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 15 Nov 2019 22:59:58 +0000 (22:59 +0000)]
build system: Drop `check' from `all'
Otherwise there's no way to make everything but not run tets.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 15 Nov 2019 22:56:34 +0000 (22:56 +0000)]
build system: Do always regenerate version.o
We make two changes which affect only the litle recursive make of
version.o. We only build version.o in the little sub-make when
relinking and then we want to always do it. So the setting of OBJECTS
is pointless, and instead we make version.c depend on FORCE.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Fri, 15 Nov 2019 22:37:12 +0000 (22:37 +0000)]
build system: Fix nits following switch to subdirmk
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 20:23:27 +0000 (20:23 +0000)]
Docs: Fix some leftover ; and ,
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 19:45:50 +0000 (19:45 +0000)]
subdirmk: Docs, go back to ^ and ~
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 19:45:50 +0000 (19:45 +0000)]
subdirmk: Docs, go back to ^ and ~
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 19:40:59 +0000 (19:40 +0000)]
subdirmk: Go back to ^ and ~
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 19:40:59 +0000 (19:40 +0000)]
subdirmk: Go back to ^ and ~
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 19:36:39 +0000 (19:36 +0000)]
subdirmk: Implement new syntax
But I plan to go back to ^ and ~
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 19:36:39 +0000 (19:36 +0000)]
subdirmk: Implement new syntax
But I plan to go back to ^ and ~
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 19:02:07 +0000 (19:02 +0000)]
Ian Jackson [Thu, 14 Nov 2019 15:43:14 +0000 (15:43 +0000)]
docs: Discuss variable settings and inclusion order
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 15:42:19 +0000 (15:42 +0000)]
subdirmk: Actually clear right variable
"subdirmk: main.mk: clear SUBDIRMK_MAKEFILES MAKEFILE_TEMPLATES"
cleared MAKEFILES by mistake (this was a rebase transposition error -
this commit originally came before "subdirmk: Rename MAKEFILES
variable".
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Ian Jackson [Thu, 14 Nov 2019 14:54:48 +0000 (14:54 +0000)]
docs: Abolish all absolute pathname syntaxes
These are rare and make things much more confusing.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>