* lib/mkmf.rb (with_cppflags, with_cflags, with_ldflags): keep flags

modified if the block returned true.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-02-06 16:23:03 +00:00
Родитель 7a07ffe479
Коммит ef8f1ff3df
2 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -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 * ext/extmk.rb (extract_makefile): extract previously collected
informations from existing Makefile. 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 * lib/mkmf.rb (dir_config): accept arrays of directory names as
default values. 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> Sun Feb 6 19:20:05 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* eval.c (stack_extend): add prototype because VC++8 doesn't * eval.c (stack_extend): add prototype because VC++8 doesn't

Просмотреть файл

@ -294,25 +294,25 @@ end
def with_cppflags(flags) def with_cppflags(flags)
cppflags = $CPPFLAGS cppflags = $CPPFLAGS
$CPPFLAGS = flags $CPPFLAGS = flags
return yield ret = yield
ensure ensure
$CPPFLAGS = cppflags $CPPFLAGS = cppflags unless ret
end end
def with_cflags(flags) def with_cflags(flags)
cflags = $CFLAGS cflags = $CFLAGS
$CFLAGS = flags $CFLAGS = flags
return yield ret = yield
ensure ensure
$CFLAGS = cflags $CFLAGS = cflags unless ret
end end
def with_ldflags(flags) def with_ldflags(flags)
ldflags = $LDFLAGS ldflags = $LDFLAGS
$LDFLAGS = flags $LDFLAGS = flags
return yield ret = yield
ensure ensure
$LDFLAGS = ldflags $LDFLAGS = ldflags unless ret
end end
def try_static_assert(expr, headers = nil, opt = "", &b) def try_static_assert(expr, headers = nil, opt = "", &b)