From c938de20cd80f18375d2cf198ce58033f2d32be7 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 27 Jan 2009 02:03:54 +0000 Subject: * common.mk (distclean-enc, realclean-enc): do not call clean of enc.mk twice or more. * enc/depend (cleanobjs): added deffile. * lib/mkmf.rb (create_makefile): removes deffile at clean instead of distclean. * win32/Makefile.sub (miniruby, LIBRUBY_SO): removes lib and exp files. * win32/Makefile.sub (clean, distclean): have moved to common.mk. * win32/rmdirs.bat: omits `not empty' message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 19 ++++++++++++++++++- common.mk | 9 ++++----- enc/depend | 1 + lib/mkmf.rb | 4 ++-- win32/Makefile.sub | 9 ++------- win32/rmdirs.bat | 2 +- 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51b4935061..a03adcba92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Tue Jan 27 11:03:52 2009 Nobuyoshi Nakada + + * common.mk (distclean-enc, realclean-enc): do not call clean of + enc.mk twice or more. + + * enc/depend (cleanobjs): added deffile. + + * lib/mkmf.rb (create_makefile): removes deffile at clean instead + of distclean. + + * win32/Makefile.sub (miniruby, LIBRUBY_SO): removes lib and exp + files. + + * win32/Makefile.sub (clean, distclean): have moved to common.mk. + + * win32/rmdirs.bat: omits `not empty' message. + Tue Jan 27 10:15:33 2009 Nobuyoshi Nakada * transcode.c (struct rb_transcoding): added ary member for debug. @@ -46,7 +63,7 @@ Sun Jan 25 12:02:56 2009 Nobuyoshi Nakada Sun Jan 25 11:50:20 2009 Nobuyoshi Nakada - * lib/mkmf.rb (create_makefile):fixed the variables order because + * lib/mkmf.rb (create_makefile): fixed the variables order because converter proc refers the separator. Sun Jan 25 11:25:10 2009 Nobuyoshi Nakada diff --git a/common.mk b/common.mk index 6866182fe2..0b4f6e307b 100644 --- a/common.mk +++ b/common.mk @@ -346,8 +346,6 @@ clean-local:: @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time @$(RM) *.inc y.tab.c y.output encdb.h transdb.h clean-ext:: -clean-enc: - @-$(MAKE) -f $(ENC_MK) $(MFLAGS) clean clean-golf: @$(RM) $(GORUBY)$(EXEEXT) $(GOLFOBJS) clean-rdoc: @@ -360,8 +358,6 @@ distclean-local:: clean-local @$(RM) config.cache config.log config.status config.status.lineno $(PRELUDES) @$(RM) *~ *.bak *.stackdump core *.core gmon.out $(PREP) distclean-ext:: -distclean-enc: clean-enc - @-$(MAKE) -f $(ENC_MK) $(MFLAGS) distclean distclean-golf: clean-golf @$(RM) $(GOLFPRELUDES) distclean-rdoc: @@ -372,10 +368,13 @@ realclean:: realclean-ext realclean-local realclean-enc realclean-golf realclean realclean-local:: distclean-local @$(RM) parse.c parse.h lex.c newline.c revision.h realclean-ext:: -realclean-enc:: distclean-enc realclean-golf: distclean-golf realclean-extout: distclean-extout +clean-enc distclean-enc realclean-enc: + @echo $(@:-enc=ing) encodings + @-$(MAKE) -f $(ENC_MK) $(MFLAGS) $(@:-enc=) + check: test test-all btest: miniruby$(EXEEXT) PHONY diff --git a/enc/depend b/enc/depend index 0cc00336be..2d9c4ab783 100644 --- a/enc/depend +++ b/enc/depend @@ -30,6 +30,7 @@ % dependencies = encs + trans % cleanlibs = Shellwords.shellwords(CONFIG["cleanlibs"] || "") % cleanobjs = Shellwords.shellwords(CONFIG["cleanobjs"] || "") +% cleanobjs << "$*.def" if deffile % rule_subst = CONFIG["RULE_SUBST"] || "%s" % transvpath = rule_subst.dup.sub!(/\{[^{}]+\}/, '$(TRANSVPATH)/') || "enc/trans/%s" % transvpath_prefix = (rule_subst.dup.sub!(/\{[^{}]+\}/, '{$(TRANSVPATH)}') || "") % "" diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 67f9b97aa9..54db11829f 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1599,7 +1599,7 @@ def create_makefile(target, srcprefix = nil) makedef = %{-e "puts 'EXPORTS', '#{EXPORT_PREFIX}Init_$(TARGET)'"} end if makedef - $distcleanfiles << '$(DEFFILE)' + $cleanfiles << '$(DEFFILE)' origdef = deffile deffile = "$(TARGET)-$(arch).def" end @@ -1649,7 +1649,7 @@ STATIC_LIB = #{staticlib unless $static.nil?} mfile.print " TARGET_SO = #{($extout ? '$(RUBYARCHDIR)/' : '')}$(DLLIB) CLEANLIBS = #{n}.#{CONFIG['DLEXT']} #{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}} -CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, '$(TARGET)')}} *.bak +CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"} static: $(STATIC_LIB)#{$extout ? " install-rb" : ""} diff --git a/win32/Makefile.sub b/win32/Makefile.sub index b3862c47c4..ce3bbff0d2 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -661,6 +661,7 @@ miniruby: miniruby$(EXEEXT) miniruby$(EXEEXT): @echo. $(LIBS) $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) -Fe$@ $(LDFLAGS) + @$(RM) miniruby.lib miniruby.exp miniruby.exe -v $(LDSHARED_1) $(LDSHARED_2) @@ -696,6 +697,7 @@ $(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res $(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \ $(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \ $(LIBRUBY_DLDFLAGS) + @$(RM) dummy.lib dummy.exp $(LDSHARED_0) $(LDSHARED_1) $(LDSHARED_2) @@ -712,9 +714,6 @@ clean-local:: @$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res @$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output -clean: - @-rmdir $(EXTOUT:/=\)\$(arch) - distclean-local:: @$(RM) ext\config.cache $(RBCONFIG:/=\) $(CONFIG_H:/=\) @$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc @@ -724,10 +723,6 @@ distclean-local:: distclean-rdoc: @-$(RMALL) $(RDOCOUT:/=\) -distclean: - @-rmdir $(EXTOUT:/=\)\$(arch) - @-rmdir $(EXTOUT:/=\) - clean-ext distclean-ext realclean-ext:: !if "$(EXTS)" != "" @for %I in ($(EXTS)) \ diff --git a/win32/rmdirs.bat b/win32/rmdirs.bat index a8549cc125..829e93d911 100755 --- a/win32/rmdirs.bat +++ b/win32/rmdirs.bat @@ -10,7 +10,7 @@ if "%1" == "" goto :end if not exist "%dir%\." goto :begin if "%dir%" == "." goto :begin if "%dir%" == ".." goto :begin - rd "%dir%" || goto :begin + rd "%dir%" 2> nul || goto :begin :trim_sep if not /%dir:~-1%/ == /\/ goto :trim_base set dir=%dir:~0,-1% -- cgit v1.2.3