summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-01-14 15:34:17 +0900
committerNobuyoshi Nakada <[email protected]>2025-01-14 15:34:17 +0900
commit4daa5ebb77282b0c004ae07b0fa37a74dacdedf8 (patch)
treed71ea50fe5dc635967e9728a6e0f89775cd15706
parent13c868ae3e1702b08daeeef01178ed5a5edbe497 (diff)
[DOC] About `create_makefile`
Describe two features that were missing from the documentation: - yields configuration part if a block is given. - "depend" file will be included.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12571
-rw-r--r--lib/mkmf.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 768a152ca7..25f3bcd750 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -2381,6 +2381,19 @@ RULES
# directory, i.e. the current directory. It is included as part of the
# +VPATH+ and added to the list of +INCFLAGS+.
#
+ # Yields the configuration part of the makefile to be generated, as an array
+ # of strings, if the block is given. The returned value will be used the
+ # new configuration part.
+ #
+ # create_makefile('foo') {|conf|
+ # [
+ # *conf,
+ # "MACRO_YOU_NEED = something",
+ # ]
+ # }
+ #
+ # If "depend" file exist in the source directory, that content will be
+ # included in the generated makefile, with formatted by depend_rules method.
def create_makefile(target, srcprefix = nil)
$target = target
libpath = $DEFLIBPATH|$LIBPATH