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 * Makefile.in (incs): probes.h is a platform dependent file, so it
cannot be a part of prereq target. move it to all-incs. cannot be a part of prereq target. move it to all-incs.

View File

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

View File

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