dupuy@CS.COLUMBIA.EDU (Alexander Dupuy) (03/17/89)
I finally found that the bug I was complaining about in the GDB Makefile was really a bug in GNU Make, as you had suggested. The symptom is that implicit rules are not executed if the source for the dependency is created indirectly as a result of another target. GNU Make decides it should execute the implicit rule, but it fails to do so. Here's a log of a simple example, showing circumstatnces where it fails, and another where it succeeds. Admittedly, /bin/make on SunOS 4.0 gets this wrong as well, but at least it would make sense to complain about not having been able to build a.o. At any rate, now I understand why GNU Make was mysteriously failing with my scheme of separate build trees for GDB, where dep.c was created by symlinking to a file in another directory. @alex Script started on Fri Mar 17 02:43:05 1989 cs% cat Makefile .PHONY: all all: links a.o links: touch a.c touch links Make%: a.o: d.h cs% ls Makefile d.h typescript cs% make touch a.c touch links cs% ls Makefile a.c d.h links typescript cs% rm links cs% make touch a.c touch links cc -c a.c -o a.o script done on Fri Mar 17 02:44:40 1989