[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue with automatic dependency generation in gmake
From: |
CHEN Cheng |
Subject: |
Re: Issue with automatic dependency generation in gmake |
Date: |
Fri, 11 Sep 2009 09:20:53 +0800 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
On Thu, Sep 10, 2009 at 11:06:22AM -0700, Varambally, Dheeraj B wrote:
> Hi,
>
> I'm trying to automatically generate the dependency files from my C compiler
> and including it using the -include directive But gmake does not seem to
> abort upon encountering the first compile error in a C source file. It seems
> to continue building the rest of the files . How can we make gmake abort upon
> encountering the first error. It works fine if I do not include the
> dependency file.
>
Which phase was the first compile error encountered in? The dependency
file generation phase, or the real make phase?
Does it continue with errors in the real make phase?
> Here is a snapshot of what I'm trying to do
>
> Target : src
> $(CC) -c $(CFLAGS) -makedep $(DEPFILE)
>
>
> -include $(DEPFILE)
>
Since gmake builds ahead all the included dependency files as goals,
in your case (assumed), it compiles your C files as the generation of
dependency files. And perhaps that why you don't see the errors stop.
Better to seperate the dependency generation from the real compilation.
HTH,
Cheng