summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in2
-rw-r--r--common.mk1
-rw-r--r--configure.ac4
-rw-r--r--template/verconf.h.tmpl2
-rw-r--r--win32/Makefile.sub1
5 files changed, 8 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 62d24e5..d9cf3be 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -45,6 +45,7 @@ sitearch = @sitearch@
sitedir = @sitedir@
archlibdir = @archlibdir@
ruby_version = @ruby_version@
+RUBY_VERSION_NAME = @RUBY_VERSION_NAME@
TESTUI = console
TESTS =
@@ -73,6 +74,7 @@ CPPFLAGS = @CPPFLAGS@ $(INCFLAGS)
MJIT_HEADER_FLAGS = @MJIT_HEADER_FLAGS@
MJIT_HEADER_SUFFIX =
MJIT_HEADER_ARCH =
+MJIT_HEADER_INSTALL_DIR = @MJIT_HEADER_INSTALL_DIR@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLDFLAGS = @EXTLDFLAGS@
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
diff --git a/common.mk b/common.mk
index 837825d..cf9401b 100644
--- a/common.mk
+++ b/common.mk
@@ -64,7 +64,6 @@ MJIT_MIN_HEADER = $(MJIT_HEADER_BUILD_DIR)/rb_mjit_min_header-$(RUBY_PROGRAM_VER
MJIT_CPPFLAGS = -DMJIT_HEADER_INSTALL_DIR=\""$(MJIT_HEADER_INSTALL_DIR)"\" \
-DLIBRUBYARG_SHARED=\""$(LIBRUBYARG_SHARED)"\"
MJIT_HEADER_BUILD_DIR = $(EXTOUT)/include/$(arch)
-MJIT_HEADER_INSTALL_DIR = include/$(RUBY_BASE_NAME)-$(ruby_version)/$(arch)
INITOBJS = dmyext.$(OBJEXT) dmyenc.$(OBJEXT)
NORMALMAINOBJ = main.$(OBJEXT)
diff --git a/configure.ac b/configure.ac
index 02b3345..800e44a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2478,6 +2478,7 @@ LIBEXT=a
AC_SUBST(DLDFLAGS)dnl
AC_SUBST(ARCH_FLAG)dnl
AC_SUBST(MJIT_HEADER_FLAGS)dnl
+AC_SUBST(MJIT_HEADER_INSTALL_DIR)dnl
AC_SUBST(STATIC)dnl
AC_SUBST(CCDLFLAGS)dnl
@@ -2966,6 +2967,9 @@ AC_ARG_ENABLE(multiarch,
[multiarch=], [unset multiarch])
AS_IF([test ${multiarch+set}], [
AC_DEFINE(ENABLE_MULTIARCH)
+ MJIT_HEADER_INSTALL_DIR=include/'${arch}/${RUBY_VERSION_NAME}'
+], [
+ MJIT_HEADER_INSTALL_DIR=include/'${RUBY_VERSION_NAME}/${arch}'
])
archlibdir='${libdir}/${arch}'
diff --git a/template/verconf.h.tmpl b/template/verconf.h.tmpl
index 3b8a8aa..9ba2bd6 100644
--- a/template/verconf.h.tmpl
+++ b/template/verconf.h.tmpl
@@ -4,7 +4,7 @@
% C = rbconfig::MAKEFILE_CONFIG.dup
% def C.[](name) str = super and (str unless str.empty?); end
#define RUBY_BASE_NAME "${RUBY_BASE_NAME}"
-#define RUBY_VERSION_NAME RUBY_BASE_NAME"-"RUBY_LIB_VERSION
+#define RUBY_VERSION_NAME "${RUBY_VERSION_NAME}"
% if C["RUBY_LIB_VERSION_STYLE"]
#define RUBY_LIB_VERSION_STYLE ${RUBY_LIB_VERSION_STYLE}
% elsif !C["RUBY_LIB_VERSION"]
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 4e143af..d82007f 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -289,6 +289,7 @@ CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
MJIT_HEADER_FLAGS = -P
MJIT_HEADER_SUFFIX =
MJIT_HEADER_ARCH =
+MJIT_HEADER_INSTALL_DIR = include/$(RUBY_VERSION_NAME)/$(arch)
DLDFLAGS = $(LDFLAGS) -dll
SOLIBS =