Bug #11

prelude.c compilation problem on mswin32

Added by usa (Usaku NAKAMURA) almost 4 years ago. Updated about 1 year ago.

[ruby-dev:34877]
Status:Closed Start date:05/28/2008
Priority:Low Due date:
Assignee:usa (Usaku NAKAMURA) % Done:

0%

Category:-
Target version:-
ruby -v:

Description

Congratulations of starting mail transfer system of redmine.r.o.!

BTW,
on mswin32, after prelude.rb is updated and the contents is not changed (such as ``touch''ed), prelude.c will be always compiled.
This is a rare case, so priority is low.

History

Updated by usa (Usaku NAKAMURA) almost 4 years ago

  • Assignee set to usa (Usaku NAKAMURA)

Updated by usa (Usaku NAKAMURA) almost 4 years ago

  • Priority changed from Normal to Low

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago

なかだです。

At Wed, 28 May 2008 23:28:33 +0900,
redmine@ruby-lang.org wrote in [ruby-dev:34877]:
> BTW,
> on mswin32, after prelude.rb is updated and the contents is not changed (such as ``touch''ed), prelude.c will be always compiled.
> This is a rare case, so priority is low.

ifchangeを使うのを止めますか。


Index: Makefile.in
===================================================================
--- Makefile.in	(revision 16676)
+++ Makefile.in	(working copy)
@@ -205,4 +205,2 @@ distclean-local::
 ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
 	$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
-
-MKPREP = $(PREP) $(RBCONFIG)
Index: common.mk
===================================================================
--- common.mk	(revision 16676)
+++ common.mk	(working copy)
@@ -110,4 +110,6 @@ TESTWORKDIR   = testwork
 BOOTSTRAPRUBY = $(BASERUBY)

+COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) -rrbconfig $(srcdir)/tool/compile_prelude.rb
+
 VCS           = svn

@@ -378,5 +380,5 @@ encs: enc.mk $(LIBRUBY)

 enc.mk: $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
-	$(srcdir)/lib/mkmf.rb $(MKPREP)
+	$(srcdir)/lib/mkmf.rb $(PREP)
 	$(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" $@

@@ -743,12 +745,9 @@ miniprelude.c: $(srcdir)/tool/compile_pr
 	$(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@

-prelude.c: $(srcdir)/tool/compile_prelude.rb $(PRELUDE_SCRIPTS) $(MKPREP)
-	$(MINIRUBY) -I$(srcdir) -rrbconfig $(srcdir)/tool/compile_prelude.rb \
-		$(PRELUDE_SCRIPTS) $@.new
-	$(IFCHANGE) "$@" "$@.new"
+prelude.c: $(srcdir)/tool/compile_prelude.rb $(PRELUDE_SCRIPTS) $(PREP)
+	$(COMPILE_PRELUDE) $(PRELUDE_SCRIPTS) $@

-golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $(srcdir)/golf_prelude.rb $(MKPREP)
-	$(MINIRUBY) -I$(srcdir) -rrbconfig $(srcdir)/tool/compile_prelude.rb $(srcdir)/golf_prelude.rb $@.new
-	$(IFCHANGE) "$@" "$@.new"
+golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $(srcdir)/golf_prelude.rb $(PREP)
+	$(COMPILE_PRELUDE) $(srcdir)/golf_prelude.rb $@

 prereq: incs srcs preludes
Index: enc/trans/make_transdb.rb
===================================================================
--- enc/trans/make_transdb.rb	(revision 16676)
+++ enc/trans/make_transdb.rb	(working copy)
@@ -32,11 +32,5 @@ Dir.open(transdir) {|d| d.grep(/.+\.[ch]
 end
 result = converters.map {|k, v| %[rb_declare_transcoder("%s", "%s", "%s");\n] % v}.join
-mode = IO::RDWR|IO::CREAT
-mode |= IO::BINARY if defined?(IO::BINARY)
-open(outhdr, mode) do |f|
-  unless f.read == result
-    f.rewind
-    f.truncate(0)
-    f.print result
-  end
+open(outhdr, 'wb') do |f|
+  f.print result
 end
Index: enc/make_encdb.rb
===================================================================
--- enc/make_encdb.rb	(revision 16676)
+++ enc/make_encdb.rb	(working copy)
@@ -66,11 +66,5 @@ end
 result = encodings.map {|e| %[ENC_DEFINE("#{e}");\n]}.join + lines.join + 
   "\n#define ENCODING_COUNT #{count}\n"
-mode = IO::RDWR|IO::CREAT
-mode |= IO::BINARY if defined?(IO::BINARY)
-open(outhdr, mode) do |f|
-  unless f.read == result
-    f.rewind
-    f.truncate(0)
-    f.print result
-  end
+open(outhdr, 'wb') do |f|
+  f.print result
 end


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

Updated by usa (Usaku NAKAMURA) almost 4 years ago

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

In message "[ruby-dev:34886] Re: [Ruby 1.9 - Bug #11] prelude.c compilation problem on mswin32"
    on May.29,2008 17:36:42, <nobu@ruby-lang.org> wrote:
| ifchangeを使うのを止めますか。

よくわかってないんですが、止めちゃって問題はないんでしょうか?

この問題自体は優先度が低い(ITSに登録したのはITSの動作確認のた
めにたまたま目の前にあった問題を採用しただけ)ので、他の問題が
起きるなら放置でかまわないわけですが...


それでは。
-- 
U.Nakamura <usa@garbagecollect.jp>

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago

なかだです。

At Fri, 30 May 2008 05:41:13 +0900,
U.Nakamura wrote in [ruby-dev:34894]:
> | ifchangeを使うのを止めますか。
> 
> よくわかってないんですが、止めちゃって問題はないんでしょうか?

prelude.cも{enc,trans}db.hも、もうminirubyでは使わなくなってます
から。minirubyを作り直したときに{enc,trans}db.soも作り直すように
なりますが、問題はないでしょう。

> この問題自体は優先度が低い(ITSに登録したのはITSの動作確認のた
> めにたまたま目の前にあった問題を採用しただけ)ので、他の問題が
> 起きるなら放置でかまわないわけですが...

同じく、返信がITSへ反映されるか確認したかったのもあるので。

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

Updated by usa (Usaku NAKAMURA) almost 4 years ago

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

In message "[ruby-dev:34895] Re: [Ruby 1.9 - Bug #11] prelude.c compilation problem on mswin32"
    on May.30,2008 11:08:55, <nobu@ruby-lang.org> wrote:
> prelude.cも{enc,trans}db.hも、もうminirubyでは使わなくなってます
> から。minirubyを作り直したときに{enc,trans}db.soも作り直すように
> なりますが、問題はないでしょう。

じゃあ、なぜか既にパッチもあることですし、お願いします。


> 同じく、返信がITSへ反映されるか確認したかったのもあるので。

さて、今度は大丈夫かしらん。


それでは。
-- 
U.Nakamura <usa@garbagecollect.jp>

Updated by yugui (Yuki Sonoda) almost 4 years ago

返信テスト

Updated by usa (Usaku NAKAMURA) almost 4 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF