mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Makefile.in: do not rebuild unnecessarily
* Makefile.in (probes.stamp): rebuild dtrace dependent objects only when `dtrace -G` modifies its input files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ba455c6de9
commit
57e60d1f10
4 changed files with 25 additions and 17 deletions
|
@ -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
|
||||
|
|
29
Makefile.in
29
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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue