aboutsummaryrefslogtreecommitdiffstats
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-01 07:53:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-01 07:53:15 +0000
commitaeef9f42fe53a4d5ed3f6bef2291f3755087ac94 (patch)
tree3d1fc05f7ecb3549a6eb44a8deda5589c94915ed /win32
parent7017ccfce961aff183d426882e24e4374bd1c5de (diff)
downloadruby-aeef9f42fe53a4d5ed3f6bef2291f3755087ac94.tar.gz
common.mk: separate clean-ext
* common.mk (clean-ext): separate clean-up of makefiles and timestamps, and clean-up of subdirectories under ext and gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.sub30
1 files changed, 15 insertions, 15 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 790b41a4f1..ffccd1422c 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -1063,31 +1063,31 @@ distclean-local::
-$(Q)$(RM) $(INSTALLED_LIST:/=\) $(arch_hdrdir:/=\)\ruby\config.h verconf.h
-$(Q)$(RMDIRS) $(arch_hdrdir:/=\)\ruby
-clean-ext distclean-ext realclean-ext::
- @cd ext && for /R $(EXTS) %I in (.) \
- do @if exist %I\Makefile ( \
+ext/clean.mk ext/distclean.mk ext/realclean.mk::
+ $(Q)if exist $(EXTS_MK) $(MAKE) -k -f $(EXTS_MK) top_srcdir=$(srcdir) $(*F)
+
+ext/clean gems/clean ext/distclean gems/distclean ext/realclean gems/realclean::
+ $(Q)cd $(@D) && for /R $(EXTS) %I in (.) \
+ do $(Q)if exist %I\Makefile ( \
cd %I && ( \
call set n=%I && \
- call set n=%n:%CD%\ext\=% && \
+ call set n=%n:%CD%\$(@D)\=% && \
call set n=%n:\.=% && \
- call echo $(@:-ext=)ing %n:\=/% & \
- $(MAKE) $(MFLAGS) $(@:-ext=) & \
+ call echo $(@F)ing %n:\=/% & \
+ $(MAKE) $(MFLAGS) $(@F) & \
cd %CD% & \
$(RMDIRS) %I \
) )
-distclean-ext realclean-ext::
- -$(Q)$(RM) ext/extinit.c ext/configure-ext.mk
- @cd ext && for /D $(EXTS) %I in (.) \
- do @if exist %I\exts.mk del %I\exts.mk
- -$(Q)rmdir ext 2> nul || @
-
-clean-extout:
+ext/distclean gems/distclean ext/realclean gems/realclean::
+ $(Q)cd $(@D) && for /R $(EXTS) %I in (exts.mk*) \
+ do $(Q)(del %I & rmdir %~dpI)
+ -$(Q)rmdir $(@D) 2> nul || @
clean-enc distclean-enc realclean-enc:
!if exist($(ENC_MK))
- @echo $(@:-enc=ing) encodings
- @-$(MAKE) $(MAKE_ENC) $(@:-enc=)
+ $(ECHO) $(@:-enc=ing) encodings
+ -$(Q)$(MAKE) $(MAKE_ENC) $(@:-enc=)
!endif
$(RBCONFIG): $(PREP)