summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-06 05:03:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-06 05:03:14 +0000
commit78b9d778de32da62958844907b556ec63140b4e7 (patch)
tree07117b31acf83609d465a85e8cf5facd964885b6
parent9df94321815bad7f997a2ccfaf81395fb9ec51be (diff)
probes.dmyh: remove preprocessor directives
* tool/gen_dummy_probes.rb: remove include and conditional directives from probes.dmyh which are removed by preprocessing. * common.mk: remove unnecessary dependencies on vm_opts.h via probes.dmyh. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--common.mk6
-rw-r--r--ext/ripper/depend1
-rwxr-xr-xtool/gen_dummy_probes.rb4
3 files changed, 2 insertions, 9 deletions
diff --git a/common.mk b/common.mk
index a79dc03b3de..f4d44574134 100644
--- a/common.mk
+++ b/common.mk
@@ -1182,7 +1182,6 @@ array.$(OBJEXT): {$(VPATH)}ruby_assert.h
array.$(OBJEXT): {$(VPATH)}st.h
array.$(OBJEXT): {$(VPATH)}subst.h
array.$(OBJEXT): {$(VPATH)}util.h
-array.$(OBJEXT): {$(VPATH)}vm_opts.h
bignum.$(OBJEXT): $(hdrdir)/ruby/ruby.h
bignum.$(OBJEXT): $(top_srcdir)/include/ruby.h
bignum.$(OBJEXT): {$(VPATH)}bignum.c
@@ -1657,7 +1656,6 @@ hash.$(OBJEXT): {$(VPATH)}st.h
hash.$(OBJEXT): {$(VPATH)}subst.h
hash.$(OBJEXT): {$(VPATH)}symbol.h
hash.$(OBJEXT): {$(VPATH)}util.h
-hash.$(OBJEXT): {$(VPATH)}vm_opts.h
inits.$(OBJEXT): $(hdrdir)/ruby/ruby.h
inits.$(OBJEXT): $(top_srcdir)/include/ruby.h
inits.$(OBJEXT): {$(VPATH)}config.h
@@ -1896,7 +1894,6 @@ object.$(OBJEXT): {$(VPATH)}probes.h
object.$(OBJEXT): {$(VPATH)}st.h
object.$(OBJEXT): {$(VPATH)}subst.h
object.$(OBJEXT): {$(VPATH)}util.h
-object.$(OBJEXT): {$(VPATH)}vm_opts.h
pack.$(OBJEXT): $(hdrdir)/ruby/ruby.h
pack.$(OBJEXT): $(top_srcdir)/include/ruby.h
pack.$(OBJEXT): {$(VPATH)}config.h
@@ -1935,7 +1932,6 @@ parse.$(OBJEXT): {$(VPATH)}st.h
parse.$(OBJEXT): {$(VPATH)}subst.h
parse.$(OBJEXT): {$(VPATH)}symbol.h
parse.$(OBJEXT): {$(VPATH)}util.h
-parse.$(OBJEXT): {$(VPATH)}vm_opts.h
prelude.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
prelude.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
prelude.$(OBJEXT): $(CCAN_DIR)/list/list.h
@@ -2323,7 +2319,6 @@ string.$(OBJEXT): {$(VPATH)}ruby_assert.h
string.$(OBJEXT): {$(VPATH)}st.h
string.$(OBJEXT): {$(VPATH)}string.c
string.$(OBJEXT): {$(VPATH)}subst.h
-string.$(OBJEXT): {$(VPATH)}vm_opts.h
strlcat.$(OBJEXT): {$(VPATH)}config.h
strlcat.$(OBJEXT): {$(VPATH)}missing.h
strlcat.$(OBJEXT): {$(VPATH)}strlcat.c
@@ -2379,7 +2374,6 @@ symbol.$(OBJEXT): {$(VPATH)}st.h
symbol.$(OBJEXT): {$(VPATH)}subst.h
symbol.$(OBJEXT): {$(VPATH)}symbol.c
symbol.$(OBJEXT): {$(VPATH)}symbol.h
-symbol.$(OBJEXT): {$(VPATH)}vm_opts.h
thread.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
thread.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
thread.$(OBJEXT): $(CCAN_DIR)/list/list.h
diff --git a/ext/ripper/depend b/ext/ripper/depend
index f85d887a715..7ea823c4275 100644
--- a/ext/ripper/depend
+++ b/ext/ripper/depend
@@ -66,7 +66,6 @@ ripper.o: $(top_srcdir)/internal.h
ripper.o: $(top_srcdir)/node.h
ripper.o: $(top_srcdir)/regenc.h
ripper.o: $(top_srcdir)/symbol.h
-ripper.o: $(top_srcdir)/vm_opts.h
ripper.o: ../../probes.h
ripper.o: eventids2.c
ripper.o: ripper.y
diff --git a/tool/gen_dummy_probes.rb b/tool/gen_dummy_probes.rb
index 7d63cdfa3e2..45222830f34 100755
--- a/tool/gen_dummy_probes.rb
+++ b/tool/gen_dummy_probes.rb
@@ -9,8 +9,8 @@ text = ARGF.read
# remove comments
text.gsub!(%r'(?:^ *)?/\*.*?\*/\n?'m, '')
-# remove the pragma declarations
-text.gsub!(/^#pragma.*\n/, '')
+# remove the pragma declarations and ifdefs
+text.gsub!(/^#(?:pragma|include|if|endif).*\n/, '')
# replace the provider section with the start of the header file
text.gsub!(/provider ruby \{/, "#ifndef\t_PROBES_H\n#define\t_PROBES_H\n#define DTRACE_PROBES_DISABLED 1\n")