ruby-changes:27789
From: nobu <ko1@a...>
Date: Wed, 20 Mar 2013 22:53:05 +0900 (JST)
Subject: [ruby-changes:27789] nobu:r39841 (trunk): mkmf.rb: prefix install_dirs only with DESTDIR
nobu 2013-03-20 22:52:54 +0900 (Wed, 20 Mar 2013) New Revision: 39841 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39841 Log: mkmf.rb: prefix install_dirs only with DESTDIR * lib/mkmf.rb (install_dirs, with_destdir): prefix with DESTDIR directories to install only unless bundled extension libraries. [ruby-core:53502] [Bug #8115] Modified files: trunk/ChangeLog trunk/lib/mkmf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 39840) +++ ChangeLog (revision 39841) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Mar 20 22:52:52 2013 Nobuyoshi Nakada <nobu@r...> + + * lib/mkmf.rb (install_dirs, with_destdir): prefix with DESTDIR + directories to install only unless bundled extension libraries. + [ruby-core:53502] [Bug #8115] + Wed Mar 20 17:47:53 2013 NAKAMURA Usaku <usa@r...> * test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 39840) +++ lib/mkmf.rb (revision 39841) @@ -199,21 +199,21 @@ module MakeMakefile https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L199 ] elsif $configure_args.has_key?('--vendor') dirs = [ - ['BINDIR', '$(bindir)'], - ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'], - ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'], - ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'], - ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], - ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], + ['BINDIR', '$(DESTDIR)$(bindir)'], + ['RUBYCOMMONDIR', '$(DESTDIR)$(vendordir)$(target_prefix)'], + ['RUBYLIBDIR', '$(DESTDIR)$(vendorlibdir)$(target_prefix)'], + ['RUBYARCHDIR', '$(DESTDIR)$(vendorarchdir)$(target_prefix)'], + ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], + ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], ] else dirs = [ - ['BINDIR', '$(bindir)'], - ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], - ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], - ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], - ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], - ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], + ['BINDIR', '$(DESTDIR)$(bindir)'], + ['RUBYCOMMONDIR', '$(DESTDIR)$(sitedir)$(target_prefix)'], + ['RUBYLIBDIR', '$(DESTDIR)$(sitelibdir)$(target_prefix)'], + ['RUBYARCHDIR', '$(DESTDIR)$(sitearchdir)$(target_prefix)'], + ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], + ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], ] end dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")] @@ -1750,6 +1750,7 @@ SRC https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1750 end def with_destdir(dir) + return dir unless $extmk dir = dir.sub($dest_prefix_pattern, '') /\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir end @@ -1808,8 +1809,8 @@ ECHO = $(ECHO1:0=@echo) https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1809 #### Start of system configuration section. #### #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk} srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}} -topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace} -hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace} +topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace} +hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace} arch_hdrdir = #{$arch_hdrdir.quote} PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']} VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/