mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* lib/mkmf.rb (SRC_EXT): exclude just case different suffixes on case
insensitive file system platforms. * README.EXT, README.EXT.ja (Appendix C): utility functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									e8d4dc91d8
								
							
						
					
					
						commit
						51e9f71a1d
					
				
					 4 changed files with 122 additions and 1 deletions
				
			
		|  | @ -1,3 +1,10 @@ | |||
| Thu Mar 31 22:23:51 2005  Nobuyoshi Nakada  <nobu@ruby-lang.org> | ||||
| 
 | ||||
| 	* lib/mkmf.rb (SRC_EXT): exclude just case different suffixes on case | ||||
| 	  insensitive file system platforms. | ||||
| 
 | ||||
| 	* README.EXT, README.EXT.ja (Appendix C): utility functions. | ||||
| 
 | ||||
| Thu Mar 31 14:15:44 2005  GOTOU Yuuzou  <gotoyuzo@notwork.org> | ||||
| 
 | ||||
| 	* ext/openssl/ossl_engine.c (ossl_engine_s_load): should return | ||||
|  |  | |||
							
								
								
									
										52
									
								
								README.EXT
									
										
									
									
									
								
							
							
						
						
									
										52
									
								
								README.EXT
									
										
									
									
									
								
							|  | @ -1005,6 +1005,11 @@ Appendix C. Functions Available in extconf.rb | |||
| 
 | ||||
| These functions are available in extconf.rb: | ||||
| 
 | ||||
|  have_macro(macro, headers) | ||||
| 
 | ||||
| Checks whether macro is defined with header.  Returns true if the macro | ||||
| is defined. | ||||
| 
 | ||||
|  have_library(lib, func) | ||||
| 
 | ||||
| Checks whether the library exists, containing the specified function. | ||||
|  | @ -1019,22 +1024,63 @@ path.  Returns true if the library exists. | |||
| 
 | ||||
| Checks whether func exists with header.  Returns true if the function | ||||
| exists.  To check functions in an additional library, you need to | ||||
| check that library first using have_library(). | ||||
| 
 | ||||
|  have_var(var, header) | ||||
| 
 | ||||
| Checks whether var exists with header.  Returns true if the variable | ||||
| exists.  To check variables in an additional library, you need to | ||||
| check that library first using have_library(). | ||||
| 
 | ||||
|  have_header(header) | ||||
| 
 | ||||
| Checks whether header exists.  Returns true if the header file exists. | ||||
| 
 | ||||
|  find_header(header, path...) | ||||
| 
 | ||||
| Checks whether header exists in path.  Returns true if the header file | ||||
| exists. | ||||
| 
 | ||||
|  have_struct_member(type, member, header) | ||||
| 
 | ||||
| Checks whether type has member with header.  Returns true if the type | ||||
| is defined and has the member. | ||||
| 
 | ||||
|  have_type(type, header, opt) | ||||
| 
 | ||||
| Checks whether type is defined with header.  Returns true if the type | ||||
| is defined. | ||||
| 
 | ||||
|  check_sizeof(type, header) | ||||
| 
 | ||||
| Checks the size of type in char with header.  Returns the size if the | ||||
| type is defined, otherwise nil. | ||||
| 
 | ||||
|  create_makefile(target) | ||||
| 
 | ||||
| Generates the Makefile for the extension library.  If you don't invoke | ||||
| this method, the compilation will not be done. | ||||
| 
 | ||||
|  find_executable(bin, path) | ||||
| 
 | ||||
| Finds command in path, which is File::PATH_SEPARATOR-separated list of | ||||
| directories.  If path is nil or omitted, environment varialbe PATH | ||||
| will be used.  Returns the path name of the command if it is found, | ||||
| otherwise nil. | ||||
| 
 | ||||
|  with_config(withval[, default=nil]) | ||||
| 
 | ||||
| Parses the command line options and returns the value specified by | ||||
| --with-<withval>. | ||||
| 
 | ||||
|  enable_config(config, *defaults) | ||||
|  disable_config(config, *defaults) | ||||
| 
 | ||||
| Parses the command line options for boolean.  Returns true if | ||||
| --enable-<config> is given, or false if --disable-<config> is given. | ||||
| Otherwise, yields defaults to the given block and returns the result | ||||
| if it is called with a block, or returns defaults. | ||||
| 
 | ||||
|  dir_config(target[, default_dir]) | ||||
|  dir_config(target[, default_include, default_lib]) | ||||
| 
 | ||||
|  | @ -1044,6 +1090,12 @@ to $CFLAGS and/or $LDFLAGS.  --with-<target>-dir=/path is equivalent to | |||
| --with-<target>-include=/path/include --with-<target>-lib=/path/lib. | ||||
| Returns an array of the added directories ([include_dir, lib_dir]). | ||||
| 
 | ||||
|  pkg_config(pkg) | ||||
| 
 | ||||
| Obtains the information of pkg by pkg-config command.  The actual | ||||
| command name can be overriden by --with-pkg-config command line | ||||
| option. | ||||
| 
 | ||||
| /* | ||||
|  * Local variables: | ||||
|  * fill-column: 70 | ||||
|  |  | |||
|  | @ -1123,6 +1123,12 @@ Appendix C. extconf.rb | |||
| extconf.rbの中では利用可能なコンパイル条件チェックの関数は以 | ||||
| 下の通りである. | ||||
| 
 | ||||
| have_macro(macro, headers) | ||||
| 
 | ||||
|   ヘッダファイルheaderをインクルードしてマクロmacroが定義さ | ||||
|   れているかどうかチェックする.マクロが定義されている時true | ||||
|   を返す. | ||||
| 
 | ||||
| have_library(lib, func) | ||||
| 
 | ||||
|   関数funcを定義しているライブラリlibの存在をチェックする. | ||||
|  | @ -1140,21 +1146,67 @@ have_func(func, header) | |||
|   る時には先にhave_libraryでそのライブラリをチェックしておく | ||||
|   事.関数が存在する時trueを返す. | ||||
| 
 | ||||
| have_var(var, header) | ||||
| 
 | ||||
|   ヘッダファイルheaderをインクルードして変数varの存在をチェッ | ||||
|   クする.varが標準ではリンクされないライブラリ内のものであ | ||||
|   る時には先にhave_libraryでそのライブラリをチェックしておく | ||||
|   事.変数が存在する時trueを返す. | ||||
| 
 | ||||
| have_header(header) | ||||
| 
 | ||||
|   ヘッダファイルの存在をチェックする.ヘッダファイルが存在す | ||||
|   る時trueを返す. | ||||
| 
 | ||||
| find_header(header, path...) | ||||
| 
 | ||||
|   ヘッダファイルheaderの存在を -Ipath を追加しながらチェック | ||||
|   する.ヘッダファイルが見付かった時,trueを返す. | ||||
| 
 | ||||
| have_struct_member(type, member, header) | ||||
| 
 | ||||
|   ヘッダファイルheaderをインクルードして型typeにメンバmember | ||||
|   が存在するかをチェックする.typeが定義されていて,memberを | ||||
|   持つする時trueを返す. | ||||
| 
 | ||||
| have_type(type, header, opt) | ||||
| 
 | ||||
|   ヘッダファイルheaderをインクルードして型typeが存在するかを | ||||
|   チェックする.typeが定義されている時trueを返す. | ||||
| 
 | ||||
| check_sizeof(type, header) | ||||
| 
 | ||||
|   ヘッダファイルheaderをインクルードして型typeのchar単位サイ | ||||
|   ズを調べる.typeが定義されている時そのサイズを返す.定義さ | ||||
|   れていないときはnilを返す. | ||||
| 
 | ||||
| create_makefile(target) | ||||
| 
 | ||||
|   拡張ライブラリ用のMakefileを生成する.この関数を呼ばなけれ | ||||
|   ばそのライブラリはコンパイルされない.targetはモジュール名 | ||||
|   を表す. | ||||
| 
 | ||||
| find_executable(command, path) | ||||
| 
 | ||||
|   コマンドcommandをFile::PATH_SEPARATORで区切られたパス名の | ||||
|   リストpathから探す.pathがnilまたは省略された場合は,環境 | ||||
|   変数PATHの値を使用する.実行可能なコマンドが見つかった場合 | ||||
|   はパスを含むファイル名,見つからなかった場合はnilを返す. | ||||
| 
 | ||||
| with_config(withval[, default=nil]) | ||||
| 
 | ||||
|   コマンドライン上の--with-<withval>で指定されたオプション値を得る. | ||||
| 
 | ||||
| enable_config(config, *defaults) | ||||
| disable_config(config, *defaults) | ||||
| 
 | ||||
|   コマンドライン上の--enable-<config>または | ||||
|   --disable-<config>で指定された真偽値を得る. | ||||
|   --enable-<config>が指定されていた場合はtrue, | ||||
|   --disable-<config>が指定されていた場合はfalseを返す. | ||||
|   どちらも指定されていない場合は,ブロックつきで呼び出されている場合は | ||||
|   *defaultsをyieldした結果,ブロックなしなら*defaultsを返す. | ||||
| 
 | ||||
| dir_config(target[, default_dir]) | ||||
| dir_config(target[, default_include, default_lib]) | ||||
| 
 | ||||
|  | @ -1165,6 +1217,12 @@ dir_config(target[, default_include, default_lib]) | |||
|   と等価である.追加された include ディレクトリと lib ディレクトリの | ||||
|   配列を返す. ([include_dir, lib_dir]) | ||||
| 
 | ||||
| pkg_config(pkg) | ||||
| 
 | ||||
|   pkg-configコマンドからパッケージpkgの情報を得る.  | ||||
|   pkg-configの実際のコマンド名は,--with-pkg-configコマンド | ||||
|   ラインオプションで指定可能. | ||||
| 
 | ||||
| /* | ||||
|  * Local variables: | ||||
|  * fill-column: 60 | ||||
|  |  | |||
|  | @ -8,7 +8,10 @@ require 'shellwords' | |||
| CONFIG = Config::MAKEFILE_CONFIG | ||||
| ORIG_LIBPATH = ENV['LIB'] | ||||
| 
 | ||||
| SRC_EXT = ["c", "cc", "m", "cxx", "cpp", "C"] | ||||
| SRC_EXT = %w[c cc m cxx cpp] | ||||
| if /mswin|bccwin|mingw|msdosdjgpp|human|os2/ !~ CONFIG['build_os'] | ||||
|   SRC_EXT.concat(%w[C]) | ||||
| end | ||||
| $static = $config_h = nil | ||||
| 
 | ||||
| unless defined? $configure_args | ||||
|  | @ -1164,6 +1167,7 @@ def init_mkmf(config = CONFIG) | |||
|   $INSTALLFILES = nil | ||||
| 
 | ||||
|   $objs = nil | ||||
|   $srcs = nil | ||||
|   $libs = "" | ||||
|   if $enable_shared or Config.expand(config["LIBRUBY"].dup) != Config.expand(config["LIBRUBY_A"].dup) | ||||
|     $LIBRUBYARG = config['LIBRUBYARG'] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu