summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.in29
-rw-r--r--common.mk3
-rw-r--r--configure.in5
4 files changed, 25 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index b4e85c1085..424a83d244 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Feb 4 11:12:43 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@gmail.com>
* common.mk (ruby-glommed.o): dependency on $(OBJ) should be written
diff --git a/Makefile.in b/Makefile.in
index 00ac990f4b..bb25f3e4f7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
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@
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@
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
@$(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
diff --git a/common.mk b/common.mk
index 8612338d4a..49f5ed06ad 100644
--- a/common.mk
+++ b/common.mk
@@ -8,7 +8,8 @@ dll: $(LIBRUBY_SO)
V = 0
Q1 = $(V:1=)
Q = $(Q1:0=@)
-ECHO = $(ECHO1:0=@echo)
+ECHO0 = $(ECHO1:0=echo)
+ECHO = @$(ECHO0)
UNICODE_VERSION = 7.0.0
diff --git a/configure.in b/configure.in
index 1a9a8867d4..37bc31c4df 100644
--- a/configure.in
+++ b/configure.in
@@ -3596,6 +3596,7 @@ if test "${enable_dtrace}" = "auto"; then
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
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
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