summaryrefslogtreecommitdiff
path: root/win32/Makefile.sub
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
commit3cef10489ae2e61ef0a14d9b676d0242e4640ccd (patch)
tree3d1fc05f7ecb3549a6eb44a8deda5589c94915ed /win32/Makefile.sub
parent9da188550ca78525de507442aad1436eb636b3d7 (diff)
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/Makefile.sub')
-rw-r--r--win32/Makefile.sub30
1 files changed, 15 insertions, 15 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 790b41a4f15..ffccd1422c9 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)