summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-24 13:46:00 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-24 13:46:00 +0900
commit6ab3664635aae9c35c207fb570e14740d8383444 (patch)
tree629e5b1d4b88ae4c55070290e04a4b6546345a7f
parent448c76be63f8712d29161701575a51823565bc2b (diff)
Moved MJIT_WITHOUT_TABS default to configure.ac
And then the environment variable.
-rw-r--r--common.mk3
-rw-r--r--configure.ac4
-rw-r--r--template/Makefile.in1
3 files changed, 5 insertions, 3 deletions
diff --git a/common.mk b/common.mk
index 5d3e43b..8c50172 100644
--- a/common.mk
+++ b/common.mk
@@ -221,9 +221,6 @@ mjit_config.h: Makefile
# These rules using MJIT_HEADER_SUFFIX must be in common.mk, not
# Makefile.in, in order to override the macro in defs/universal.mk.
-# Pass MJIT_WITHOUT_TABS=false to disable tool/run_without_tabs.rb
-MJIT_WITHOUT_TABS=true
-
# 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) \
diff --git a/configure.ac b/configure.ac
index 83c8519..6b57ea5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2615,6 +2615,10 @@ 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
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 50ea282..831e3c6 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -102,6 +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@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLDFLAGS = @EXTLDFLAGS@
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)