[前][次][番号順一覧][スレッド一覧]

ruby-changes:25627

From: nobu <ko1@a...>
Date: Sat, 17 Nov 2012 00:22:49 +0900 (JST)
Subject: [ruby-changes:25627] nobu:r37684 (trunk): probes.h: select by suffix rules

nobu	2012-11-17 00:22:37 +0900 (Sat, 17 Nov 2012)

  New Revision: 37684

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37684

  Log:
    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.

  Modified files:
    trunk/.gitignore
    trunk/ChangeLog
    trunk/Makefile.in
    trunk/common.mk
    trunk/configure.in
    trunk/win32/Makefile.sub

Index: configure.in
===================================================================
--- configure.in	(revision 37683)
+++ configure.in	(revision 37684)
@@ -396,11 +396,11 @@
 [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
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37683)
+++ ChangeLog	(revision 37684)
@@ -1,3 +1,8 @@
+Sat Nov 17 00:22:32 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@a...>
 
 	* thread.c (rb_thread_call_without_gvl2): change the parameter of
Index: common.mk
===================================================================
--- common.mk	(revision 37683)
+++ common.mk	(revision 37684)
@@ -2,7 +2,7 @@
 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 @@
 
 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 @@
 	$(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
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 37683)
+++ win32/Makefile.sub	(revision 37684)
@@ -291,6 +291,8 @@
 DEFAULT_PRELUDES = $(YES_GEM_PRELUDE)
 !endif
 
+DTRACE_EXT = dmyh
+
 !if !defined(STACK)
 !if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
 STACK = 0x400000
@@ -331,6 +333,9 @@
 MKMAIN_CMD    = mkmain.bat
 
 SRC_FILE = $(<:\=/)
+OS_SRC_FILE = $(<:/=\)
+DEST_FILE = $(@:\=/)
+OS_DEST_FILE = $(@:/=\)
 
 !if !defined(WINMAINOBJ)
 WINMAINOBJ    = winmain.$(OBJEXT)
@@ -1048,10 +1053,6 @@
 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 $@
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 37683)
+++ Makefile.in	(revision 37684)
@@ -148,7 +148,7 @@
 VCS           = @VCS@
 VCSUP         = @VCSUP@
 DTRACE        = @DTRACE@
-DTRACE_AVAILABLE = @DTRACE_AVAILABLE@
+DTRACE_EXT    = @DTRACE_EXT@
 
 OBJEXT        = @OBJEXT@
 ASMEXT        = S
@@ -164,6 +164,9 @@
 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,18 +326,14 @@
 	@$(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
+.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
 
-no-dtrace-probes.h: $(srcdir)/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 \
 		enc/encinit.c enc/encinit.$(OBJEXT)
Index: .gitignore
===================================================================
--- .gitignore	(revision 37683)
+++ .gitignore	(revision 37684)
@@ -2,6 +2,7 @@
 *.a
 *.bak
 *.dSYM
+*.dmyh
 *.dylib
 *.inc
 *.log
@@ -49,7 +50,6 @@
 /config.status
 /config.status.lineno
 /configure
-/dmyprobes.h
 /doc/capi
 /enc.mk
 /encdb.h

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]