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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-02-02 04:39:38 +00:00
Родитель 120c23edad
Коммит 7373320615
2 изменённых файлов: 25 добавлений и 9 удалений

Просмотреть файл

@ -20,6 +20,8 @@ TRANSSODIR = $(ENCSODIR)/trans
DLEXT = @DLEXT@ DLEXT = @DLEXT@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
LIBEXT = @LIBEXT@ 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\ BUILTIN_ENCS = enc/ascii.c enc/us_ascii.c\
enc/unicode.c enc/utf_8.c enc/unicode.c enc/utf_8.c
@ -69,7 +71,7 @@ MAKEDIRS = @MAKEDIRS@
.SUFFIXES: .trans .SUFFIXES: .trans
all: make-workdir all:
make-workdir: make-workdir:
$(Q)$(MAKEDIRS) $(WORKDIRS) $(Q)$(MAKEDIRS) $(WORKDIRS)

Просмотреть файл

@ -28,8 +28,10 @@ else
'' ''
end %> <%=CONFIG['LIBS']%> $(EXTLIBS) end %> <%=CONFIG['LIBS']%> $(EXTLIBS)
ENCOBJS = <%=ENCS.map {|e|"enc/#{e}.$(OBJEXT)"}.join(" \\\n\t ")%><%="\n" if ENCS.size>1%> ENCOBJS =<%ENCS.map {|e|%> enc/<%=e%>.$(OBJEXT) \
ENCSOS = <%=ENCS.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%><%="\n" if ENCS.size>1%> <%}%> #
ENCSOS =<%ENCS.map {|e|%> $(ENCSODIR)/<%=e%>.$(DLEXT) \
<%}%> #
ENCCLEANLIBS = <%=cleanlibs.map {|clean| ENCCLEANLIBS = <%=cleanlibs.map {|clean|
clean.gsub(/\$\*(\.\w+)?/) {"$(ENCOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"} clean.gsub(/\$\*(\.\w+)?/) {"$(ENCOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"}
}.join(" ")%> }.join(" ")%>
@ -40,9 +42,12 @@ LIBENC=enc/libenc.$(LIBEXT)
TRANSVPATH = $(srcdir)/enc/trans TRANSVPATH = $(srcdir)/enc/trans
TRANSCSRCS = <%=ATRANS.map {|e| transvpath % "#{e}.c"}.join(" \\\n\t ")%><%="\n" if TRANS.size>1%> TRANSCSRCS =<%ATRANS.map {|e|%> <%=transvpath % "#{e}.c"%> \
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%> TRANSOBJS =<%TRANS.map {|e|%> enc/<%=e%>.$(OBJEXT) \
<%}%> #
TRANSSOS =<%TRANS.map {|e|%> $(ENCSODIR)/<%=e%>.$(DLEXT) \
<%}%> #
TRANSCLEANLIBS = <%=cleanlibs.map {|clean| TRANSCLEANLIBS = <%=cleanlibs.map {|clean|
clean.gsub(/\$\*(\.\w+)?/) {"$(TRANSOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"} clean.gsub(/\$\*(\.\w+)?/) {"$(TRANSOBJS#{$1 ? ":.#{CONFIG["OBJEXT"]}=#{$1}" : ""})"}
}.join(" ")%> }.join(" ")%>
@ -78,6 +83,17 @@ enc trans $(ENCSOS) $(TRANSSOS): config.status
srcs: $(TRANSCSRCS) 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: <%=transvpath_prefix%>.trans<%=transvpath_prefix%>.c:
$(ECHO) generating table from $@ $(ECHO) generating table from $@
$(Q)$(MINIRUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo "$@" "$<" $(Q)$(MINIRUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo "$@" "$<"
@ -118,13 +134,11 @@ enc/<%=e%>.$(OBJEXT): <%=deps.map {|n| rule_subst % n}.join(' ')%>
% cmd.sub!(/\$\(DEFFILE\)/) {df} % cmd.sub!(/\$\(DEFFILE\)/) {df}
% cmd.gsub!(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"} % cmd.gsub!(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"}
% end % end
$(Q)$(MAKEDIRS) "$(@D)"
$(Q)<%=cmd%> $(Q)<%=cmd%>
% end % end
% dependencies.each do |e| % dependencies.each do |e|
<%="enc/#{e}.$(OBJEXT)"%>: <%="$(encsrcdir)/#{e}.c"%> <%="enc/#{e}.$(OBJEXT)"%>: <%="$(encsrcdir)/#{e}.c"%>
-$(Q)$(MAKEDIRS) "$(@D)"
$(ECHO) compiling <%= "$(encsrcdir)/#{e}.c"%> $(ECHO) compiling <%= "$(encsrcdir)/#{e}.c"%>
$(Q)<%=COMPILE_C.gsub(/\$(\()?<(\:[^)]+)?(\))?/){"$(encsrcdir)/#{e}.c"}%> $(Q)<%=COMPILE_C.gsub(/\$(\()?<(\:[^)]+)?(\))?/){"$(encsrcdir)/#{e}.c"}%>
@ -134,7 +148,7 @@ enc/encdb.$(OBJEXT): encdb.h
enc/trans/transdb.$(OBJEXT): transdb.h enc/trans/transdb.$(OBJEXT): transdb.h
clean: 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]%> $(Q)$(RM) <%=pathrep[clean]%>
% end % end
% @ignore_error = $nmake ? '' : ' 2> /dev/null || true' % @ignore_error = $nmake ? '' : ' 2> /dev/null || true'