1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/mkmf.rb (create_makefile): add -I. to CPPFLAGS.

* lib/mkmf.rb (create_makefile): srcdir support(.def and depend file).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2002-01-02 14:42:01 +00:00
parent 7fa449a44a
commit 167dd9c933
2 changed files with 19 additions and 7 deletions

View file

@ -1,3 +1,9 @@
Wed Jan 2 23:34:25 2002 WATANABE Hirofumi <eban@ruby-lang.org>
* lib/mkmf.rb (create_makefile): add -I. to CPPFLAGS.
* lib/mkmf.rb (create_makefile): srcdir support(.def and depend file).
Tue Jan 1 02:16:48 2002 WATANABE Hirofumi <eban@ruby-lang.org>
* ext/curses/extconf.rb: add dir_config.

View file

@ -399,12 +399,17 @@ def create_makefile(target, srcdir = File.dirname($0))
defflag = ''
if RUBY_PLATFORM =~ /cygwin|mingw/
if not File.exist? target + '.def'
open(target + '.def', 'wb') do |f|
f.print "EXPORTS\n", "Init_", target, "\n"
deffile = target + '.def'
if not File.exist? deffile
if File.exist? File.join srcdir, deffile
deffile = File.join srcdir, deffile
else
open(deffile, 'wb') do |f|
f.print "EXPORTS\n", "Init_", target, "\n"
end
end
end
defflag = "--def=" + target + ".def"
defflag = "--def=" + deffile
end
if RUBY_PLATFORM =~ /mswin32/
@ -446,7 +451,7 @@ VPATH = $(srcdir)
CC = #{CONFIG["CC"]}
CFLAGS = #{CONFIG["CCDLFLAGS"]} #{CFLAGS} #{$CFLAGS}
CPPFLAGS = -I$(hdrdir) -I$(srcdir) -I#{CONFIG["includedir"]} #{$defs.join(" ")} #{CONFIG["CPPFLAGS"]} #{$CPPFLAGS}
CPPFLAGS = -I. -I$(hdrdir) -I$(srcdir) -I#{CONFIG["includedir"]} #{$defs.join(" ")} #{CONFIG["CPPFLAGS"]} #{$CPPFLAGS}
CXXFLAGS = $(CFLAGS)
DLDFLAGS = #{$DLDFLAGS} #{$LDFLAGS}
LDSHARED = #{CONFIG["LDSHARED"]} #{defflag}
@ -583,8 +588,9 @@ EOMF
end
end
if File.exist?("depend")
dfile = open("depend", "r")
depend = File.join(srcdir, "depend")
if File.exist?(depend)
dfile = open(depend, "r")
mfile.printf "###\n"
while line = dfile.gets()
mfile.printf "%s", line.gsub(/\.o\b/, ".#{$OBJEXT}")