summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-28 13:25:34 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-28 13:25:34 +0000
commite83171c4c4f71093a64abc2c4bb9bdb6a1445e02 (patch)
tree6e78119530ed081369d93276e525251252f157d7 /ext/extmk.rb.in
parente406a28a71fe6c708f5be82e321cfc51defccfaf (diff)
* ext/extconf.rb.in: make the priority of the make rule of .c higher than .C .
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in31
1 files changed, 14 insertions, 17 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index d57ff2f..bb50e88 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -501,21 +501,26 @@ EOS
install_rb(mfile, $srcdir)
mfile.printf "\n"
- if /mswin32/ !~ RUBY_PLATFORM
+ unless /nmake/i =~ $make
+ unless /mswin32/ =~ RUBY_PLATFORM
+ src = '$<'
+ else
+ src = '$(subst /,\\\\,$<)'
+ end
mfile.puts "
-.c.@OBJEXT@:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
-
.cc.@OBJEXT@:
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c #{src}
.cpp.@OBJEXT@:
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c #{src}
.cxx.@OBJEXT@:
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c #{src}
.C.@OBJEXT@:
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c #{src}
+
+.c.@OBJEXT@:
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c #{src}
"
- elsif /nmake/i =~ $make
+ else
mfile.print "
{$(srcdir)}.c{}.@OBJEXT@:
$(CC) -I. -I$(<D) $(CFLAGS) $(CPPFLAGS) -c $(<:/=\\)
@@ -535,14 +540,6 @@ EOS
.cxx.@OBJEXT@:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(<:/=\\)
"
- else
- mfile.print "
-.c.@OBJEXT@:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(subst /,\\\\,$<)
-
-.cc.@OBJEXT@ .cpp.@OBJEXT@ .cxx.@OBJEXT@ .C.@OBJEXT@:
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(subst /,\\\\,$<)
-"
end
if $static