summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-03-23 22:31:38 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2020-03-23 22:33:01 -0700
commit5b3157a51177b56fd79d4f4e3cb08e0a6459944f (patch)
treed8161051c4e3d4e8a698cb7e400cd62194280d80
parent6ab3664635aae9c35c207fb570e14740d8383444 (diff)
Make file names and variable names consistent
-rw-r--r--common.mk4
-rw-r--r--configure.ac6
-rw-r--r--template/Makefile.in2
-rw-r--r--tool/mjit_tabs.rb (renamed from tool/mjit_without_tabs.rb)8
4 files changed, 10 insertions, 10 deletions
diff --git a/common.mk b/common.mk
index 8c501725f5..d05a2df109 100644
--- a/common.mk
+++ b/common.mk
@@ -224,9 +224,9 @@ mjit_config.h: Makefile
# Other `-Dxxx`s preceding `-DMJIT_HEADER` will be removed in transform_mjit_header.rb.
# So `-DMJIT_HEADER` should be passed first when rb_mjit_header.h is generated.
$(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJEXT) \
- $(TIMESTAMPDIR)/$(arch)/.time $(srcdir)/tool/mjit_without_tabs.rb
+ $(TIMESTAMPDIR)/$(arch)/.time $(srcdir)/tool/mjit_tabs.rb
$(ECHO) building $(@F:.time=.h)
- $(Q) $(BASERUBY) $(srcdir)/tool/mjit_without_tabs.rb "$(MJIT_WITHOUT_TABS)" \
+ $(Q) $(BASERUBY) $(srcdir)/tool/mjit_tabs.rb "$(MJIT_TABS)" \
$(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new
$(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.h) $(@F:.time=.h).new
diff --git a/configure.ac b/configure.ac
index 6b57ea58ef..5bc93800ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2616,9 +2616,9 @@ AS_CASE(["$target_os"],
LIBEXT=a
AC_ARG_WITH(mjit-tabs,
- AS_HELP_STRING([--without-tabs-mjit], [expand tabs in mjit header]),
- [AS_IF([test $withval = no], [MJIT_WITHOUT_TABS=true])])
-AC_SUBST(MJIT_WITHOUT_TABS)dnl
+ AS_HELP_STRING([--without-mjit-tabs], [expand tabs in mjit header]),
+ [AS_IF([test $withval = no], [MJIT_TABS=false])])
+AC_SUBST(MJIT_TABS)dnl
AC_SUBST(DLDFLAGS)dnl
AC_SUBST(ARCH_FLAG)dnl
AC_SUBST(MJIT_HEADER_FLAGS)dnl
diff --git a/template/Makefile.in b/template/Makefile.in
index 831e3c616c..c52783496b 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -102,7 +102,7 @@ MJIT_HEADER = rb_mjit_header.h
MJIT_MIN_HEADER_NAME = rb_mjit_min_header-$(RUBY_PROGRAM_VERSION).h
MJIT_MIN_HEADER = $(MJIT_HEADER_BUILD_DIR)/$(MJIT_MIN_HEADER_NAME)
MJIT_HEADER_BUILD_DIR = $(EXTOUT)/include/$(arch)
-MJIT_WITHOUT_TABS=@MJIT_WITHOUT_TABS@
+MJIT_TABS=@MJIT_TABS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLDFLAGS = @EXTLDFLAGS@
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
diff --git a/tool/mjit_without_tabs.rb b/tool/mjit_tabs.rb
index bc2ca773d5..8b91af2479 100644
--- a/tool/mjit_without_tabs.rb
+++ b/tool/mjit_tabs.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
# This is a script to run a command in ARGV, expanding tabs in some files
-# included by vm.c to normalize indentation of MJIT header. You can disable
-# this feature by setting MJIT_WITHOUT_TABS=false make variable.
+# included by vm.c to normalize indentation of MJIT header. You can enable
+# this feature by passing `--without-mjit-tabs` in configure.
#
# Note that preprocessor of GCC converts a hard tab to one spaces, where
# we expect it to be shown as 8 spaces. To obviate this script, we need
@@ -27,10 +27,10 @@ targets = EXPAND_TARGETS.flat_map { |t| Dir.glob(File.join(srcdir, t)) } - SKIPP
sources = {}
mtimes = {}
-flag, *command = ARGV
+mjit_tabs, *command = ARGV
targets.each do |target|
- next if flag != 'true'
+ next if mjit_tabs != 'false'
unless File.writable?(target)
puts "tool/mjit_without_tabs.rb: Skipping #{target.dump} as it's not writable."
next