mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Fix rubyspec_capiext dependency and flags
- The file needed to link may be the import library. - Remove duplicate flags.
This commit is contained in:
		
							parent
							
								
									7379a493bd
								
							
						
					
					
						commit
						be9cc6c758
					
				
					 2 changed files with 5 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue