From 63d6fe28e7dd1a1c3b4d668c18d257cd3dd5600c Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 12 Feb 1990 09:32:04 +0000 Subject: [PATCH] Added a change suggested by Cees Verstoep --- util/cpp/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/cpp/main.c b/util/cpp/main.c index e4494ecad..6d8305753 100644 --- a/util/cpp/main.c +++ b/util/cpp/main.c @@ -110,6 +110,13 @@ list_dependencies(source) s++; *s++ = 'o'; *s = '\0'; + /* the source may be in another directory than the + * object generated, so don't include the pathname + * leading to it. + */ + if (s = strrindex(source, '/')) { + source = s + 1; + } } else source = 0; } -- 2.34.1