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

Lee Noar leenoar at sky.com
Fri Jan 30 12:12:22 PST 2015


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.




More information about the gcc mailing list