[gccsdk] make: File '-c' not found

WPB wpb.feed at gmx.com
Sat Jan 31 08:31:46 PST 2015

On Sat, 31 Jan 2015 14:49:14 -0000, Lee Noar <leenoar at sky.com> wrote:

> On 31/01/15 13:52, WPB wrote:
> [snip]
>> Actually printf is on the run path already. And from the command line,
>> the printf command works just fine. The error "File '-c' not found" only
>> occurs when the command is executed my make.


>> I find it hard to believe that this error doesn't come up all the time.
>> There must be umpteen makefiles for GCC on RISC OS that use echo or
>> printf, and on my setup at least, they all bomb out with the error
>> message that is the subject of this thread.
>> WPB
> If you do "make -p", you'll see a number of lines like this:
> If those variables are all empty, then that leaves you with -c,
> so I wonder if a compile rule is being invoked with empty
> variables somehow.
> Lee.

Many thanks for the idea, Lee.

I did "make -p", saved the output as a text file, and then grepped it for  
"-c". The results were mostly "COMPILE.<something> = $(<something>)  
blah-blah -c" as you suggested.

Given that all my Makefile is doing is printing a message and then  
creating a directory, I can't see why these compile rules would be causing  
issues. Nevertheless for kicks I defined all the <something>s about in my  
Makefile like this:

CC = g++
FC = g++
PC = g++
CXX = g++

So the command should at least produce a different error to "File -c not  
found". But the result of make was exactly the same as before.

Any other ideas, people?

Many thanks,


More information about the gcc mailing list