Saturday, 31 January 2015

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

On Sat, 31 Jan 2015 14:49:14 -0000, Lee Noar <leenoar@sky.com> wrote:

> On 31/01/15 13:52, WPB wrote:
>
> [snip]
>
>> Actually printf is on the run path already. And from the command line,
>> the printf command works just fine. The error "File '-c' not found" only
>> occurs when the command is executed my make.

[snip]

>> I find it hard to believe that this error doesn't come up all the time.
>> There must be umpteen makefiles for GCC on RISC OS that use echo or
>> printf, and on my setup at least, they all bomb out with the error
>> message that is the subject of this thread.
>>
>> WPB
>
> If you do "make -p", you'll see a number of lines like this:
>
> COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
>
> If those variables are all empty, then that leaves you with -c,
> so I wonder if a compile rule is being invoked with empty
> variables somehow.
>
> Lee.


Many thanks for the idea, Lee.

I did "make -p", saved the output as a text file, and then grepped it for
"-c". The results were mostly "COMPILE.<something> = $(<something>)
blah-blah -c" as you suggested.

Given that all my Makefile is doing is printing a message and then
creating a directory, I can't see why these compile rules would be causing
issues. Nevertheless for kicks I defined all the <something>s about in my
Makefile like this:

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.

Any other ideas, people?

Many 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

No comments:

Post a Comment