aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-18 13:12:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-18 13:12:15 +0000
commit4c3d694fb418363a37ea12926222d4c4bb37a044 (patch)
tree95d9de4572d3dbbf5b2dcb8c1443f938b2d46b7b
parent2d47bf629f711cf5e0c2084225e9573fc8007db5 (diff)
downloadruby-4c3d694fb418363a37ea12926222d4c4bb37a044.tar.gz
common.mk: make enc/trans
* common.mk: buildtin encoding and transcoder objects need output directories when out-place build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--common.mk13
-rw-r--r--enc/depend2
2 files changed, 14 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index e863f41a45..efb586b2ab 100644
--- a/common.mk
+++ b/common.mk
@@ -28,6 +28,7 @@ EXTCONF = extconf.rb
LIBRUBY_EXTS = ./.libruby-with-ext.time
REVISION_H = ./.revision.time
PLATFORM_D = ./$(PLATFORM_DIR)/.time
+ENC_TRANS_D = enc/trans/.time
RDOCOUT = $(EXTOUT)/rdoc
HTMLOUT = $(EXTOUT)/html
CAPIOUT = doc/capi
@@ -515,6 +516,12 @@ clean-ext distclean-ext realclean-ext::
clean-enc distclean-enc realclean-enc: PHONY
+clean-enc: clean-enc.d
+
+clean-enc.d: PHONY
+ $(Q)$(RM) $(ENC_TRANS_D)
+ -$(Q) $(RMDIR) enc/trans enc 2> $(NULL) || exit 0
+
clean-rdoc distclean-rdoc realclean-rdoc:
@echo $(@:-rdoc=ing) rdoc
$(Q)$(RMALL) $(RDOCOUT)
@@ -641,6 +648,12 @@ $(PLATFORM_D):
$(Q) $(MAKEDIRS) $(PLATFORM_DIR)
@exit > $@
+PHONY $(BUILTIN_ENCOBJS) $(BUILTIN_TRANSOBJS): $(ENC_TRANS_D)
+
+$(ENC_TRANS_D):
+ $(Q) $(MAKEDIRS) enc/trans
+ @exit > $@
+
###
CCAN_DIR = {$(VPATH)}ccan
diff --git a/enc/depend b/enc/depend
index 76c4f89b0d..39a26a7b76 100644
--- a/enc/depend
+++ b/enc/depend
@@ -132,7 +132,7 @@ enc/encdb.$(OBJEXT): encdb.h
enc/trans/transdb.$(OBJEXT): transdb.h
clean:
-% %w[$(ENCSOS) $(LIBENC) $(ENCOBJS) $(ENCCLEANOBJS) $(ENCCLEANLIBS) $(TRANSSOS) $(LIBTRANS) $(TRANSOBJS) $(TRANSCLEANOBJS) $(TRANSCLEANLIBS)].each do |clean|
+% %w[$(ENCSOS) $(LIBENC) $(ENCOBJS) $(ENCCLEANOBJS) $(ENCCLEANLIBS) $(TRANSSOS) $(LIBTRANS) $(TRANSOBJS) $(TRANSCLEANOBJS) $(TRANSCLEANLIBS) enc/trans/.time].each do |clean|
$(Q)$(RM) <%=pathrep[clean]%>
% end
% @ignore_error = $nmake ? '' : ' 2> /dev/null || true'