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

WPB wpb.feed at gmx.com
Fri Jan 30 14:29:00 PST 2015

On Fri, 30 Jan 2015 20:12:22 -0000, Lee Noar <leenoar at sky.com> wrote:

> On 30/01/15 14:13, WPB wrote:
>> Hello all,
>> I'm running into trouble using 'make'.
>> With this very simple test case of a Makefile:
>>    dir :
>>      printf "Making dir...\n"
>>      mkdir OBJECTS
>> (Note that 'dir :' isn't really indented.)
>> I get the error "File '-c' not found" when I invoke 'make', and the dir
>> 'OBJECTS' is not made. If I comment out the 'printf' line, the dir is  
>> made.
>> Can anyone shed any light on this obscure error message for me?
> Off the top of my head without actually trying anything; I think if
> your target name "dir" does not actually refer to the directory that
> you're creating "OBJECTS" (or any other disc object), then you have
> to declare the target as phony near the top of your makefile:
> .PHONY: dir
> so that make knows that it must always execute the rule (as there's
> no disc object of that name for it to check).
> Lee.

Thanks, Lee,

Actually, though, it's happy creating the dir, as long as I comment out  
the printf. So it seems to be the printf which is causing the error to be  

Nevertheless, I tried your solution, but it made no difference. Thanks  

Any other ideas anyone?


More information about the gcc mailing list