зеркало из https://github.com/github/ruby.git
* extmk.rb (create_makefile): add macro MAKEDIRS, INSTALL_PROG,
INSTALL_DATA. * extmk.rb (create_makefile): support for building to any directory. * extmk.rb (xsystem): move to mkmf.rb. * mkmf.rb (xsystem): support for extmk.rb * mkmf.rb ($CPP): remove '-E' option. add CPPFLAGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0e7b1e2632
Коммит
8ed2c6fc8a
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
Thu Sep 5 01:24:26 2002 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* extmk.rb (create_makefile): add macro MAKEDIRS, INSTALL_PROG,
|
||||
INSTALL_DATA.
|
||||
|
||||
* extmk.rb (create_makefile): support for building to any directory.
|
||||
|
||||
* extmk.rb (xsystem): move to mkmf.rb.
|
||||
|
||||
* mkmf.rb (xsystem): support for extmk.rb
|
||||
|
||||
* mkmf.rb ($CPP): remove '-E' option. add CPPFLAGS.
|
||||
|
||||
Wed Sep 4 15:23:23 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* class.c (rb_make_metaclass): obj.meta.super.meta should be equal
|
||||
|
@ -17,7 +30,7 @@ Tue Sep 3 17:12:59 2002 WATANABE Hirofumi <eban@ruby-lang.org>
|
|||
* extmk.rb: require mkmf.rb. remove duplicate methods.
|
||||
use Config::CONFIG["FOO"] instead of @FOO@.
|
||||
|
||||
* mkmf.rb: extmk.rb support.
|
||||
* mkmf.rb: support for extmk.rb.
|
||||
|
||||
Mon Sep 2 23:01:50 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
|
@ -6205,7 +6218,7 @@ Mon May 21 13:15:25 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
|
||||
Sat May 19 09:29:07 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* process.c (rb_proc_times): need not to check retrun value from
|
||||
* process.c (rb_proc_times): need not to check return value from
|
||||
times(2).
|
||||
|
||||
Fri May 18 05:36:08 2001 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
@ -7093,7 +7106,7 @@ Sat Mar 10 22:56:44 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
block returns true for all elements.
|
||||
|
||||
* enum.c (enum_any): new method 'any?', which returns true if
|
||||
block retruns true for any of elements.
|
||||
block returns true for any of elements.
|
||||
|
||||
Sat Mar 10 02:34:18 2001 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
|
|
|
@ -44,23 +44,6 @@ $log = nil
|
|||
$orgerr = $stderr.dup
|
||||
$orgout = $stdout.dup
|
||||
|
||||
def xsystem command
|
||||
if $DEBUG
|
||||
puts command
|
||||
$stdout.flush
|
||||
return system(command)
|
||||
end
|
||||
$log ||= open(File.join($topdir, 'ext', 'extmk.log'), 'w')
|
||||
$stderr.reopen($log)
|
||||
$stdout.reopen($log)
|
||||
puts command
|
||||
$stdout.flush
|
||||
system(command)
|
||||
ensure
|
||||
$stderr.reopen($orgerr)
|
||||
$stdout.reopen($orgout)
|
||||
end
|
||||
|
||||
$LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}"
|
||||
$CPP = "#{CONFIG['CPP']} #{CONFIG['CPPFLAGS']} %s -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s conftest.c"
|
||||
|
||||
|
@ -150,10 +133,12 @@ EOL
|
|||
|
||||
RUBY_INSTALL_NAME = #{CONFIG['RUBY_INSTALL_NAME']}
|
||||
RUBY_SO_NAME = #{CONFIG['RUBY_SO_NAME']}
|
||||
ruby_version = #{Config::CONFIG["ruby_version"]}
|
||||
|
||||
prefix = #{CONFIG['prefix']}
|
||||
exec_prefix = #{CONFIG['exec_prefix']}
|
||||
libdir = #{CONFIG['libdir']}
|
||||
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
||||
#pkglibdir = $(libdir)/$(RUBY_INSTALL_NAME)/#{CONFIG['MAJOR']}.#{CONFIG['MINOR']}
|
||||
pkglibdir = $(libdir)/ruby/#{CONFIG['MAJOR']}.#{CONFIG['MINOR']}
|
||||
archdir = $(pkglibdir)/#{CONFIG['arch']}
|
||||
|
@ -203,6 +188,9 @@ DLLIB = $(TARGET).#{$static ? $LIBEXT : CONFIG['DLEXT']}
|
|||
|
||||
RUBY = #{ruby_interpreter} -I$(topdir) -I$(hdrdir)/lib
|
||||
RM = $(RUBY) -rftools -e "File::rm_f(*ARGV.map do|x|Dir[x]end.flatten.uniq)"
|
||||
MAKEDIRS = $(RUBY) -r ftools -e 'File::makedirs(*ARGV)'
|
||||
INSTALL_PROG = $(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0555, true)'
|
||||
INSTALL_DATA = $(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)'
|
||||
|
||||
EXEEXT = CONFIG['EXEEXT']
|
||||
|
||||
|
@ -229,15 +217,17 @@ EOS
|
|||
mfile.printf <<EOS
|
||||
|
||||
install:
|
||||
@$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(DESTDIR)$(libdir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(archdir)$(target_prefix)
|
||||
|
||||
@$(MAKEDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(archdir)$(target_prefix)
|
||||
EOS
|
||||
unless $static
|
||||
mfile.printf "\
|
||||
@$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0555, true)' $(DLLIB) $(DESTDIR)$(archdir)$(target_prefix)/$(DLLIB)
|
||||
@$(INSTALL_PROG) $(DLLIB) $(DESTDIR)$(archdir)$(target_prefix)/$(DLLIB)
|
||||
"
|
||||
end
|
||||
install_rb(mfile, $srcdir)
|
||||
save_srcdir = Config::CONFIG['srcdir']
|
||||
Config::CONFIG['srcdir'] = $srcdir
|
||||
install_rb(mfile, '$(DESTDIR)$(rubylibdir)$(target_prefix)', '$(srcdir)')
|
||||
Config::CONFIG['srcdir'] = save_srcdir
|
||||
mfile.printf "\n"
|
||||
|
||||
unless /mswin32/ =~ RUBY_PLATFORM
|
||||
|
|
16
lib/mkmf.rb
16
lib/mkmf.rb
|
@ -86,7 +86,7 @@ else
|
|||
OUTFLAG = '-o '
|
||||
end
|
||||
$LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#{$hdrdir} #{CFLAGS} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}"
|
||||
$CPP = "#{CONFIG['CPP']} -E %s -I#{$hdrdir} #{CFLAGS} %s %s conftest.c"
|
||||
$CPP = "#{CONFIG['CPP']} #{CONFIG['CPPFLAGS']} %s -I#{$hdrdir} #{CFLAGS} %s %s conftest.c"
|
||||
|
||||
def rm_f(*files)
|
||||
targets = []
|
||||
|
@ -115,6 +115,7 @@ end
|
|||
$log = nil
|
||||
$orgerr = $stderr.dup
|
||||
$orgout = $stdout.dup
|
||||
$extmk = /extmk\.rb/ =~ $0
|
||||
|
||||
def xsystem command
|
||||
Config.expand(command)
|
||||
|
@ -122,14 +123,15 @@ def xsystem command
|
|||
puts command
|
||||
return system(command)
|
||||
end
|
||||
$log ||= open('mkmf.log', 'w')
|
||||
logfile = $extmk ? File.join($topdir, 'ext', 'extmk.log') : 'mkmf.rb'
|
||||
$log ||= open(logfile, 'w')
|
||||
$stderr.reopen($log)
|
||||
$stdout.reopen($log)
|
||||
puts command
|
||||
r = system(command)
|
||||
system(command)
|
||||
ensure
|
||||
$stderr.reopen($orgerr)
|
||||
$stdout.reopen($orgout)
|
||||
return r
|
||||
end
|
||||
|
||||
def try_link0(src, opt="")
|
||||
|
@ -250,8 +252,10 @@ def append_library(libs, lib)
|
|||
end
|
||||
|
||||
def message(*s)
|
||||
print(*s) unless /extmk\.rb/ =~ $0
|
||||
STDOUT.flush
|
||||
unless $extmk
|
||||
print(*s)
|
||||
STDOUT.flush
|
||||
end
|
||||
end
|
||||
|
||||
def have_library(lib, func="main")
|
||||
|
|
Загрузка…
Ссылка в новой задаче