1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

enc: workdir timestamps

* 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
parent 120c23edad
commit 7373320615
2 changed files with 25 additions and 9 deletions

View file

@ -20,6 +20,8 @@ TRANSSODIR = $(ENCSODIR)/trans
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@
.SUFFIXES: .trans
all: make-workdir
all:
make-workdir:
$(Q)$(MAKEDIRS) $(WORKDIRS)

View file

@ -28,8 +28,10 @@ else
''
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)
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.status
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| rule_subst % n}.join(' ')%>
% 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
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'