nobu.nokada / softhome.net wrote:
> Hi,
> 
> At Fri, 20 Sep 2002 23:02:50 +0900,
> Christian Szegedy wrote:
> 
>>all:		example.o
>>..cxx.o :
>>	g++ -c $@ $<
> 
> 
> Are there two dots at beginning of the line, and the command
> uses g++ directly?
> 
> 
>>The problem is that it does NOT work with gmake,
>>it says:
>>
>>No rule to make target `example.o', needed by `all'.  Stop.
>>
>>Remark: if you substitute "cxx" by "C", then it works.
> 
> 
> C rule should be generated below the .cxx rule.
> 
> Could you show me your extconf.rb?
> 

Of course, this was a copy and paste error: there is only one point.

My extconf is simple:

#!/usr/bin/env ruby
require 'mkmf'
create_makefile('example_ext')

But you can test the following example also:

all:		example.o
..cxx.o :
	g++ -DTEST_FLAG -c -o $@ $<


If you touch example.cxx, it won't bild example.o.

If you replace cxx by C, and touch example.C, then
it will compile it by the given command.

(I have used extconf and mkmf several times, and it
always worked with c files.)

Regards, Christian