CVS commit: src/usr.bin/make

"Simon J. Gerraty" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	sjg
Date:		Fri Jul  3 18:58:40 UTC 2026

Modified Files:
	src/usr.bin/make: meta.c

Log Message:
meta_oodate: resolve relative paths

Fix a bug where meta_oodate fails to detect a missing file.
This can happen when the path name in .meta file is relative to
a subdir.

When faced with a relative path, call meta_resolve_path to
attempt to resolve it via
latestdir	the last dir we read/accessed
lcwd		the last dir we chdir to
cwd		the original cwd

If the path is "." just return lcwd.
If a relative path is not found, and should have been the target of
'W'rite, 'M'ove or 'L'ink, that we would normally add to missingFiles,
add $lcwd/$path to missingFiles - even if we guessed wrong, we will
make the target out-of-date as needed.

When removing a relative path from missingFiles due to a 'D'elete or 'M'ove
search using each of latestdir, lcwd and cwd as prefix.


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/usr.bin/make/meta.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.