[前][次][番号順一覧][スレッド一覧]

ruby-changes:41640

From: nobu <ko1@a...>
Date: Tue, 2 Feb 2016 13:38:34 +0900 (JST)
Subject: [ruby-changes:41640] nobu:r53714 (trunk): enc: workdir timestamps

nobu	2016-02-02 13:39:38 +0900 (Tue, 02 Feb 2016)

  New Revision: 53714

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53714

  Log:
    enc: workdir timestamps
    
    * enc/depend: make timestamps for each work directory, instead of
      making for each compilation and link.

  Modified files:
    trunk/enc/Makefile.in
    trunk/enc/depend
Index: enc/depend
===================================================================
--- enc/depend	(revision 53713)
+++ enc/depend	(revision 53714)
@@ -28,8 +28,10 @@ else https://github.com/ruby/ruby/blob/trunk/enc/depend#L28
   ''
 end %> <%=CONFIG['LIBS']%> $(EXTLIBS)
 
-ENCOBJS = <%=ENCS.map {|e|"enc/#{e}.$(OBJEXT)"}.join(" \\\n\t  ")%><%="\n" if ENCS.size>1%>
-ENCSOS = <%=ENCS.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%><%="\n" if ENCS.size>1%>
+ENCOBJS =<%ENCS.map {|e|%> enc/<%=e%>.$(OBJEXT) \
+         <%}%> #
+ENCSOS =<%ENCS.map {|e|%> $(ENCSODIR)/<%=e%>.$(DLEXT) \
+        <%}%> #
 ENCCLEANLIBS = <%=cleanlibs.map {|clean|
   clean.gsub(/\$\*(\.\w+)?/) {"$(ENCOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"}
 }.join(" ")%>
@@ -40,9 +42,12 @@ LIBENC=enc/libenc.$(LIBEXT) https://github.com/ruby/ruby/blob/trunk/enc/depend#L42
 
 TRANSVPATH = $(srcdir)/enc/trans
 
-TRANSCSRCS = <%=ATRANS.map {|e| transvpath % "#{e}.c"}.join(" \\\n\t     ")%><%="\n" if TRANS.size>1%>
-TRANSOBJS = <%=TRANS.map {|e|"enc/#{e}.$(OBJEXT)"}.join(" \\\n\t    ")%><%="\n" if TRANS.size>1%>
-TRANSSOS = <%=TRANS.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t   ")%><%="\n" if TRANS.size>1%>
+TRANSCSRCS =<%ATRANS.map {|e|%> <%=transvpath % "#{e}.c"%> \
+            <%}%> #
+TRANSOBJS =<%TRANS.map {|e|%> enc/<%=e%>.$(OBJEXT) \
+           <%}%> #
+TRANSSOS =<%TRANS.map {|e|%> $(ENCSODIR)/<%=e%>.$(DLEXT) \
+          <%}%> #
 TRANSCLEANLIBS = <%=cleanlibs.map {|clean|
   clean.gsub(/\$\*(\.\w+)?/) {"$(TRANSOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"}
 }.join(" ")%>
@@ -78,6 +83,17 @@ enc trans $(ENCSOS) $(TRANSSOS): config. https://github.com/ruby/ruby/blob/trunk/enc/depend#L83
 
 srcs: $(TRANSCSRCS)
 
+$(ENC_TRANS_D):
+	$(Q) $(MAKEDIRS) enc/trans
+	@exit > $@
+
+$(ENC_TRANS_SO_D):
+	$(Q) $(MAKEDIRS) $(TRANSSODIR)
+	@exit > $@
+
+$(ENCOBJS) $(TRANSOBJS): $(ENC_TRANS_D)
+$(ENCSOS) $(TRANSSOS): $(ENC_TRANS_SO_D)
+
 <%=transvpath_prefix%>.trans<%=transvpath_prefix%>.c:
 	$(ECHO) generating table from $@
 	$(Q)$(MINIRUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo "$@" "$<"
@@ -118,13 +134,11 @@ enc/<%=e%>.$(OBJEXT): <%=deps.map {|n| r https://github.com/ruby/ruby/blob/trunk/enc/depend#L134
 %     cmd.sub!(/\$\(DEFFILE\)/) {df}
 %     cmd.gsub!(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"}
 %   end
-	$(Q)$(MAKEDIRS) "$(@D)"
 	$(Q)<%=cmd%>
 
 % end
 % dependencies.each do |e|
 <%="enc/#{e}.$(OBJEXT)"%>: <%="$(encsrcdir)/#{e}.c"%>
-	-$(Q)$(MAKEDIRS) "$(@D)"
 	$(ECHO) compiling <%= "$(encsrcdir)/#{e}.c"%>
 	$(Q)<%=COMPILE_C.gsub(/\$(\()?<(\:[^)]+)?(\))?/){"$(encsrcdir)/#{e}.c"}%>
 
@@ -134,7 +148,7 @@ enc/encdb.$(OBJEXT): encdb.h https://github.com/ruby/ruby/blob/trunk/enc/depend#L148
 enc/trans/transdb.$(OBJEXT): transdb.h
 
 clean:
-% %w[$(ENCSOS) $(LIBENC) $(ENCOBJS) $(ENCCLEANOBJS) $(ENCCLEANLIBS) $(TRANSSOS) $(LIBTRANS) $(TRANSOBJS) $(TRANSCLEANOBJS) $(TRANSCLEANLIBS) enc/trans/.time].each do |clean|
+% %w[$(ENCSOS) $(LIBENC) $(ENCOBJS) $(ENCCLEANOBJS) $(ENCCLEANLIBS) $(TRANSSOS) $(LIBTRANS) $(TRANSOBJS) $(TRANSCLEANOBJS) $(TRANSCLEANLIBS) $(ENC_TRANS_D) $(ENC_TRANS_SO_D)].each do |clean|
 	$(Q)$(RM) <%=pathrep[clean]%>
 % end
 % @ignore_error = $nmake ? '' : ' 2> /dev/null || true'
Index: enc/Makefile.in
===================================================================
--- enc/Makefile.in	(revision 53713)
+++ enc/Makefile.in	(revision 53714)
@@ -20,6 +20,8 @@ TRANSSODIR = $(ENCSODIR)/trans https://github.com/ruby/ruby/blob/trunk/enc/Makefile.in#L20
 DLEXT = @DLEXT@
 OBJEXT = @OBJEXT@
 LIBEXT = @LIBEXT@
+ENC_TRANS_D   = ./enc/trans/.time
+ENC_TRANS_SO_D = ./enc/trans/.so.time
 
 BUILTIN_ENCS	= enc/ascii.c enc/us_ascii.c\
 		  enc/unicode.c enc/utf_8.c
@@ -69,7 +71,7 @@ MAKEDIRS = @MAKEDIRS@ https://github.com/ruby/ruby/blob/trunk/enc/Makefile.in#L71
 
 .SUFFIXES: .trans
 
-all: make-workdir
+all:
 
 make-workdir:
 	$(Q)$(MAKEDIRS) $(WORKDIRS)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]