Monday, 2 February 2015

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

In message <54CF5F94.6000809@gmx.com>
Duncan Moore <duncan.moore@gmx.com> wrote:

>
> On 02/02/2015 09:32, WPB wrote:
> > On Mon, 02 Feb 2015 08:06:43 -0000, Duncan Moore <duncan.moore@gmx.com>
> > wrote:
> >
> > [snip]
> >
> >>>>> *set UnixEnv$.SHELLFLAGS cccc
> >>>>> *make
> >>>>> echo "Making dir...\n"
> >>>>> File '-c' not found
> >>>>> make: *** [dir] Error 1
> >>>>> *show UnixEnv$.*
> >>>>> UnixEnv$.SHELLFLAGS : cccc
> >>>>>
> >>>>> Could it be that you are using a different version of make?
> >>>>>
> >>>> Yes, I have my own version of make. I'm using 4.0. I assume you're
> >>>> using
> >>>> 3.81. I've just looked at the manuals and it looks like .SHELLFLAGS was
> >>>> introduced somewhere in between. Of course, using SHELLFLAGS won't sort
> >>>> out your problems. All it does is show that (probably) the -c is coming
> >>>> from the shell.
> >>>>
> >>>> Duncan
> >>> Thanks for confirming, Duncan. I am indeed using 3.81, from the GCCSDK
> >>> AB.
> >>>
> >>> As Ron suggested before, if I could set .SHELLFLAGS to nothing, wouldn't
> >>> that solve my problem?
> >>>
> >> No, it still fails. The whole of 'printf "Making dir...\n"' gets treated
> >> as a filename, which it can't find.
> >>
> >> Duncan
> > Ah, okay. That's presumably a bug then? Who do we report bugs to?
> >
>
> Yes, I think it is a bug. This page describes how to report bugs:
> http://www.riscos.info/index.php/Bug_Reporting
>
> Duncan
>

I've been able to replicate this now by putting the coreutils printf in
the path for the CLI to find.
Firstly, there is an error in the printf binary where it objects to a \
in the string and results in 'File '-c' not found'.
It is not crucial to, but by using (RISC OS)
set alias$-c ""
The error reporting is then more helpful:
File name 'printf \' not recognised
The key thing is that it can't handle a '\' at all in the string.

Back to using dash and it's builtin printf, and though it works, it has
a quirk but is workable.

SHELL = dash
dir :
printf %b "Making dir...\\n"
mkdir OBJECTS

The format b tells it to resolve escape characters, and \\n is needed
also.

Ron M.


_______________________________________________
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