From 4daa5ebb77282b0c004ae07b0fa37a74dacdedf8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 14 Jan 2025 15:34:17 +0900 Subject: [PATCH] [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. --- lib/mkmf.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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