ruby-changes:37408
From: nobu <ko1@a...>
Date: Wed, 4 Feb 2015 11:12:54 +0900 (JST)
Subject: [ruby-changes:37408] nobu:r49489 (trunk): Makefile.in: do not rebuild unnecessarily
nobu 2015-02-04 11:12:45 +0900 (Wed, 04 Feb 2015) New Revision: 49489 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49489 Log: Makefile.in: do not rebuild unnecessarily * Makefile.in (probes.stamp): rebuild dtrace dependent objects only when `dtrace -G` modifies its input files. Modified files: trunk/ChangeLog trunk/Makefile.in trunk/common.mk trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 49488) +++ configure.in (revision 49489) @@ -3596,6 +3596,7 @@ if test "${enable_dtrace}" = "auto"; the https://github.com/ruby/ruby/blob/trunk/configure.in#L3596 fi LIBRUBY_A_OBJS='$(OBJS)' +DTRACE_REBUILD= if test "${enable_dtrace}" = "yes"; then if test -z "$DTRACE"; then AC_MSG_ERROR([dtrace(1) is missing]) @@ -3612,7 +3613,7 @@ if test "${enable_dtrace}" = "yes"; then https://github.com/ruby/ruby/blob/trunk/configure.in#L3613 DTRACE_OBJ='probes.$(OBJEXT)' fi if test "$rb_cv_prog_dtrace_g" = 'rebuild'; then - DTRACE_GLOMMED_OBJ='ruby-glommed.$(OBJEXT)' + DTRACE_REBUILD=yes LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)' fi AS_CASE("${target_os}", [freebsd*], [ @@ -3626,7 +3627,7 @@ else https://github.com/ruby/ruby/blob/trunk/configure.in#L3627 fi AC_SUBST(DTRACE_EXT) AC_SUBST(DTRACE_OBJ) -AC_SUBST(DTRACE_GLOMMED_OBJ) +AC_SUBST(DTRACE_REBUILD) AC_SUBST(LIBRUBY_A_OBJS) RUBY_SETJMP_TYPE Index: ChangeLog =================================================================== --- ChangeLog (revision 49488) +++ ChangeLog (revision 49489) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Feb 4 11:12:43 2015 Nobuyoshi Nakada <nobu@r...> + + * Makefile.in (probes.stamp): rebuild dtrace dependent objects + only when `dtrace -G` modifies its input files. + Tue Feb 3 19:27:16 2015 Naohisa Goto <ngotogenome@g...> * common.mk (ruby-glommed.o): dependency on $(OBJ) should be written Index: common.mk =================================================================== --- common.mk (revision 49488) +++ common.mk (revision 49489) @@ -8,7 +8,8 @@ dll: $(LIBRUBY_SO) https://github.com/ruby/ruby/blob/trunk/common.mk#L8 V = 0 Q1 = $(V:1=) Q = $(Q1:0=@) -ECHO = $(ECHO1:0=@echo) +ECHO0 = $(ECHO1:0=echo) +ECHO = @$(ECHO0) UNICODE_VERSION = 7.0.0 Index: Makefile.in =================================================================== --- Makefile.in (revision 49488) +++ Makefile.in (revision 49489) @@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L1 SHELL = /bin/sh NULLCMD = @NULLCMD@ n=$(NULLCMD) -ECHO1 = $(V:1=@$n) +ECHO1 = $(V:1=$n) RUNCMD = $(SHELL) CDPATH = . CHDIR = @CHDIR@ @@ -130,6 +130,7 @@ LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L130 LIBRUBY_RELATIVE = @LIBRUBY_RELATIVE@ LIBRUBY_A_OBJS = @LIBRUBY_A_OBJS@ +DTRACE_REBUILD_OBJS = $(DTRACE_REBUILD:yes=$(DTRACE_DEPENDENT_OBJS)) DTRACE_DEPENDENT_OBJS = array.$(OBJEXT) \ eval.$(OBJEXT) \ @@ -173,7 +174,8 @@ VCSUP = @VCSUP@ https://github.com/ruby/ruby/blob/trunk/Makefile.in#L174 DTRACE = @DTRACE@ DTRACE_EXT = @DTRACE_EXT@ DTRACE_OBJ = @DTRACE_OBJ@ -DTRACE_GLOMMED_OBJ = @DTRACE_GLOMMED_OBJ@ +DTRACE_REBUILD= @DTRACE_REBUILD@ +DTRACE_GLOMMED_OBJ = $(DTRACE_REBUILD:yes=ruby-glommed.$(OBJEXT)) OBJEXT = @OBJEXT@ ASMEXT = S @@ -382,19 +384,18 @@ enc/jis/props.h: enc/jis/props.kwd https://github.com/ruby/ruby/blob/trunk/Makefile.in#L384 @$(ECHO) copying dummy $(DEST_FILE) $(Q) $(CP) $(OS_SRC_FILE) $(OS_DEST_FILE) -probes.@OBJEXT@: $(srcdir)/probes.d $(DTRACE_DEPENDENT_OBJS) +probes.stamp: $(DTRACE_REBUILD_OBJS) + $(Q) if test -f $@ -o -f probes.$(OBJEXT); then \ + $(RM) $(DTRACE_REBUILD_OBJS) $@; \ + $(ECHO0) "rebuilding objects which were modified by \"dtrace -G\""; \ + $(MAKE) $(DTRACE_REBUILD_OBJS); \ + fi + $(Q) touch $@ + +probes.@OBJEXT@: $(srcdir)/probes.d probes.stamp @$(ECHO) processing probes in object files - $(Q) stamp="$*.stamp"; \ - if test -f "$$stamp" -o -f "$@"; then \ - $(RM) $(DTRACE_DEPENDENT_OBJS) "$$stamp"; \ - for o in $(DTRACE_DEPENDENT_OBJS); do \ - echo "rebuilding $$o which was modified by \"dtrace -G\""; \ - $(MAKE) "$$o"; \ - done; \ - fi; \ - touch "$$stamp" - $(RM) $@ - $(Q) $(DTRACE) -G -C $(INCFLAGS) -s $(srcdir)/probes.d -o $@ $(DTRACE_DEPENDENT_OBJS) + $(Q) $(RM) $@ + $(Q) $(DTRACE) -G -C $(INCFLAGS) -s $(srcdir)/probes.d -o $@ $(DTRACE_REBUILD_OBJS) # DTrace static library hacks described here: # http://mail.opensolaris.org/pipermail/dtrace-discuss/2005-August/000207.html -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/