[gccsdk] make: File '-c' not found
beeb at woosh.co.nz
Fri Jan 30 18:38:09 PST 2015
In message <op.xtaremqgizronj at bluey>
WPB <wpb.feed at gmx.com> wrote:
> 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?
I'm pretty sure the -c thing is because your Makefile SHELL variable is resolving to something that doesn't understand the -c switch.
I think the default for /bin/bash is just the RISC OS CLI unless you add a ported shell and adjust the path accordingly.
You could try the existing port of bash, or email me for a copy of the slimmer dash, which I found (recently) to work well with make.
If you are using a Linux style Makefile there may be other commands you find missing.
More information about the gcc