[#19261] lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@...

なかだです。

29 messages 2003/01/01
[#19360] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "K.Kosako" <kosako@...> 2003/01/15

nobu.nakada@nifty.ne.jpさんの

[#19361] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/15

なひです。

[#19364] Re: lstripped here-document (Re: comments and continuing strings on the next line) — nobu.nakada@... 2003/01/17

なかだです。

[#19366] Re: lstripped here-document (Re: comments and continuing strings on the next line) — "NAKAMURA, Hiroshi" <nakahiro@...> 2003/01/17

なひです。

[#19299] [BUG] errno == 0 — Kazuhiro Yoshida <moriq@...>

もりきゅうです。win32だけかもしれません。

22 messages 2003/01/04
[#19301] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19302] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19303] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19304] Re: [BUG] errno == 0 — "U.Nakamura" <usa@...> 2003/01/04

こんにちは、なかむら(う)です。

[#19306] Re: [BUG] errno == 0 — nobu.nakada@... 2003/01/05

なかだです。

[ruby-dev:19437] recursive dryrun (Re: [ruby-cvs] ruby, ruby/ext, ruby/win32, ruby/bcc32: * instruby.rb, ext/extmk.rb, Makefile.in, win32/Makefile.sub,)

From: nobu.nakada@...
Date: 2003-01-25 21:31:07 UTC
List: ruby-dev #19437
なかだです。

At Sat, 25 Jan 2003 18:59:34 +0000,
knu wrote:
>   Log:
>     * instruby.rb, ext/extmk.rb, Makefile.in, win32/Makefile.sub,
>       bcc32/Makefile.sub: Replace the complicated MFLAGS/MAKEFLAGS
>       parser with something plain and comprehensible.  This fixes a
>       bug where make flags were wrongly reordered and the resulted
>       command line often did not make sense especially when BSD make
>       is used with extra arguments given.  Tested with FreeBSD and
>       Linux by me and mswin32, bccwin32 and mingw by usa.

GNU makeだと$(MAKE)は直接含まれていないと特別な意味を持たないよ
うです。+フラグってどの程度移植性があるもんなんでしょうか。

あとmake -n installで$dryrunにならなくなってますが、no-install
があるから不要ってことでしょうか。というか、だから$(MAKE)が特別
扱いされなくても構わない?


Index: Makefile.in
===================================================================
RCS file: /cvs/ruby/src/ruby/Makefile.in,v
retrieving revision 1.42
diff -u -2 -p -r1.42 Makefile.in
--- Makefile.in	25 Jan 2003 18:59:33 -0000	1.42
+++ Makefile.in	25 Jan 2003 21:25:35 -0000
@@ -109,5 +109,5 @@ SCRIPT_ARGS   =	--dest-dir="$(DESTDIR)" 
 
 all:		@MAKEFILES@ miniruby$(EXEEXT) rbconfig.rb $(LIBRUBY)
-		@$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic="@EXTSTATIC@" $(SCRIPT_ARGS)
+		@+$(MINIRUBY) $(srcdir)/ext/extmk.rb --extstatic="@EXTSTATIC@" $(SCRIPT_ARGS)
 
 miniruby$(EXEEXT):	config.status $(LIBRUBY_A) $(MAINOBJ) dmyext.@OBJEXT@
@@ -134,13 +134,13 @@ ruby.imp:	$(LIBRUBY_A)
 
 install:	rbconfig.rb
-		$(MINIRUBY) $(srcdir)/instruby.rb $(SCRIPT_ARGS) --mantype="$(MANTYPE)"
-		$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) install
+		+$(MINIRUBY) $(srcdir)/instruby.rb $(SCRIPT_ARGS) --mantype="$(MANTYPE)"
+		+$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) install
 
 what-where no-install:	rbconfig.rb
-		$(MINIRUBY) $(srcdir)/instruby.rb -n $(SCRIPT_ARGS) --mantype="$(MANTYPE)"
-		$(MINIRUBY) $(srcdir)/ext/extmk.rb -n $(SCRIPT_ARGS) install
+		+$(MINIRUBY) $(srcdir)/instruby.rb -n $(SCRIPT_ARGS) --mantype="$(MANTYPE)"
+		+$(MINIRUBY) $(srcdir)/ext/extmk.rb -n $(SCRIPT_ARGS) install
 
 clean-ext:
-		@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) clean 2> /dev/null || true
+		@-+$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) clean 2> /dev/null || true
 
 clean-local:
@@ -152,5 +152,5 @@ clean: clean-ext clean-local
 
 distclean-ext:
-		@-$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) distclean 2> /dev/null || true
+		@-+$(MINIRUBY) $(srcdir)/ext/extmk.rb $(SCRIPT_ARGS) distclean 2> /dev/null || true
 
 distclean-local: clean-local
Index: instruby.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/instruby.rb,v
retrieving revision 1.43
diff -u -2 -p -r1.43 instruby.rb
--- instruby.rb	25 Jan 2003 18:59:33 -0000	1.43
+++ instruby.rb	25 Jan 2003 21:25:35 -0000
@@ -19,5 +19,5 @@ def parse_args()
   $dryrun = $OPT['n']
   $destdir = $OPT['dest-dir'] || ''
-  $make = $OPT['make'] || $make
+  $make = $OPT['make'] || $make || "make"
   make_flags = ($OPT['make-flags'] || '').strip
   mflags = ($OPT['mflags'] || '').strip
@@ -35,5 +35,10 @@ def parse_args()
   $mflags.unshift(*rest) unless rest.empty?
 
+  def $mflags.set?(flag)
+    grep(Regexp.new("^-(?!-).*%c"%flag, /nmake/ =~ $nmake)) {break true}
+  end
+
   $mflags << '-n' if $dryrun
+  $dryrun ||= $mflags.set?(?n)
 
   $mflags << "DESTDIR=#{$destdir}"
@@ -42,5 +47,5 @@ def parse_args()
   # we can just search with exact match.  Only nmake puts flags
   # together, but nmake does not propagate -k via MAKEFLAGS anyway.
-  $continue = $mflags.include?('-k')
+  $continue = $mflags.set?(?k)
 end
 
Index: ext/extmk.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/extmk.rb,v
retrieving revision 1.27
diff -u -2 -p -r1.27 extmk.rb
--- ext/extmk.rb	25 Jan 2003 18:59:34 -0000	1.27
+++ ext/extmk.rb	25 Jan 2003 21:25:35 -0000
@@ -137,5 +137,10 @@ def parse_args()
   $mflags.unshift(*rest) unless rest.empty?
 
+  def $mflags.set?(flag)
+    grep(Regexp.new("^-(?!-).*%c"%flag, $nmake == ?m)) {break true}
+  end
+
   $mflags << '-n' if $dryrun
+  $dryrun ||= $mflags.set?(?n)
 
   $mflags << "DESTDIR=#{$destdir}"
@@ -145,5 +150,5 @@ def parse_args()
   # puts flags together, but nmake does not propagate -k via MAKEFLAGS
   # anyway.
-  $continue = $mflags.include?('-k')
+  $continue = $mflags.set?(?k)
 end
 


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

In This Thread

Prev Next