Friday, 30 January 2015

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

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.

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment