summaryrefslogtreecommitdiff
path: root/win32/Makefile.sub
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-28 09:23:03 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-28 09:23:03 +0000
commita21146a57503dcda22c6764afe6f67e9be5468ac (patch)
tree8423bddfe90ed6dedaea1d264bee0401f603fc7f /win32/Makefile.sub
parent3658470310fb6095f27ef85226c7a8589e66be1e (diff)
merges r21764 and r21765 from trunk into ruby_1_9_1.
* Makefile.in, win32/Makefile.sub (RMDIRS): remove directory and parents. * Makefile.in, win32/Makefile.sub (distclean-rdoc): added to remove temprary rdoc. * Makefile.in, win32/Makefile.sub (distclean): removes extout directory. * Makefile.in, win32/Makefile.sub (clean-ext): skips non-existent directories. * common.mk (clean, distclean): cleans rdoc. * common.mk (clean-extout): removes extout directory. * configure.in (RMDIRS, RMALL): added to clean extout. * lib/fileutils.rb (FileUtils#rmdir): added :parents option. * lib/mkmf.rb (create_makefile): cleans installed files at clean instead of distclean. * lib/mkmf.rb (create_makefile): added clean-so and clean-rb. * lib/mkmf.rb (def init_mkmf): added DISTCLEANDIRS. * lib/un.rb (rmdir): added -p option. * tool/rmdirs, win32/rmdirs.bat: removes directory and the parents. * win32/rm.bat: added -r option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/Makefile.sub')
-rw-r--r--win32/Makefile.sub28
1 files changed, 24 insertions, 4 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index a71eeb90e1..e0021211ef 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -64,6 +64,7 @@ PURIFY =
AUTOCONF = autoconf
IFCHANGE = $(COMSPEC) /C $(srcdir:/=\)\win32\ifchange.bat
RM = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat
+RMDIRS = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat
CP = copy > nul
MV = move > nul
!if !defined(BASERUBY)
@@ -571,6 +572,8 @@ s,@ARFLAGS@,$(ARFLAGS),;t t
s,@LN_S@,$(LN_S),;t t
s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t
s,@RM@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rm.bat,;t t
+s,@RMDIRS@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat,;t t
+s,@RMALL@,$$(COMSPEC) /C rmdir /s /q,;t t
s,@CP@,copy > nul,;t t
s,@LIBOBJS@,$(LIBOBJS),;t t
s,@ALLOCA@,$(ALLOCA),;t t
@@ -705,18 +708,35 @@ 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
+ @-$(RM) $(INSTALLED_LIST:/=\) $(arch_hdrdir:/=\)\ruby\config.h
+ @-$(RMDIRS) $(arch_hdrdir:/=\)\ruby
+
+distclean-rdoc:
+ @-$(RMALL) $(RDOCOUT:/=\)
+
+distclean:
+ @-rmdir $(EXTOUT:/=\)\$(arch)
+ @-rmdir $(EXTOUT:/=\)
clean-ext distclean-ext realclean-ext::
- @for /R ext %I in (.) do @if exist %I\Makefile ( \
+!if "$(EXTS)" == ""
+ @for %I in ($(EXTS)) \
+!else
+ @for /R ext %I in (.) \
+!endif
+ do @if exist %I\Makefile ( \
+ cd %I && ( \
echo $(@:-ext=)ing %~nI & \
- cd %I & \
$(MAKE) $(MFLAGS) $(@:-ext=) & \
cd %CD% & \
- rmdir %I \
- )
+ $(RMDIRS) %I \
+ ) )
distclean-ext realclean-ext::
@-rmdir ext