On Fri, Dec 6, 2013 at 1:48 AM, Swapna Pawar <swapna.pa...@kpit.com> wrote: >>>Without a complete and reproducible example, I don't see how you can be >>>helped by others then. > We have attached one example with makefiles along with the sample .c file and > .h files. ... > Step 2: > - Rename 'makefile2' to 'makefile' > - Run the second makefile (i.e. makefile2) using 'make all' > command > - this time, it will not generate the dependency (.d) files
Ah, you misunderstood my suggestion: I said "do not specify %.d as a target in any rule", but you did more than that: you not only stopped having it as a target (on the left-side of the colon) but also stopped generating it. As explained on the page I linked to, you want to generate the .d files without naming them as targets. (You also can generate the .d files along with the .o files in one invocation of gcc, as described on that page at the link, but that's "just" an optimization.) If what I wrote doesn't make sense or doesn't seem to work, then READ THAT PAGE. Philip Guenther _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make