Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit eb40d20e30a7eaf23da16e32c63101ec05d346f6 1 parent e4479a1
@nobu nobu authored
View
2  .gitignore
@@ -2,6 +2,7 @@
*.a
*.bak
*.dSYM
+*.dmyh
*.dylib
*.inc
*.log
@@ -49,7 +50,6 @@ y.tab.c
/config.status
/config.status.lineno
/configure
-/dmyprobes.h
/doc/capi
/enc.mk
/encdb.h
View
5 ChangeLog
@@ -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>
* thread.c (rb_thread_call_without_gvl2): change the parameter of
View
21 Makefile.in
@@ -148,7 +148,7 @@ OBJCOPY = @OBJCOPY@
VCS = @VCS@
VCSUP = @VCSUP@
DTRACE = @DTRACE@
-DTRACE_AVAILABLE = @DTRACE_AVAILABLE@
+DTRACE_EXT = @DTRACE_EXT@
OBJEXT = @OBJEXT@
ASMEXT = S
@@ -164,6 +164,9 @@ NEWLINE_C = newline.c
MINIPRELUDE_C = miniprelude.c
SRC_FILE = $<
+OS_SRC_FILE = $<
+DEST_FILE = $@
+OS_DEST_FILE = $@
MESSAGE_BEGIN = @for line in
MESSAGE_END = ; do echo "$$line"; done
@@ -323,17 +326,13 @@ enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
@$(ECHO) preprocessing $<
$(Q) $(CPP) $(warnflags) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -E $< > $@
-probes.h: $(DTRACE_AVAILABLE)-dtrace-probes.h
+probes.h: probes.$(DTRACE_EXT)
-yes-dtrace-probes.h:
- @$(ECHO) translating probes $(srcdir)/probes.d
- $(Q) $(DTRACE) -o probes.h.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
- $(Q) $(RM) probes.h.tmp
-
-no-dtrace-probes.h: $(srcdir)/dmyprobes.h
- @$(ECHO) copying dummy probes.h
- $(Q) $(CP) $(srcdir)/dmyprobes.h probes.h
+.d.h:
+ @$(ECHO) translating probes $<
+ $(Q) $(DTRACE) -o $@.tmp -h -s $<
+ $(Q) sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/PROBES_H/g' $@.tmp > $@
+ $(Q) $(RM) $@.tmp
clean-local::
$(Q)$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output \
View
10 common.mk
@@ -2,7 +2,7 @@ bin: $(PROGRAM) $(WPROGRAM)
lib: $(LIBRUBY)
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
@@ -460,7 +460,7 @@ distclean-platform: clean-platform
realclean:: realclean-ext realclean-local realclean-enc realclean-golf realclean-extout
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-golf: distclean-golf
realclean-capi: PHONY
@@ -887,9 +887,13 @@ golf_prelude.c: $(srcdir)/tool/compile_prelude.rb $(RBCONFIG) $(srcdir)/prelude.
$(ECHO) generating $@
$(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 > $@
+{$(srcdir)}.dmyh.h:
+ @$(ECHO) copying dummy $(DEST_FILE)
+ $(Q) $(CP) $(OS_SRC_FILE) $(OS_DEST_FILE)
+
prereq: incs srcs preludes PHONY
preludes: {$(VPATH)}miniprelude.c
View
6 configure.in
@@ -396,11 +396,11 @@ AS_CASE(["$target_os"],
[freebsd*], [DTRACE=]
)
if test -n "$DTRACE"; then
- DTRACE_AVAILABLE=yes
+ DTRACE_EXT=d
else
- DTRACE_AVAILABLE=no
+ DTRACE_EXT=dmyh
fi
-AC_SUBST(DTRACE_AVAILABLE)
+AC_SUBST(DTRACE_EXT)
RUBY_PROG_GNU_LD
RUBY_CPPOUTFILE
View
9 win32/Makefile.sub
@@ -291,6 +291,8 @@ DEFAULT_PRELUDES = $(NO_GEM_PRELUDE)
DEFAULT_PRELUDES = $(YES_GEM_PRELUDE)
!endif
+DTRACE_EXT = dmyh
+
!if !defined(STACK)
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
STACK = 0x400000
@@ -331,6 +333,9 @@ INSTALLED_LIST= .installed.list
MKMAIN_CMD = mkmain.bat
SRC_FILE = $(<:\=/)
+OS_SRC_FILE = $(<:/=\)
+DEST_FILE = $(@:\=/)
+OS_DEST_FILE = $(@:/=\)
!if !defined(WINMAINOBJ)
WINMAINOBJ = winmain.$(OBJEXT)
@@ -1048,10 +1053,6 @@ $(ruby_pc): $(RBCONFIG)
lex.c: {$(srcdir)}lex.c.blt
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
@if not exist $(@D:/=\) md $(@D:/=\)
$(ECHO) copying $@
Please sign in to comment.
Something went wrong with that request. Please try again.