зеркало из https://github.com/github/ruby.git
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:
Родитель
120c23edad
Коммит
7373320615
|
@ -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)
|
||||
|
|
30
enc/depend
30
enc/depend
|
@ -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'
|
||||
|
|
Загрузка…
Ссылка в новой задаче