diff --git a/ChangeLog b/ChangeLog index 59a3e016f5..b2f46a05b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri May 30 12:18:43 2008 Nobuyoshi Nakada + + * common.mk (prelude.c): simply depends on PREP. [ruby-dev:34877] + + * enc/make_encdb.rb, enc/trans/make_transdb.rb: ditto. + Fri May 30 10:55:42 2008 Nobuyoshi Nakada * vm_core.h (struct rb_unblock_callback), thread.c diff --git a/Makefile.in b/Makefile.in index 5aa12a8fa7..bd90cd4f77 100644 --- a/Makefile.in +++ b/Makefile.in @@ -204,5 +204,3 @@ distclean-local:: ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c - -MKPREP = $(PREP) $(RBCONFIG) diff --git a/common.mk b/common.mk index d58521229d..3f6986e40d 100644 --- a/common.mk +++ b/common.mk @@ -109,6 +109,8 @@ TESTWORKDIR = testwork BOOTSTRAPRUBY = $(BASERUBY) +COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) -rrbconfig $(srcdir)/tool/compile_prelude.rb + VCS = svn all: $(MKFILES) incs $(PREP) $(RBCONFIG) $(LIBRUBY) encs @@ -377,7 +379,7 @@ encs: enc.mk $(LIBRUBY) $(MAKE) -f enc.mk $(MFLAGS) 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)" $@ .PRECIOUS: $(MKFILES) @@ -742,14 +744,11 @@ transdb.h: $(PREP) miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $(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 diff --git a/enc/make_encdb.rb b/enc/make_encdb.rb index 013eabe1d7..6f71c3dfe6 100755 --- a/enc/make_encdb.rb +++ b/enc/make_encdb.rb @@ -65,12 +65,6 @@ 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 diff --git a/enc/trans/make_transdb.rb b/enc/trans/make_transdb.rb index aae24fdbf4..762dc107e3 100644 --- a/enc/trans/make_transdb.rb +++ b/enc/trans/make_transdb.rb @@ -31,12 +31,6 @@ Dir.open(transdir) {|d| d.grep(/.+\.[ch]\z/)}.sort_by {|e| end 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