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

ruby-changes:10196

From: nobu <ko1@a...>
Date: Thu, 22 Jan 2009 18:13:10 +0900 (JST)
Subject: [ruby-changes:10196] Ruby:r21740 (trunk): * lib/mkmf.rb (create_makefile): removes installed files under

nobu	2009-01-22 18:12:49 +0900 (Thu, 22 Jan 2009)

  New Revision: 21740

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

  Log:
    * lib/mkmf.rb (create_makefile): removes installed files under
      extout at distclean.

  Modified files:
    trunk/ChangeLog
    trunk/lib/mkmf.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21739)
+++ ChangeLog	(revision 21740)
@@ -1,3 +1,8 @@
+Thu Jan 22 18:14:04 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/mkmf.rb (create_makefile): removes installed files under
+	  extout at distclean.
+
 Thu Jan 22 17:12:37 2009  Takeyuki FUJIOKA  <xibbar@r...>
 
 	* lib/cgi/core.rb (CGI.parse): generate only key on params hash
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 21739)
+++ lib/mkmf.rb	(revision 21740)
@@ -1586,6 +1586,10 @@
   end
   origdef ||= ''
 
+  if $extout and $INSTALLFILES
+    $distcleanfiles.concat($INSTALLFILES.collect {|files, dir|File.join(dir, files.sub(/\A\.\//, ''))})
+  end
+
   if $extmk and not $extconf_h
     create_header
   end
@@ -1660,6 +1664,8 @@
   mfile.print("install-rb-default: pre-install-rb-default\n")
   mfile.print("pre-install-rb: Makefile\n")
   mfile.print("pre-install-rb-default: Makefile\n")
+  fsep = config_string('BUILD_FILE_SEPARATOR')
+  sep = fsep ? ":/=#{fsep}" : ""
   for sfx, i in [["-default", [["lib/**/*.rb", "$(RUBYLIBDIR)", "lib"]]], ["", $INSTALLFILES]]
     files = install_files(mfile, i, nil, srcprefix) or next
     for dir, *files in files
@@ -1673,14 +1679,10 @@
         mfile.print("#{dest}: #{f}\n")
         mfile.print("\t$(MAKEDIRS) $(@D)\n") unless $nmake
         mfile.print("\t$(#{$extout ? 'COPY' : 'INSTALL_DATA'}) ")
-	sep = config_string('BUILD_FILE_SEPARATOR')
-	if sep
-	  f = f.gsub("/", sep)
-	  sep = ":/="+sep
+	if fsep
+	  f = f.gsub("/", fsep)
 	  f = f.gsub(/(\$\(\w+)(\))/) {$1+sep+$2}
 	  f = f.gsub(/(\$\{\w+)(\})/) {$1+sep+$2}
-	else
-	  sep = ""
 	end
 	mfile.print("#{f} $(@D#{sep})\n")
 	if defined?($installed_list) and !$extout

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

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