1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Makefile.in: split probes.h commands

* Makefile.in (probes.h): split build commands for dtrace-available
  and unavailable platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-11-16 08:57:17 +00:00
parent e516438581
commit df4e0dd52d
3 changed files with 21 additions and 9 deletions

View file

@ -1,4 +1,7 @@
Fri Nov 16 17:56:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
Fri Nov 16 17:57:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* Makefile.in (probes.h): split build commands for dtrace-available
and unavailable platforms.
* Makefile.in (incs): probes.h is a platform dependent file, so it
cannot be a part of prereq target. move it to all-incs.

View file

@ -148,6 +148,7 @@ OBJCOPY = @OBJCOPY@
VCS = @VCS@
VCSUP = @VCSUP@
DTRACE = @DTRACE@
DTRACE_AVAILABLE = @DTRACE_AVAILABLE@
OBJEXT = @OBJEXT@
ASMEXT = S
@ -322,15 +323,17 @@ enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
@$(ECHO) preprocessing $<
$(Q) $(CPP) $(warnflags) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -E $< > $@
probes.h: dmyprobes.h
probes.h: $(DTRACE_AVAILABLE)-dtrace-probes.h
yes-dtrace-probes.h:
@$(ECHO) translating probes $(srcdir)/probes.d
$(Q)if test -n '$(DTRACE)'; then \
$(DTRACE) -o $@.tmp -h -s $(srcdir)/probes.d; \
sed -e 's/RUBY_/RUBY_DTRACE_/g' $@.tmp | sed -e 's/PROBES_H_TMP/PROBES_H/g' >$@; \
$(RM) $@.tmp; \
else \
$(CP) $(srcdir)/dmyprobes.h probes.h; \
fi
$(Q) $(DTRACE) -o probes.h -h -s $(srcdir)/probes.d
$(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/PROBES_H/g' probes.h.tmp > probes.h
$(Q) $(RM) probes.h.tmp
no-dtrace-probes.h: dmyprobes.h
@$(ECHO) copying dummy probes.h
$(Q) $(CP) $(srcdir)/dmyprobes.h probes.h
clean-local::
$(Q)$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output \

View file

@ -395,6 +395,12 @@ fi
AS_CASE(["$target_os"],
[freebsd*], [DTRACE=]
)
if test -n "$DTRACE"; then
DTRACE_AVAILABLE=yes
else
DTRACE_AVAILABLE=no
fi
AC_SUBST(DTRACE_AVAILABLE)
RUBY_PROG_GNU_LD
RUBY_CPPOUTFILE