Added a change suggested by Cees Verstoep
authorceriel <none@none>
Mon, 12 Feb 1990 09:32:04 +0000 (09:32 +0000)
committerceriel <none@none>
Mon, 12 Feb 1990 09:32:04 +0000 (09:32 +0000)
util/cpp/main.c

index e4494ec..6d83057 100644 (file)
@@ -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; 
        }