probes.h: select by suffix rules

* Makefile.in, common.mk, configure.in, win32/Makefile.sub (probes.h):
  select generating with dtrace or copying dummy file by suffix rules.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-11-16 15:22:37 +00:00
parent e4479a1c1b
commit eb40d20e30
6 changed files with 31 additions and 22 deletions

2
.gitignore vendored
View File

@ -2,6 +2,7 @@
*.a *.a
*.bak *.bak
*.dSYM *.dSYM
*.dmyh
*.dylib *.dylib
*.inc *.inc
*.log *.log
@ -49,7 +50,6 @@ y.tab.c
/config.status /config.status
/config.status.lineno /config.status.lineno
/configure /configure
/dmyprobes.h
/doc/capi /doc/capi
/enc.mk /enc.mk
/encdb.h /encdb.h

View File

@ -1,3 +1,8 @@
Sat Nov 17 00:22:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* Makefile.in, common.mk, configure.in, win32/Makefile.sub (probes.h):
select generating with dtrace or copying dummy file by suffix rules.
Fri Nov 16 19:24:10 2012 Koichi Sasada <ko1@atdot.net> Fri Nov 16 19:24:10 2012 Koichi Sasada <ko1@atdot.net>
* thread.c (rb_thread_call_without_gvl2): change the parameter of * thread.c (rb_thread_call_without_gvl2): change the parameter of

View File

@ -148,7 +148,7 @@ OBJCOPY = @OBJCOPY@
VCS = @VCS@ VCS = @VCS@
VCSUP = @VCSUP@ VCSUP = @VCSUP@
DTRACE = @DTRACE@ DTRACE = @DTRACE@
DTRACE_AVAILABLE = @DTRACE_AVAILABLE@ DTRACE_EXT = @DTRACE_EXT@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
ASMEXT = S ASMEXT = S
@ -164,6 +164,9 @@ NEWLINE_C = newline.c
MINIPRELUDE_C = miniprelude.c MINIPRELUDE_C = miniprelude.c
SRC_FILE = $< SRC_FILE = $<
OS_SRC_FILE = $<
DEST_FILE = $@
OS_DEST_FILE = $@
MESSAGE_BEGIN = @for line in MESSAGE_BEGIN = @for line in
MESSAGE_END = ; do echo "$$line"; done MESSAGE_END = ; do echo "$$line"; done
@ -323,17 +326,13 @@ 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: $(DTRACE_AVAILABLE)-dtrace-probes.h probes.h: probes.$(DTRACE_EXT)
yes-dtrace-probes.h: .d.h:
@$(ECHO) translating probes $(srcdir)/probes.d @$(ECHO) translating probes $<
$(Q) $(DTRACE) -o probes.h.tmp -h -s $(srcdir)/probes.d $(Q) $(DTRACE) -o $@.tmp -h -s $<
$(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/PROBES_H/g' probes.h.tmp > probes.h $(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/PROBES_H/g' $@.tmp > $@
$(Q) $(RM) probes.h.tmp $(Q) $(RM) $@.tmp
no-dtrace-probes.h: $(srcdir)/dmyprobes.h
@$(ECHO) copying dummy probes.h
$(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

@ -2,7 +2,7 @@ bin: $(PROGRAM) $(WPROGRAM)
lib: $(LIBRUBY) lib: $(LIBRUBY)
dll: $(LIBRUBY_SO) dll: $(LIBRUBY_SO)
.SUFFIXES: .inc .h .c .y .i .d .SUFFIXES: .inc .h .c .y .i .$(DTRACE_EXT)
# V=0 quiet, V=1 verbose. other values don't work. # V=0 quiet, V=1 verbose. other values don't work.
V = 0 V = 0
@ -460,7 +460,7 @@ distclean-platform: clean-platform
realclean:: realclean-ext realclean-local realclean-enc realclean-golf realclean-extout realclean:: realclean-ext realclean-local realclean-enc realclean-golf realclean-extout
realclean-local:: distclean-local realclean-local:: distclean-local
$(Q)$(RM) parse.c parse.h lex.c newline.c revision.h dmyprobes.h $(Q)$(RM) parse.c parse.h lex.c newline.c revision.h probes.dmyh
realclean-ext:: realclean-ext::
realclean-golf: distclean-golf realclean-golf: distclean-golf
realclean-capi: PHONY realclean-capi: PHONY
@ -887,9 +887,13 @@ golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(srcdir)/prelude.
$(ECHO) generating $@ $(ECHO) generating $@
$(Q) $(COMPILE_PRELUDE) $(srcdir)/golf_prelude.rb $@ $(Q) $(COMPILE_PRELUDE) $(srcdir)/golf_prelude.rb $@
$(srcdir)/dmyprobes.h: {$(srcdir)}probes.d $(srcdir)/probes.dmyh: {$(srcdir)}probes.d
$(BASERUBY) $(srcdir)/tool/gen_dummy_probes.rb $(srcdir)/probes.d > $@ $(BASERUBY) $(srcdir)/tool/gen_dummy_probes.rb $(srcdir)/probes.d > $@
{$(srcdir)}.dmyh.h:
@$(ECHO) copying dummy $(DEST_FILE)
$(Q) $(CP) $(OS_SRC_FILE) $(OS_DEST_FILE)
prereq: incs srcs preludes PHONY prereq: incs srcs preludes PHONY
preludes: {$(VPATH)}miniprelude.c preludes: {$(VPATH)}miniprelude.c

View File

@ -396,11 +396,11 @@ AS_CASE(["$target_os"],
[freebsd*], [DTRACE=] [freebsd*], [DTRACE=]
) )
if test -n "$DTRACE"; then if test -n "$DTRACE"; then
DTRACE_AVAILABLE=yes DTRACE_EXT=d
else else
DTRACE_AVAILABLE=no DTRACE_EXT=dmyh
fi fi
AC_SUBST(DTRACE_AVAILABLE) AC_SUBST(DTRACE_EXT)
RUBY_PROG_GNU_LD RUBY_PROG_GNU_LD
RUBY_CPPOUTFILE RUBY_CPPOUTFILE

View File

@ -291,6 +291,8 @@ DEFAULT_PRELUDES = $(NO_GEM_PRELUDE)
DEFAULT_PRELUDES = $(YES_GEM_PRELUDE) DEFAULT_PRELUDES = $(YES_GEM_PRELUDE)
!endif !endif
DTRACE_EXT = dmyh
!if !defined(STACK) !if !defined(STACK)
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64" !if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
STACK = 0x400000 STACK = 0x400000
@ -331,6 +333,9 @@ INSTALLED_LIST= .installed.list
MKMAIN_CMD = mkmain.bat MKMAIN_CMD = mkmain.bat
SRC_FILE = $(<:\=/) SRC_FILE = $(<:\=/)
OS_SRC_FILE = $(<:/=\)
DEST_FILE = $(@:\=/)
OS_DEST_FILE = $(@:/=\)
!if !defined(WINMAINOBJ) !if !defined(WINMAINOBJ)
WINMAINOBJ = winmain.$(OBJEXT) WINMAINOBJ = winmain.$(OBJEXT)
@ -1048,10 +1053,6 @@ $(ruby_pc): $(RBCONFIG)
lex.c: {$(srcdir)}lex.c.blt lex.c: {$(srcdir)}lex.c.blt
copy $(?:/=\) $@ copy $(?:/=\) $@
probes.h: dmyprobes.h
@$(ECHO) copying probes.h
$(Q) $(CP) $(srcdir)\dmyprobes.h probes.h
enc/unicode/name2ctype.h: {$(srcdir)}enc/unicode/name2ctype.h.blt enc/unicode/name2ctype.h: {$(srcdir)}enc/unicode/name2ctype.h.blt
@if not exist $(@D:/=\) md $(@D:/=\) @if not exist $(@D:/=\) md $(@D:/=\)
$(ECHO) copying $@ $(ECHO) copying $@