[#19011] open-uri - very easy net access library — Tanaka Akira <akr@...17n.org>

HTTP, FTP に簡単にアクセスするための open-uri というライブラリを作って

19 messages 2002/12/06

[#19066] ruby 1.6.9 preview4 予告 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

41 messages 2002/12/13
[#19079] Re: ruby 1.6.9 preview4 予告 — "Akinori MUSHA" <knu@...> 2002/12/16

At Fri, 13 Dec 2002 15:28:47 +0900,

[#19086] Re: ruby 1.6.9 preview4 予告 — UENO Katsuhiro <unnie@...> 2002/12/17

うえのです。

[#19087] Re: ruby 1.6.9 preview4 予告 — matz@... (Yukihiro Matsumoto) 2002/12/17

まつもと ゆきひろです

[#19083] Re: [ruby-cvs] ruby: * file.c (utimbuf): need to define for VC++. — WATANABE Hirofumi <eban@...>

わたなべです。

11 messages 2002/12/16

[#19127] Re: 1.6.8-preview4 build failed (on Vine Linux 2.1.5) (PR#373) — nobu.nakada@...

なかだです。

16 messages 2002/12/19
[#19129] Re: 1.6.8-preview4 build failed (on Vine Linux 2.1.5) (PR#373) — WATANABE Hirofumi <eban@...> 2002/12/19

わたなべです。

[#19198] ruby-1.8.0 / yield(nil)とyield()のちがい — m_seki@...

38 messages 2002/12/25
[#19209] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2002/12/27

まつもと ゆきひろです

[#19218] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — m_seki@... 2002/12/27

[#19219] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2002/12/27

まつもと ゆきひろです

[#19264] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2003/01/01

まつもと ゆきひろです

[#19266] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — Tanaka Akira <akr@...17n.org> 2003/01/01

In article <1041383157.631472.21307.nullmailer@picachu.netlab.jp>,

[#19271] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2003/01/01

まつもと ゆきひろです

[#19272] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — Tanaka Akira <akr@...17n.org> 2003/01/01

In article <1041394108.920587.21729.nullmailer@picachu.netlab.jp>,

[#19276] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2003/01/01

まつもと ゆきひろです

[#19278] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — Tanaka Akira <akr@...17n.org> 2003/01/01

In article <1041420724.492653.22355.nullmailer@picachu.netlab.jp>,

[ruby-dev:19165] options to ext/extmk.rb and instruby.rb

From: nobu.nakada@...
Date: 2002-12-23 03:37:34 UTC
List: ruby-dev #19165
なかだです。

At Fri, 20 Dec 2002 04:30:40 +0900,
Nobuyoshi-Nakada wrote:
> > > > それはそれとして
> > > >   -ldl -lcrypt -lm
> > > > がないのが原因だと思うので、これでどうでしょう?
> > > 
> > > 原因はそうだと思うんですが、$libsに追加していくとstaticにリンク
> > > する拡張ライブラリの分だけ$extlibsが長くなってしまうのが気にな
> > > ります。
> > 
> > いや、1.7ではすでになかださんが追加済みです。
> 
> それも気になってたんで、以下のようなパッチを作ってました。とい
> うか、昨日気づいたんですが、extmk.rbへのオプションが-sに食われ
> てしまってて、効いてないです。

ちょっとまずかったので訂正。およびinstruby.rbにもオプションがちゃ
んと渡ってないようです。

instruby.rbはごちゃごちゃしてきてるので、fileutilsを使って整理
したほうがいいかも。

# install src dir [mode]って、どこのinstallの書式だろう。


Index: ext/extmk.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/extmk.rb,v
retrieving revision 1.18
diff -u -2 -p -r1.18 extmk.rb
--- ext/extmk.rb	11 Dec 2002 15:12:52 -0000	1.18
+++ ext/extmk.rb	22 Dec 2002 20:35:36 -0000
@@ -1,3 +1,3 @@
-#! /usr/local/bin/ruby -s
+#! /usr/local/bin/ruby
 # -*- ruby -*-
 
@@ -27,4 +27,8 @@ $top_srcdir = srcdir
 $hdrdir = $top_srcdir
 
+def addendum(new, old)
+  yield(new.sub(/#{Regexp.quote(new)}/, '')) unless new == old
+end
+
 def extmake(target)
   print "#{$message} #{target}\n"
@@ -45,4 +49,8 @@ def extmake(target)
     $DLDFLAGS << " -Wl,--no-undefined"
   end
+  dldflags = $DLDFLAGS.dup
+  ldflags = $LDFLAGS.dup
+  libs = $libs.dup
+  locallibs = $LOCAL_LIBS.dup
 
   begin
@@ -85,8 +93,8 @@ def extmake(target)
       $extflags ||= ""
       $extlibs ||= ""
-      $extflags += " " + $DLDFLAGS if $DLDFLAGS
-      $extflags += " " + $LDFLAGS unless $LDFLAGS == ""
-      $extlibs += " " + $libs unless $libs == ""
-      $extlibs += " " + $LOCAL_LIBS unless $LOCAL_LIBS == ""
+      addendum($DLDFLAGS, dldflags) {|s| $extflags += s}
+      addendum($LDFLAGS, ldflags) {|s| $extflags += s}
+      addendum($libs, libs) {|s| $extlibs += s}
+      addendum($LOCAL_LIBS, locallibs) {|s| $extlibs += s}
     end
   rescue SystemExit
@@ -103,13 +111,9 @@ require 'getopts'
 getopts('', 'extstatic', 'make:', 'make-flags:')
 
-$force_static = $OPT['extstatic']
+$force_static = $OPT['extstatic'] == 'static'
 $make = $OPT['make'] || $make
 $mflags = Shellwords.shellwords($OPT['make-flags'] || "")
 
-if mflags = ENV["MAKEFLAGS"]
-  mflags, = mflags.split(nil, 2)
-else
-  mflags = ENV["MFLAGS"] || ""
-end
+mflags = $mflags.grep(/^-([^-].*)/) {$1}.join
 $continue = mflags.include?(?k)
 $dryrun = mflags.include?(?n)
Index: instruby.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/instruby.rb,v
retrieving revision 1.32
diff -u -2 -p -r1.32 instruby.rb
--- instruby.rb	22 Nov 2002 10:22:29 -0000	1.32
+++ instruby.rb	23 Dec 2002 03:25:07 -0000
@@ -4,53 +4,31 @@ load "./rbconfig.rb"
 include Config
 
+$:.unshift File.join(CONFIG["srcdir"], "lib")
+require 'fileutils'
+require 'shellwords'
+
 File.umask(0)
 
 while arg = ARGV.shift
   case arg
-  when /^--/			# ignore
+  when /^--make-flags=(.*)/
+    Shellwords.shellwords($1).grep(/^-[^-]*n/) {break $dryrun = true}
+  when "-n"
+    $dryrun = true
   when /^-/
-    $dryrun = /n/ =~ arg
-  when /=/			# ignore
   else
     destdir ||= arg
-    break
   end
 end
 destdir ||= ''
 
-$:.unshift File.join(CONFIG["srcdir"], "lib")
-require 'ftools'
-require 'shellwords'
-
-class Installer < File; end
+(Installer = Object).instance_eval do
+  extend FileUtils::Verbose
+  extend FileUtils::NoWrite if $dryrun
+  @fileutils_output = STDOUT
+  @fileutils_label = ''
+end
 class << Installer
-  if $dryrun
-    def makedirs(*dirs)
-      String === dirs.last or dirs.pop
-      for dir in dirs
-	File.directory?(dir) or print "mkdir -p #{dir}\n"
-      end
-    end
-    def install(file, dir, mode = nil, verbose = false)
-      to = catname(file, dir)
-      unless FileTest.exist? to and cmp file, to
-	print "install#{' -m %#o'%mode if mode} #{file} #{dir}\n"
-      end
-    end
-    def makelink(orig, link, verbose = false)
-      unless File.symlink?(link) and File.readlink(link) == orig
-	print "ln -sf #{orig} #{link}\n"
-      end
-    end
-  else
-    require "ftools"
-    def makelink(orig, link, verbose = false)
-      if exist? link
-	delete link
-      end
-      symlink orig, link
-      print "link #{orig} -> #{link}\n"
-    end
-  end
+  alias makelink ln_sf
 end
 


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread