summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-06 16:23:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-06 16:23:03 +0000
commit711fc22f349fdf98e0ae2040e4a2221c12f0c110 (patch)
tree44a45b58548f3371914624969592711de618ea29
parente69cce03a28a10be486ef9e8c2119c01dbfd2f2e (diff)
downloadruby-711fc22f349fdf98e0ae2040e4a2221c12f0c110.tar.gz
ruby-711fc22f349fdf98e0ae2040e4a2221c12f0c110.tar.xz
ruby-711fc22f349fdf98e0ae2040e4a2221c12f0c110.zip
* lib/mkmf.rb (with_cppflags, with_cflags, with_ldflags): keep flags
modified if the block returned true. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/mkmf.rb12
2 files changed, 10 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index a1b20d5bd..4692ae6eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-Sun Feb 6 23:51:30 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Feb 7 01:22:50 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (extract_makefile): extract previously collected
informations from existing Makefile.
@@ -24,6 +24,9 @@ Sun Feb 6 23:51:30 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (dir_config): accept arrays of directory names as
default values.
+ * lib/mkmf.rb (with_cppflags, with_cflags, with_ldflags): keep flags
+ modified if the block returned true.
+
Sun Feb 6 19:20:05 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* eval.c (stack_extend): add prototype because VC++8 doesn't
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index ce8876023..c5cfad30b 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -294,25 +294,25 @@ end
def with_cppflags(flags)
cppflags = $CPPFLAGS
$CPPFLAGS = flags
- return yield
+ ret = yield
ensure
- $CPPFLAGS = cppflags
+ $CPPFLAGS = cppflags unless ret
end
def with_cflags(flags)
cflags = $CFLAGS
$CFLAGS = flags
- return yield
+ ret = yield
ensure
- $CFLAGS = cflags
+ $CFLAGS = cflags unless ret
end
def with_ldflags(flags)
ldflags = $LDFLAGS
$LDFLAGS = flags
- return yield
+ ret = yield
ensure
- $LDFLAGS = ldflags
+ $LDFLAGS = ldflags unless ret
end
def try_static_assert(expr, headers = nil, opt = "", &b)