mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* template/fake.rb.in: hooks for extconf.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									00adf578df
								
							
						
					
					
						commit
						2ff26f2220
					
				
					 3 changed files with 30 additions and 1 deletions
				
			
		
							
								
								
									
										24
									
								
								template/fake.rb.in
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										24
									
								
								template/fake.rb.in
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							| 
						 | 
				
			
			@ -1,3 +1,6 @@
 | 
			
		|||
baseruby="@BASERUBY@"
 | 
			
		||||
ruby="${RUBY-$baseruby}"
 | 
			
		||||
"eval" "{ `expr \"$ruby\" : echo > /dev/null || echo exec` $ruby "'-r"`expr \"$0\" : / > /dev/null || pwd`/${0#/}" "$@";' "}" || "exit" "$?"
 | 
			
		||||
class Object
 | 
			
		||||
  CROSS_COMPILING = RUBY_PLATFORM
 | 
			
		||||
  remove_const :RUBY_PLATFORM
 | 
			
		||||
| 
						 | 
				
			
			@ -13,3 +16,24 @@ if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
 | 
			
		|||
    ALT_SEPARATOR = "\\"
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
$:.unshift(File.expand_path("..", __FILE__))
 | 
			
		||||
prehook = proc do
 | 
			
		||||
  config = RbConfig::CONFIG
 | 
			
		||||
  mkconfig = RbConfig::MAKEFILE_CONFIG
 | 
			
		||||
  mkconfig["top_srcdir"] = $top_srcdir = File.expand_path("@abs_top_srcdir@")
 | 
			
		||||
  $extout = File.expand_path(mkconfig["EXTOUT"], mkconfig["topdir"])
 | 
			
		||||
  mkconfig["extout"] = config["extout"] = $extout
 | 
			
		||||
  mkconfig["rubyhdrdir"] = "$(top_srcdir)/include"
 | 
			
		||||
  config["rubyhdrdir"] = File.join(mkconfig["top_srcdir"], "include")
 | 
			
		||||
  mkconfig["libdir"] = config["libdir"] = mkconfig["topdir"]
 | 
			
		||||
  mkconfig["archdir"] = config["archdir"] = File.expand_path(File.dirname(__FILE__))
 | 
			
		||||
  untrace_var(:$extmk, prehook)
 | 
			
		||||
end
 | 
			
		||||
trace_var(:$extmk, prehook)
 | 
			
		||||
posthook = proc do
 | 
			
		||||
  $ruby = baseruby
 | 
			
		||||
  $arch_hdrdir = "$(extout)/include/$(arch)"
 | 
			
		||||
  untrace_var(:$ruby, posthook)
 | 
			
		||||
end
 | 
			
		||||
trace_var(:$ruby, posthook)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue