Summary: Stop looking for an included file once found, even
if cannot be opened.
Submitted by: dgoncharov
Submitted on: Sun 09 Feb 2020 05:07:07 PM UTC
Severity: 3 - Normal
Item Group: None
Assigned to: None
Discussion Lock: Any
Component Version: None
Operating System: None
Fixed Release: None
Triage Status: None
Stop looking for an included file once found, even if cannot be opened.
If the current directory contains a not readable file and an additional
include directory contains a readable file the current file is silently
ignored and the file from the additional include directory is silently
This can come as an unpleasant surprise and is hardly useful.
This behavior contradicts gnu make manual and usual practice in similar
Gnu make manual explicitly states that lookup continues only if the file is
Gnu make itself stops looking for a prerequisite file in vpath directories,
once it found one, even if cannot be opened.
Gnu make stops looking for an included file once it found one and the found
one turns out to be corrupt or a directory.
Similarly a compiler stops looking for a header once it found one, even if
cannot be opened.
The change from rmfiles to unlink in features/included is needed to have the
test pass when -keep is specified.