Module Name: src Committed By: rillig Date: Sat Nov 14 23:03:09 UTC 2020
Modified Files: src/usr.bin/make: main.c src/usr.bin/make/unit-tests: varmod-to-abs.exp varmod-to-abs.mk Log Message: make(1): switch cache for realpath from GNode to HashTable An unintended side effect from the GNode implementation was that the variable modifier :tA and the other places where cached_realpath are used could be affected by setting a variable in the global scope, thereby "redirecting" absolute paths to completely unrelated but existing paths. Another unintended side effect was that filenames containing a dollar sign would not be resolved correctly since the dollar sign would be expanded as a variable expression by Var_Set. While here, the debugging output for the realpath cache has been adjusted to the standard behavior. Previously, when a new entry was added to the cache, this was logged for the module VAR, as a side effect of calling Var_Set, but only if the preprocessor macro DEBUG_REALPATH_CACHE was defined at compilation time. When relative paths were purged from the cache because the current directory changed and logging for the DIR module was active, the log output went directly to stderr instead of the usual opts.debug_file. This deviation from the standard behavior was probably not intended as well. All logging concerning the realpath cache now goes into the standard debug log file and is controlled by the -dd option, not -dv. To generate a diff of this commit: cvs rdiff -u -r1.468 -r1.469 src/usr.bin/make/main.c cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-to-abs.exp cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-to-abs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.