From: ceriel Date: Mon, 12 Feb 1990 09:32:04 +0000 (+0000) Subject: Added a change suggested by Cees Verstoep X-Git-Tag: release-5-5~1826 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=63d6fe28e7dd1a1c3b4d668c18d257cd3dd5600c;p=ack.git Added a change suggested by Cees Verstoep --- 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; }