ruby-changes:53949
From: nobu <ko1@a...>
Date: Mon, 3 Dec 2018 22:12:39 +0900 (JST)
Subject: [ruby-changes:53949] nobu:r66169 (trunk): update-deps: support coroutine dependencies
nobu 2018-12-03 22:12:34 +0900 (Mon, 03 Dec 2018) New Revision: 66169 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66169 Log: update-deps: support coroutine dependencies Modified files: trunk/common.mk trunk/tool/update-deps trunk/win32/Makefile.sub Index: common.mk =================================================================== --- common.mk (revision 66168) +++ common.mk (revision 66169) @@ -1495,6 +1495,7 @@ array.$(OBJEXT): {$(VPATH)}config.h https://github.com/ruby/ruby/blob/trunk/common.mk#L1495 array.$(OBJEXT): {$(VPATH)}debug_counter.h array.$(OBJEXT): {$(VPATH)}defines.h array.$(OBJEXT): {$(VPATH)}encoding.h +array.$(OBJEXT): {$(VPATH)}gc.h array.$(OBJEXT): {$(VPATH)}id.h array.$(OBJEXT): {$(VPATH)}intern.h array.$(OBJEXT): {$(VPATH)}internal.h @@ -1522,6 +1523,7 @@ ast.$(OBJEXT): {$(VPATH)}encoding.h https://github.com/ruby/ruby/blob/trunk/common.mk#L1523 ast.$(OBJEXT): {$(VPATH)}id.h ast.$(OBJEXT): {$(VPATH)}intern.h ast.$(OBJEXT): {$(VPATH)}internal.h +ast.$(OBJEXT): {$(VPATH)}iseq.h ast.$(OBJEXT): {$(VPATH)}method.h ast.$(OBJEXT): {$(VPATH)}missing.h ast.$(OBJEXT): {$(VPATH)}node.h @@ -1656,6 +1658,7 @@ cont.$(OBJEXT): $(CCAN_DIR)/list/list.h https://github.com/ruby/ruby/blob/trunk/common.mk#L1658 cont.$(OBJEXT): $(CCAN_DIR)/str/str.h cont.$(OBJEXT): $(hdrdir)/ruby/ruby.h cont.$(OBJEXT): $(top_srcdir)/include/ruby.h +cont.$(OBJEXT): {$(VPATH)}$(COROUTINE_H) cont.$(OBJEXT): {$(VPATH)}config.h cont.$(OBJEXT): {$(VPATH)}cont.c cont.$(OBJEXT): {$(VPATH)}defines.h @@ -2050,6 +2053,7 @@ goruby.$(OBJEXT): {$(VPATH)}vm_debug.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2053 hash.$(OBJEXT): $(hdrdir)/ruby/ruby.h hash.$(OBJEXT): $(top_srcdir)/include/ruby.h hash.$(OBJEXT): {$(VPATH)}config.h +hash.$(OBJEXT): {$(VPATH)}debug_counter.h hash.$(OBJEXT): {$(VPATH)}defines.h hash.$(OBJEXT): {$(VPATH)}encoding.h hash.$(OBJEXT): {$(VPATH)}gc.h @@ -2063,9 +2067,11 @@ hash.$(OBJEXT): {$(VPATH)}onigmo.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2067 hash.$(OBJEXT): {$(VPATH)}oniguruma.h hash.$(OBJEXT): {$(VPATH)}probes.dmyh hash.$(OBJEXT): {$(VPATH)}probes.h +hash.$(OBJEXT): {$(VPATH)}ruby_assert.h hash.$(OBJEXT): {$(VPATH)}st.h hash.$(OBJEXT): {$(VPATH)}subst.h hash.$(OBJEXT): {$(VPATH)}symbol.h +hash.$(OBJEXT): {$(VPATH)}transient_heap.h hash.$(OBJEXT): {$(VPATH)}util.h inits.$(OBJEXT): $(hdrdir)/ruby/ruby.h inits.$(OBJEXT): $(top_srcdir)/include/ruby.h @@ -2107,6 +2113,7 @@ io.$(OBJEXT): {$(VPATH)}ruby_atomic.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2113 io.$(OBJEXT): {$(VPATH)}st.h io.$(OBJEXT): {$(VPATH)}subst.h io.$(OBJEXT): {$(VPATH)}thread.h +io.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h io.$(OBJEXT): {$(VPATH)}thread_native.h io.$(OBJEXT): {$(VPATH)}util.h io.$(OBJEXT): {$(VPATH)}vm_core.h @@ -2272,6 +2279,7 @@ mjit.$(OBJEXT): $(hdrdir)/ruby/ruby.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2279 mjit.$(OBJEXT): $(top_srcdir)/include/ruby.h mjit.$(OBJEXT): {$(VPATH)}config.h mjit.$(OBJEXT): {$(VPATH)}constant.h +mjit.$(OBJEXT): {$(VPATH)}debug.h mjit.$(OBJEXT): {$(VPATH)}defines.h mjit.$(OBJEXT): {$(VPATH)}dln.h mjit.$(OBJEXT): {$(VPATH)}gc.h @@ -2502,6 +2510,7 @@ process.$(OBJEXT): {$(VPATH)}config.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2510 process.$(OBJEXT): {$(VPATH)}defines.h process.$(OBJEXT): {$(VPATH)}dln.h process.$(OBJEXT): {$(VPATH)}encoding.h +process.$(OBJEXT): {$(VPATH)}hrtime.h process.$(OBJEXT): {$(VPATH)}id.h process.$(OBJEXT): {$(VPATH)}intern.h process.$(OBJEXT): {$(VPATH)}internal.h @@ -2665,6 +2674,7 @@ regsyntax.$(OBJEXT): {$(VPATH)}regint.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2674 regsyntax.$(OBJEXT): {$(VPATH)}regsyntax.c regsyntax.$(OBJEXT): {$(VPATH)}st.h regsyntax.$(OBJEXT): {$(VPATH)}subst.h +ruby-runner.$(OBJEXT): {$(VPATH)}config.h ruby-runner.$(OBJEXT): {$(VPATH)}ruby-runner.c ruby-runner.$(OBJEXT): {$(VPATH)}ruby-runner.h ruby.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h @@ -2672,6 +2682,7 @@ ruby.$(OBJEXT): $(CCAN_DIR)/container_of https://github.com/ruby/ruby/blob/trunk/common.mk#L2682 ruby.$(OBJEXT): $(CCAN_DIR)/list/list.h ruby.$(OBJEXT): $(CCAN_DIR)/str/str.h ruby.$(OBJEXT): $(hdrdir)/ruby/ruby.h +ruby.$(OBJEXT): $(hdrdir)/ruby/version.h ruby.$(OBJEXT): $(top_srcdir)/include/ruby.h ruby.$(OBJEXT): {$(VPATH)}config.h ruby.$(OBJEXT): {$(VPATH)}defines.h @@ -2745,6 +2756,7 @@ signal.$(OBJEXT): $(CCAN_DIR)/str/str.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2756 signal.$(OBJEXT): $(hdrdir)/ruby/ruby.h signal.$(OBJEXT): $(top_srcdir)/include/ruby.h signal.$(OBJEXT): {$(VPATH)}config.h +signal.$(OBJEXT): {$(VPATH)}debug_counter.h signal.$(OBJEXT): {$(VPATH)}defines.h signal.$(OBJEXT): {$(VPATH)}encoding.h signal.$(OBJEXT): {$(VPATH)}eval_intern.h @@ -2972,10 +2984,18 @@ transcode.$(OBJEXT): {$(VPATH)}transcode https://github.com/ruby/ruby/blob/trunk/common.mk#L2984 transcode.$(OBJEXT): {$(VPATH)}transcode_data.h transient_heap.$(OBJEXT): $(hdrdir)/ruby/ruby.h transient_heap.$(OBJEXT): $(top_srcdir)/include/ruby.h +transient_heap.$(OBJEXT): {$(VPATH)}config.h +transient_heap.$(OBJEXT): {$(VPATH)}debug.h transient_heap.$(OBJEXT): {$(VPATH)}debug_counter.h +transient_heap.$(OBJEXT): {$(VPATH)}defines.h transient_heap.$(OBJEXT): {$(VPATH)}gc.h +transient_heap.$(OBJEXT): {$(VPATH)}intern.h transient_heap.$(OBJEXT): {$(VPATH)}internal.h +transient_heap.$(OBJEXT): {$(VPATH)}missing.h +transient_heap.$(OBJEXT): {$(VPATH)}node.h transient_heap.$(OBJEXT): {$(VPATH)}ruby_assert.h +transient_heap.$(OBJEXT): {$(VPATH)}st.h +transient_heap.$(OBJEXT): {$(VPATH)}subst.h transient_heap.$(OBJEXT): {$(VPATH)}transient_heap.c transient_heap.$(OBJEXT): {$(VPATH)}transient_heap.h transient_heap.$(OBJEXT): {$(VPATH)}vm_debug.h Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 66168) +++ win32/Makefile.sub (revision 66169) @@ -290,13 +290,18 @@ MISSING = $(MISSING) explicit_bzero.obj https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L290 !endif DLNOBJ = dln.obj !if "$(ARCH)" == "x64" -COROUTINE_H = coroutine/Win64/Context.h +COROUTINE_OBJ = coroutine/Win64/Context.obj !elseif "$(ARCH)" == "i386" +COROUTINE_OBJ = coroutine/Win32/Context.obj +!else +COROUTINE_OBJ = +!endif +!if "$(COROUTINE_OBJ)" == "" +# get rid of empty value not to leave VPATH only in dependencies COROUTINE_H = coroutine/Win32/Context.h !else -COROUTINE_H = +COROUTINE_H = $(COROUTINE_OBJ:.obj=.h) !endif -COROUTINE_OBJ = $(COROUTINE_H:.h=.obj) ARFLAGS = -machine:$(MACHINE) -out: LD = $(CC) @@ -865,7 +870,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/ https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L870 !if "$(MACHINE)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64" #define STACK_GROW_DIRECTION -1 !endif -!if defined(COROUTINE_H) +!if "$(COROUTINE_OBJ)" != "" #define FIBER_USE_COROUTINE "$(COROUTINE_H)" !endif #define DEFAULT_KCODE KCODE_NONE @@ -1410,7 +1415,3 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1415 @echo.>> $@ @echo #endif /* RUBY_MJIT_CONFIG_H */>> $@ @$(Q:@=: :) type $@ - -!if defined(COROUTINE_H) -cont.$(OBJEXT): {$(VPATH)}$(COROUTINE_H) -!endif Index: tool/update-deps =================================================================== --- tool/update-deps (revision 66168) +++ tool/update-deps (revision 66169) @@ -176,7 +176,7 @@ def in_makefile(target, source) https://github.com/ruby/ruby/blob/trunk/tool/update-deps#L176 target = target.to_s source = source.to_s case target - when %r{\A[^/]*\z} + when %r{\A[^/]*\z}, %r{\Acoroutine/} target2 = "#{target.sub(/\.o\z/, '.$(OBJEXT)')}" case source when *FILES_IN_SOURCE_DIRECTORY then source2 = "$(top_srcdir)/#{source}" @@ -193,6 +193,7 @@ def in_makefile(target, source) https://github.com/ruby/ruby/blob/trunk/tool/update-deps#L193 when %r{\Amissing/} then source2 = "{$(VPATH)}#{$'}" when %r{\Accan/} then source2 = "$(CCAN_DIR)/#{$'}" when %r{\Adefs/} then source2 = "{$(VPATH)}#{source}" + when %r{\Acoroutine/} then source2 = "{$(VPATH)}$(COROUTINE_H)" else source2 = "$(top_srcdir)/#{source}" end ["common.mk", target2, source2] @@ -368,6 +369,7 @@ def read_cc_deps(cwd) https://github.com/ruby/ruby/blob/trunk/tool/update-deps#L369 Pathname.glob('**/*.o').sort.each {|fn_o| fn_i = fn_o.sub_ext('.i') if !fn_i.exist? + next if fn_o.sub_ext('.S').exist? warn "warning: not found: #{fn_i}" $i_not_found = true next -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/