[前][次][番号順一覧][スレッド一覧]

ruby-changes:23926

From: drbrain <ko1@a...>
Date: Sat, 9 Jun 2012 08:21:59 +0900 (JST)
Subject: [ruby-changes:23926] drbrain:r35977 (trunk): * README.EXT (prepare extconf.rb): Added note to see MakeMakefile for

drbrain	2012-06-09 08:21:50 +0900 (Sat, 09 Jun 2012)

  New Revision: 35977

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35977

  Log:
    * README.EXT (prepare extconf.rb):  Added note to see MakeMakefile for
      documentation of extconf.rb functions.  Patch by Zachary Scott.
      [ruby-trunk - Feature #6522]
    * README.EXT (Appendix C):  Removed in favor of MakeMakefile.
      Patch by Zachary Scott.
    * lib/mkmf.rb:  Merged documentation from README.EXT Appendix C.  Patch
      by Zachary Scott.

  Modified files:
    trunk/ChangeLog
    trunk/README.EXT
    trunk/lib/mkmf.rb

Index: README.EXT
===================================================================
--- README.EXT	(revision 35976)
+++ README.EXT	(revision 35977)
@@ -763,7 +763,7 @@
   have_header(header[, preheaders[, opt]]): check whether header file exists
   find_header(header, *paths): find header from paths
   have_framework(fw): check whether framework exists (for MacOS X)
-  have_struct_member(type, member[, headers]): check whether struct has member
+  have_struct_member(type, member[, headers[, opt]]): check whether struct has member
   have_type(type[, headers[, opt]]): check whether type exists
   find_type(type, opt, *headers): check whether type exists in headers
   have_const(const[, headers[, opt]]): check whether constant is defined
@@ -772,8 +772,10 @@
   convertible_int(type[, headers[, opts]]): find convertible integer type
   find_executable(bin[, path]): find excutable file path
   create_header(header): generate configured header
-  create_makefile(target): generate Makefile
+  create_makefile(target[, target_prefix]): generate Makefile
 
+See MakeMakefile for full documentation of these functions.
+
 The value of the variables below will affect the Makefile.
 
   $CFLAGS: included in CFLAGS make variable (such as -O)
@@ -1407,105 +1409,6 @@
 Means that rb_add_event_hook() takes the third argument `data', to be
 passed to the given event hook function.
 
-Appendix C. Functions Available in extconf.rb
-
-These functions are available in extconf.rb:
-
- have_macro(macro, headers, opt)
-
-Checks whether macro is defined with header.  Returns true if the macro
-is defined.
-
- have_library(lib, func, opt)
-
-Checks whether the library exists, containing the specified function.
-Returns true if the library exists.
-
- find_library(lib, func, path...)
-
-Checks whether a library which contains the specified function exists in
-path.  Returns true if the library exists.
-
- have_func(func, headers, opt)
-
-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().
-The func shall be either mere function name or function name with
-arguments.
-Example:
-    have_func("LONG2NUM(0)")
-
- have_var(var, header, opt)
-
-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, preheaders, opt)
-
-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, headers, opt)
-
-Checks whether type has member with header.  Returns true if the type
-is defined and has the member.
-
- have_type(type, headers, 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 variable 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])
-
-Parses the command line options and adds the directories specified by
---with-<target>-dir, --with-<target>-include, and/or --with-<target>-lib
-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 for pkg by pkg-config command.  The actual
-command name can be overridden by --with-pkg-config command line
-option.
-
 /*
  * Local variables:
  * fill-column: 70
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 35976)
+++ ChangeLog	(revision 35977)
@@ -1,3 +1,13 @@
+Sat Jun  9 08:21:32 2012  Eric Hodel  <drbrain@s...>
+
+	* README.EXT (prepare extconf.rb):  Added note to see MakeMakefile for
+	  documentation of extconf.rb functions.  Patch by Zachary Scott.
+	  [ruby-trunk - Feature #6522]
+	* README.EXT (Appendix C):  Removed in favor of MakeMakefile.
+	  Patch by Zachary Scott.
+	* lib/mkmf.rb:  Merged documentation from README.EXT Appendix C.  Patch
+	  by Zachary Scott.
+
 Sat Jun  9 08:16:47 2012  Eric Hodel  <drbrain@s...>
 
 	* doc/re.rdoc:  Completed wording in the description of the =~ operator.
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 35976)
+++ lib/mkmf.rb	(revision 35977)
@@ -885,7 +885,7 @@
   end
 
   # Returns whether or not the given entry point +func+ can be found within
-  # +lib+.  If +func+ is nil, the <code>main()</code> entry point is used by
+  # +lib+.  If +func+ is +nil+, the <code>main()</code> entry point is used by
   # default.  If found, it adds the library to list of libraries to be used
   # when linking your extension.
   #
@@ -915,7 +915,7 @@
 
   # Returns whether or not the entry point +func+ can be found within the
   # library +lib+ in one of the +paths+ specified, where +paths+ is an array
-  # of strings.  If +func+ is nil , then the <code>main()</code> function is
+  # of strings.  If +func+ is +nil+ , then the <code>main()</code> function is
   # used as the entry point.
   #
   # If +lib+ is found, then the path it was found on is added to the list of
@@ -948,7 +948,11 @@
   # is passed as a preprocessor constant to the compiler using the function
   # name, in uppercase, prepended with +HAVE_+.
   #
-  # For example, if <code>have_func('foo')</code> returned true, then the
+  # To check functions in an additional library, you need to check that
+  # library first using <code>have_library()</code>.  The +func+ shall be
+  # either mere function name or function name with arguments.
+  #
+  # For example, if <code>have_func('foo')</code> returned +true+, then the
   # +HAVE_FOO+ preprocessor macro would be passed to the compiler.
   #
   def have_func(func, headers = nil, opt = "", &b)
@@ -967,6 +971,9 @@
   # is passed as a preprocessor constant to the compiler using the variable
   # name, in uppercase, prepended with +HAVE_+.
   #
+  # To check variables in an additional library, you need to check that
+  # library first using <code>have_library()</code>.
+  #
   # For example, if <code>have_var('foo')</code> returned true, then the
   # +HAVE_FOO+ preprocessor macro would be passed to the compiler.
   #
@@ -1482,8 +1489,8 @@
   # :startdoc:
 
   # Tests for the presence of a <tt>--with-</tt>_config_ or
-  # <tt>--without-</tt>_config_ option.  Returns true if the with option is
-  # given, false if the without option is given, and the default value
+  # <tt>--without-</tt>_config_ option.  Returns +true+ if the with option is
+  # given, +false+ if the without option is given, and the default value
   # otherwise.
   #
   # This can be useful for adding custom definitions, such as debug
@@ -1517,8 +1524,8 @@
   end
 
   # Tests for the presence of an <tt>--enable-</tt>_config_ or
-  # <tt>--disable-</tt>_config_ option. Returns true if the enable option is
-  # given, false if the disable option is given, and the default value
+  # <tt>--disable-</tt>_config_ option. Returns +true+ if the enable option is
+  # given, +false+ if the disable option is given, and the default value
   # otherwise.
   #
   # This can be useful for adding custom definitions, such as debug
@@ -1641,6 +1648,9 @@
 
   # Handles meta information about installed libraries. Uses your platform's
   # pkg-config program if it has one.
+  #
+  # The actual command name can be overridden by
+  # <code>--with-pkg-config</code> command line option.
   def pkg_config(pkg)
     if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
       # iff package specific config command is given

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]