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

ruby-changes:31647

From: nobu <ko1@a...>
Date: Tue, 19 Nov 2013 23:38:57 +0900 (JST)
Subject: [ruby-changes:31647] nobu:r43726 (trunk): configure.in: --with-os-version-style

nobu	2013-11-19 23:38:52 +0900 (Tue, 19 Nov 2013)

  New Revision: 43726

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

  Log:
    configure.in: --with-os-version-style
    
    * configure.in (--with-os-version-style): option to transform target
      OS version string.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 43725)
+++ configure.in	(revision 43726)
@@ -242,6 +242,29 @@ test x"$target_alias" = x && https://github.com/ruby/ruby/blob/trunk/configure.in#L242
 target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
 ac_install_sh='' # unusable for extension libraries.
 
+AS_CASE($target_os,
+	[darwin*], [os_version_style=major+0],
+	[os_version_style=full])
+AC_ARG_WITH(os-version-style,
+	AS_HELP_STRING([--with-os-version-style=TYPE],
+		       [OS version number for target and target_os [[full]]]
+		       [(full|teeny|minor+0|minor|major+0|major|none)]),
+	[os_version_style=$withval])
+os_version_style_transform=
+AS_CASE("${os_version_style}",
+	[full|teeny], [],
+	[minor+0], [os_version_style_transform=['s/\([0-9]\.[0-9][0-9]*\)\.[0-9][.0-9]*$/\1.0/']],
+	[minor],   [os_version_style_transform=['s/\([0-9]\.[0-9][0-9]*\)\.[0-9][.0-9]*$/\1/']],
+	[major+0], [os_version_style_transform=['s/\([0-9]\)\.[0-9][.0-9]*$/\1.0/']],
+	[major],   [os_version_style_transform=['s/\([0-9]\)\.[0-9][.0-9]*$/\1/']],
+	[none],    [os_version_style_transform=['s/[0-9]\.[0-9][.0-9]*$//']],
+	[AC_MSG_ERROR(unknown --with-os-version-style: $withval)])
+AS_IF([test -z "$target_alias" -a -n "$os_version_style_transform"],
+	[
+	target=`echo ${target} | sed "$os_version_style_transform"`
+	target_os=`echo ${target_os} | sed "$os_version_style_transform"`
+	])
+
 AC_DEFUN([RUBY_APPEND_OPTION],
 	[# RUBY_APPEND_OPTION($1, $2)
 	AS_CASE([" [$]{$1-} "],
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43725)
+++ ChangeLog	(revision 43726)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Nov 19 23:38:49 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in (--with-os-version-style): option to transform target
+	  OS version string.
+
 Tue Nov 19 21:27:33 2013  Tanaka Akira  <akr@f...>
 
 	* test/net/http/utils.rb (spawn_server): Specify zero for port to

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

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