[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inconsistent use of vpath
From: |
Philip Guenther |
Subject: |
Re: Inconsistent use of vpath |
Date: |
Sun, 3 Jun 2012 18:26:16 -0700 |
On Sat, Jun 2, 2012 at 2:17 PM, normvcr <address@hidden> wrote:
> I have come across a puzzling problem while building with make.
>
> make all
>
> While building the targets, make eventually comes to building
> foo.o, but quits with an error, that it cannot find foo.cpp .
>
> However, when I now do, again, at the OS prompt:
>
> make all
>
> make picks up where it left off, and succeeds; the echo of the command
> shows that make
> is correctly using .../src/foo.cpp through the vpath directives.
>
> My question is, why did make not find .../src/foo.cpp in the course
> of the original invokation of make?
I believe the most common cause of this is because some makefile rule
builds a file other than address@hidden In this case, ../src/foo.cpp didn't
exist before the first run but did afterwards, but make didn't know
that some rule that it had run had created it. What was the rule that
generated ../src/foo.cpp?
Philip Guenther