On 01/02/2015 13:02, WPB wrote:
> On Sun, 01 Feb 2015 09:38:56 -0000, Duncan Moore <duncan.moore@gmx.com>
> wrote:
>
>> On 31/01/2015 16:31, WPB wrote:
>>> CC = g++ FC = g++ PC = g++ CXX = g++So the command should at least
>>> produce a different error to "File -c not found". But the result of
>>> make was exactly the same as before.
>> The -c is coming from the shell. Try this:
>>
>> *set UnixEnv$.SHELLFLAGS cccc
>> *make
>> printf "Making dir...\n"
>> File 'cccc' not found
>> Makefile:2: recipe for target 'dir' failed
>> make: *** [dir] Error 1
>>
>> Duncan
>>
> Very interesting, Duncan, thank you. Unfortunately, that doesn't work for
> me:
>
> *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
_______________________________________________
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
Sunday, 1 February 2015
[gccsdk] Dependencies using a relative path or system variable
Hi all,
Seeing as you're all game ;)...
The makefile I'm trying to beat into submission now gets to the point
where it builds a dependency file using the following command:
g++ -M $(CPPFLAGS) $(SRC) > $(DEPSFILE)
This generates output in $(DEPSFILE) that looks like this:
vertex.o: src/vertex.cpp \
/HostFS::HostFS.$$/AppsInUse/Dev/GCC474r1/!GCC/bin/../lib/gcc/arm-unknown-riscos/4.7.4/../../../../include/c++/4.7.4/iostream
\
/HostFS::HostFS.$$/AppsInUse/Dev/GCC474r1/!GCC/bin/../lib/gcc/arm-unknown-riscos/4.7.4/../../../../include/c++/4.7.4/arm-unknown-riscos/bits/c++config.h
\
/HostFS::HostFS.$$/AppsInUse/Dev/GCC474r1/!GCC/bin/../lib/gcc/arm-unknown-riscos/4.7.4/../../../../include/c++/4.7.4/arm-unknown-riscos/bits/os_defines.h
\
etc., etc.
The problem then becomes, that when this dependency file is parsed by
make, it sees the colon(s) in "/HostFS::HostFS.$$/Blah-blah..." as another
rule, and gives the error message: "multiple target patterns". On the
Internet, I've seen a lot of references to this when people use make under
Cygwin, and have the same problem with a "C:\" path in Windows.
What would be great is if there was a way to make the dependencies output
use a RISC OS system variable -- ideally GCCbin$Path looks the most
sensible -- so that absolute paths aren't hard-coded into the dependencies
file in the first place. Is there a way to do this? And will it resolve
the colon problem anyway?
Is there some other way around the colon problem? How do people normally
handle dependency data using GCC on RISC OS?
Really appreciate all your help so far, guys. Quite a learning curve, this
is!
WPB
_______________________________________________
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
Seeing as you're all game ;)...
The makefile I'm trying to beat into submission now gets to the point
where it builds a dependency file using the following command:
g++ -M $(CPPFLAGS) $(SRC) > $(DEPSFILE)
This generates output in $(DEPSFILE) that looks like this:
vertex.o: src/vertex.cpp \
/HostFS::HostFS.$$/AppsInUse/Dev/GCC474r1/!GCC/bin/../lib/gcc/arm-unknown-riscos/4.7.4/../../../../include/c++/4.7.4/iostream
\
/HostFS::HostFS.$$/AppsInUse/Dev/GCC474r1/!GCC/bin/../lib/gcc/arm-unknown-riscos/4.7.4/../../../../include/c++/4.7.4/arm-unknown-riscos/bits/c++config.h
\
/HostFS::HostFS.$$/AppsInUse/Dev/GCC474r1/!GCC/bin/../lib/gcc/arm-unknown-riscos/4.7.4/../../../../include/c++/4.7.4/arm-unknown-riscos/bits/os_defines.h
\
etc., etc.
The problem then becomes, that when this dependency file is parsed by
make, it sees the colon(s) in "/HostFS::HostFS.$$/Blah-blah..." as another
rule, and gives the error message: "multiple target patterns". On the
Internet, I've seen a lot of references to this when people use make under
Cygwin, and have the same problem with a "C:\" path in Windows.
What would be great is if there was a way to make the dependencies output
use a RISC OS system variable -- ideally GCCbin$Path looks the most
sensible -- so that absolute paths aren't hard-coded into the dependencies
file in the first place. Is there a way to do this? And will it resolve
the colon problem anyway?
Is there some other way around the colon problem? How do people normally
handle dependency data using GCC on RISC OS?
Really appreciate all your help so far, guys. Quite a learning curve, this
is!
WPB
_______________________________________________
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
Re: [gccsdk] make: File '-c' not found
On Sun, 01 Feb 2015 12:01:34 -0000, Ron <beeb@woosh.co.nz> wrote:
> The dash error for this is better -as long as it still does it when
> being called from make.
>
> $ printf"Making dir...\n"
> /ADFS::Trav.$/home/bin/sh: 8: printfMaking dir...\n: not found
>
> put a space after printf and all is well.
>
> $ printf "Making dir...\n"
> Making dir...
> $
>
> Thats odd, only one \ required now.
> looks like he text is supposed to be inside ""
> Please disregard my last post regarding using \\
>
> Ron M.
>
Well, on my machine, printf appears to need double \\ from the RISC OS
CLI, but in bash, it works as expected (in interactive mode at least):
*printf "Hello world\n"
Hello worldn*
*printf "Hello world\\n"
Hello world
*bash
bash-4.2$ printf "Hello world\n"
Hello world
bash-4.2$
I'm not sure if the behaviour under the RISC OS CLI is a bug or not...
WPB
_______________________________________________
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
> The dash error for this is better -as long as it still does it when
> being called from make.
>
> $ printf"Making dir...\n"
> /ADFS::Trav.$/home/bin/sh: 8: printfMaking dir...\n: not found
>
> put a space after printf and all is well.
>
> $ printf "Making dir...\n"
> Making dir...
> $
>
> Thats odd, only one \ required now.
> looks like he text is supposed to be inside ""
> Please disregard my last post regarding using \\
>
> Ron M.
>
Well, on my machine, printf appears to need double \\ from the RISC OS
CLI, but in bash, it works as expected (in interactive mode at least):
*printf "Hello world\n"
Hello worldn*
*printf "Hello world\\n"
Hello world
*bash
bash-4.2$ printf "Hello world\n"
Hello world
bash-4.2$
I'm not sure if the behaviour under the RISC OS CLI is a bug or not...
WPB
_______________________________________________
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
Re: [gccsdk] make: File '-c' not found
On Sun, 01 Feb 2015 09:38:56 -0000, Duncan Moore <duncan.moore@gmx.com>
wrote:
>
> On 31/01/2015 16:31, WPB wrote:
>> CC = g++ FC = g++ PC = g++ CXX = g++So the command should at least
>> produce a different error to "File -c not found". But the result of
>> make was exactly the same as before.
>
> The -c is coming from the shell. Try this:
>
> *set UnixEnv$.SHELLFLAGS cccc
> *make
> printf "Making dir...\n"
> File 'cccc' not found
> Makefile:2: recipe for target 'dir' failed
> make: *** [dir] Error 1
>
> Duncan
>
Very interesting, Duncan, thank you. Unfortunately, that doesn't work for
me:
*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?
Thanks,
WPB
_______________________________________________
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
wrote:
>
> On 31/01/2015 16:31, WPB wrote:
>> CC = g++ FC = g++ PC = g++ CXX = g++So the command should at least
>> produce a different error to "File -c not found". But the result of
>> make was exactly the same as before.
>
> The -c is coming from the shell. Try this:
>
> *set UnixEnv$.SHELLFLAGS cccc
> *make
> printf "Making dir...\n"
> File 'cccc' not found
> Makefile:2: recipe for target 'dir' failed
> make: *** [dir] Error 1
>
> Duncan
>
Very interesting, Duncan, thank you. Unfortunately, that doesn't work for
me:
*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?
Thanks,
WPB
_______________________________________________
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
Re: [gccsdk] make: File '-c' not found
In message <54CDF430.5000801@gmx.com>
Duncan Moore <duncan.moore@gmx.com> wrote:
>
> On 31/01/2015 16:31, WPB wrote:
> > CC = g++ FC = g++ PC = g++ CXX = g++So the command should at least
> > produce a different error to "File -c not found". But the result of
> > make was exactly the same as before.
>
> The -c is coming from the shell. Try this:
>
> *set UnixEnv$.SHELLFLAGS cccc
> *make
> printf "Making dir...\n"
> File 'cccc' not found
> Makefile:2: recipe for target 'dir' failed
> make: *** [dir] Error 1
>
> Duncan
>
The dash error for this is better -as long as it still does it when
being called from make.
$ printf"Making dir...\n"
/ADFS::Trav.$/home/bin/sh: 8: printfMaking dir...\n: not found
put a space after printf and all is well.
$ printf "Making dir...\n"
Making dir...
$
Thats odd, only one \ required now.
looks like he text is supposed to be inside ""
Please disregard my last post regarding using \\
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
Duncan Moore <duncan.moore@gmx.com> wrote:
>
> On 31/01/2015 16:31, WPB wrote:
> > CC = g++ FC = g++ PC = g++ CXX = g++So the command should at least
> > produce a different error to "File -c not found". But the result of
> > make was exactly the same as before.
>
> The -c is coming from the shell. Try this:
>
> *set UnixEnv$.SHELLFLAGS cccc
> *make
> printf "Making dir...\n"
> File 'cccc' not found
> Makefile:2: recipe for target 'dir' failed
> make: *** [dir] Error 1
>
> Duncan
>
The dash error for this is better -as long as it still does it when
being called from make.
$ printf"Making dir...\n"
/ADFS::Trav.$/home/bin/sh: 8: printfMaking dir...\n: not found
put a space after printf and all is well.
$ printf "Making dir...\n"
Making dir...
$
Thats odd, only one \ required now.
looks like he text is supposed to be inside ""
Please disregard my last post regarding using \\
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
Re: [gccsdk] make: File '-c' not found
On 31/01/2015 16:31, WPB wrote:
> CC = g++ FC = g++ PC = g++ CXX = g++So the command should at least
> produce a different error to "File -c not found". But the result of
> make was exactly the same as before.
The -c is coming from the shell. Try this:
*set UnixEnv$.SHELLFLAGS cccc
*make
printf "Making dir...\n"
File 'cccc' not found
Makefile:2: recipe for target 'dir' failed
make: *** [dir] Error 1
Duncan
_______________________________________________
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
> CC = g++ FC = g++ PC = g++ CXX = g++So the command should at least
> produce a different error to "File -c not found". But the result of
> make was exactly the same as before.
The -c is coming from the shell. Try this:
*set UnixEnv$.SHELLFLAGS cccc
*make
printf "Making dir...\n"
File 'cccc' not found
Makefile:2: recipe for target 'dir' failed
make: *** [dir] Error 1
Duncan
_______________________________________________
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
Re: [gccsdk] make: File '-c' not found
In message <54CCFF8D.90204@gmx.com>
Duncan Moore <duncan.moore@gmx.com> wrote:
>
> On 31/01/2015 13:11, Duncan Moore wrote:
> > As to why \n is causing problems, I'm not sure. It looks like some weird
> > interaction between 'make' and 'printf'.
> >
>
> I'm wondering if it's due to 'make' calling exec() and then the argument
> list being manipulated. I seem to recall that it quotes both " and '.
> Maybe it's doing something with the \ of \n too, and that's messing
> things up.
>
> Duncan
>
I tried this out interactively with dash.
The dash builtins echo and printf require \\n to get newline otherwise a
literal \n is output.
but, echo \\
does do the expected thing and outputs a single \
However using this example from the dash manpage
{ printf " hello " ; printf "world\n" ; } > greeting
and the resulting file does have the &0A after "world"
I'm wondering now if the \ for standard output is getting lost in
termios.
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
Duncan Moore <duncan.moore@gmx.com> wrote:
>
> On 31/01/2015 13:11, Duncan Moore wrote:
> > As to why \n is causing problems, I'm not sure. It looks like some weird
> > interaction between 'make' and 'printf'.
> >
>
> I'm wondering if it's due to 'make' calling exec() and then the argument
> list being manipulated. I seem to recall that it quotes both " and '.
> Maybe it's doing something with the \ of \n too, and that's messing
> things up.
>
> Duncan
>
I tried this out interactively with dash.
The dash builtins echo and printf require \\n to get newline otherwise a
literal \n is output.
but, echo \\
does do the expected thing and outputs a single \
However using this example from the dash manpage
{ printf " hello " ; printf "world\n" ; } > greeting
and the resulting file does have the &0A after "world"
I'm wondering now if the \ for standard output is getting lost in
termios.
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
Subscribe to:
Posts (Atom)