diff options
author | Ron Yorston <rmy@pobox.com> | 2022-11-03 15:49:11 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-11-03 15:52:48 +0000 |
commit | 5f64589b84a7349316a04cdbe607a5824459b731 (patch) | |
tree | dae9145ccae5e67012ab172789f9bcb099db40dd /init | |
parent | 0aceca8673c1d9a8bc34faa460389768efa08eb7 (diff) | |
download | busybox-w32-5f64589b84a7349316a04cdbe607a5824459b731.tar.gz busybox-w32-5f64589b84a7349316a04cdbe607a5824459b731.tar.bz2 busybox-w32-5f64589b84a7349316a04cdbe607a5824459b731.zip |
make: fixes to inference rules
Austin Group defect report 875 clarifies some aspects of inference
rules. The crux of the issue is related to chained inference rules
so it doesn't affect POSIX mode. The test makefile looks like this:
.SUFFIXES: .a .b .c
.a.c:
@echo .a.c
.b.c:
@echo .b.c
test.c: test.b
test.a:
test.b:
The correct output is deemed to be '.a.c'. Additional complications
are:
- whether or not the prerequisite files are present;
- the use of the suffixes '.a' and '.c' may result in the builtin
inference rule '.c.a' being considered.
In favourable circumstances pdpmake managed to give the correct
result, in unfavourable it reported circular dependencies or
segfaulted.
Changes to fix these issues are:
- When prerequisites are being recursively built the standard says:
'Upon recursion, each prerequisite shall become a target itself.'
Follow this requirement.
- At the end of make() the target being built should have its time
(as represented by n_tim in struct name) updated when any action
has been taken.
- When dyndep() is looking for prerequisites it should:
* skip candidates that are in the process of being built;
* consider whether an explicit candidate is a target, not whether
it has any commands associated with it.
pdpmake now behaves similarly to GNU make when presented with
makefiles like the above. bmake gives the incorrect output '.b.c'.
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions