зеркало из https://github.com/github/ruby.git
Fix rubyspec_capiext dependency and flags
- The file needed to link may be the import library. - Remove duplicate flags.
This commit is contained in:
Родитель
7379a493bd
Коммит
be9cc6c758
|
@ -404,10 +404,10 @@ update-deps:
|
|||
|
||||
# order-only-prerequisites doesn't work for $(RUBYSPEC_CAPIEXT)
|
||||
# because the same named directory exists in the source tree.
|
||||
$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY_SO)
|
||||
$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY)
|
||||
$(ECHO) building $@
|
||||
$(Q) $(MAKEDIRS) $(@D)
|
||||
$(Q) $(DLDSHARED) $(XDLDFLAGS) $(XLDFLAGS) $(ARCH_FLAG) $(ARCH_FLAG) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBY_SO)
|
||||
$(Q) $(DLDSHARED) $(XDLDFLAGS) $(XLDFLAGS) $(LDFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBYARG)
|
||||
$(Q) $(RMALL) $@.*
|
||||
|
||||
rubyspec-capiext: $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildcard $(srcdir)/$(RUBYSPEC_CAPIEXT)/*.c)))
|
||||
|
|
|
@ -32,9 +32,8 @@ def compile_extension(name)
|
|||
ruby_header = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby.h"
|
||||
|
||||
if RbConfig::CONFIG["ENABLE_SHARED"] == "yes"
|
||||
libdirname = RbConfig::CONFIG['LIBPATHENV'] == 'PATH' ? 'bindir' :
|
||||
RbConfig::CONFIG['libdirname'] # defined since 2.1
|
||||
libruby_so = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY_SO']}"
|
||||
libdirname = RbConfig::CONFIG['libdirname'] # defined since 2.1
|
||||
libruby = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY']}"
|
||||
end
|
||||
|
||||
begin
|
||||
|
@ -46,7 +45,7 @@ def compile_extension(name)
|
|||
when mtime <= File.mtime("#{core_ext_dir}/rubyspec.h")
|
||||
when mtime <= File.mtime("#{spec_ext_dir}/#{ext}.c")
|
||||
when mtime <= File.mtime(ruby_header)
|
||||
when libruby_so && mtime <= File.mtime(libruby_so)
|
||||
when libruby && mtime <= File.mtime(libruby)
|
||||
else
|
||||
return lib # up-to-date
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче