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

WPB wpb.feed at gmx.com
Sat Jan 31 04:32:43 PST 2015

On Sat, 31 Jan 2015 06:51:55 -0000, Ron <beeb at woosh.co.nz> wrote:

> In message <cb70628e54.beeb at ron1954.woosh.co.nz>
>           Ron <beeb at woosh.co.nz> wrote:
>> 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.
> From the gnu make manual
> 'The program used as the shell is taken from the variable SHELL. If this
> variable is not set in your makefile, the program /bin/sh is used as the
> shell. The argument(s) passed to the shell are taken from the variable
> .SHELLFLAGS. The default value of .SHELLFLAGS is -c normally, or -ec in
> POSIX-conforming mode.'
> You may see a difference just by using (in the makefile)
> Ron M.

Thank you very much for your insights, Ron. I thought you'd nailed it with  
that, but actually setting .SHELLFLAGS seems to make no difference. That  
maybe a bug in make 3.81 (which is the current version on riscos.info), as  
reported here:  

I don't really understand how the SHELL variable works for the RISC OS  
port of make. As Ron says, and according to the manual, the default value  
of SHELL is "/bin/sh", which makes no sense on RISC OS. Does the port in  
fact just direct commands at the RISC OS command line unless SHELL is set  
to something else?

I did install the port of bash and added "SHELL = bash" to the Makefile,  
and then it works, but only if I substitute "echo" for "printf" - "printf"  
obviously isn't a bash command.

I'd ideally like to use the RISC OS command line as the shell, not bash,  
but this "-c" issue is flummoxing me.

If anyone else can confirm the .SHELLFLAGS issue is peculiar to make 3.81,  
that would be great.

Many thanks for any help,


More information about the gcc mailing list