[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU make, gcc, and auto-dependencies
From: |
Travis Spencer |
Subject: |
Re: GNU make, gcc, and auto-dependencies |
Date: |
Thu, 6 Jan 2005 07:43:39 -0800 |
User-agent: |
All mail clients sucks. This one just sucks less. |
On Thu, Jan 06, 2005 at 10:06:34AM +0100, address@hidden wrote:
> Is it maybe because you've listed a dir as prerequisite here?
>
That wasn't it. I issued a make veryclean followed by a make command.
It failed though because the build directory was deleted by the
veryclean target. I recreated the directory manually, issued the make
again, and it completed successfully. Then, I appended an empty
string into one of my C files called kill.c, and remade it. I got the
same error again:
pc -c -o build/kill.o build/kill.p
make: pc: Command not found
make: *** [build/kill.o] Error 127
I think this might be because the P file is older than the object
file. When a source file is updated, make finds out which
dependencies it has. It concluded that the corresponding P and O
files are needed, so it tries to rebuild them starting with the
prerequisite file; however, there is no rule for building P files, so
it gives up saying that it can't find "pc," a command that make has
presumed is responsible for building P files from C files.
It is these lines in the debug output that make me think this is the case:
Finished prerequisites of target file `build/kill.o'.
Prerequisite `build/kill.p' is older than target `build/kill.o'.
Prerequisite `kill.c' is newer than target `build/kill.o'.
Prerequisite `vers.h' is older than target `build/kill.o'.
Must remake target `build/kill.o'.
Why is the P file being considered a prerequisite for the O file?
Could it be because make is looking for all files with the same root
name as it seems to be saying in this line of debug output:
Trying pattern rule with stem `kill'.
...
Trying implicit prerequisite `build/kill.p'.
Found an implicit rule for `build/kill.o'.
I appreciate the feedback and look forward to any other suggestions.
--
Regards,
Travis Spencer