summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in5
-rw-r--r--common.mk5
-rw-r--r--configure.ac6
-rw-r--r--win32/Makefile.sub7
4 files changed, 17 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in
index c3dcb36..393c2e5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -76,6 +76,7 @@ XCFLAGS = @XCFLAGS@ $(MATHN:yes=-DCANONICALIZATION_FOR_MATHN)
USE_RUBYGEMS = @USE_RUBYGEMS@
USE_RUBYGEMS_ = $(USE_RUBYGEMS:yes=)
CPPFLAGS = @CPPFLAGS@ $(INCFLAGS) $(USE_RUBYGEMS_:no=-DDISABLE_RUBYGEMS=1)
+INSTALL_MJIT_HEADER = @INSTALL_MJIT_HEADER@
MJIT_HEADER_FLAGS = @MJIT_HEADER_FLAGS@
MJIT_HEADER_SUFFIX =
MJIT_HEADER_ARCH =
@@ -435,8 +436,8 @@ probes.$(OBJEXT): $(srcdir)/probes.d $(DTRACE_REBUILD:yes=probes.stamp)
$(Q) $(RM) $@
$(Q) $(DTRACE) -G -C $(INCFLAGS) -s $(srcdir)/probes.d -o $@ $(DTRACE_REBUILD_OBJS)
-main: $(MJIT_MIN_HEADER)
-mjit-headers: $(MJIT_MIN_HEADER)
+main: mjit-headers
+yes-mjit-headers: $(MJIT_MIN_HEADER)
clean-local::
$(Q)$(RM) $(MJIT_HEADER) $(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX:%=*).h
$(Q)$(RM) $(MJIT_MIN_HEADER) $(MJIT_MIN_HEADER:.h=)$(MJIT_HEADER_SUFFIX:%=*).h
diff --git a/common.mk b/common.mk
index 4343357..c3d7aac 100644
--- a/common.mk
+++ b/common.mk
@@ -201,8 +201,9 @@ all: $(SHOWFLAGS) main docs
main: $(SHOWFLAGS) exts $(ENCSTATIC:static=lib)encs
@$(NULLCMD)
-.PHONY: mjit-headers
-mjit-headers: mjit_config.h
+mjit-headers: $(INSTALL_MJIT_HEADER)-mjit-headers
+no-mjit-headers: PHONY
+yes-mjit-headers: mjit_config.h PHONY
mjit.$(OBJEXT): mjit_config.h
mjit_config.h: Makefile
diff --git a/configure.ac b/configure.ac
index 50247ca..7af738d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3320,6 +3320,11 @@ AC_SUBST(CAPITARGET)
AS_CASE(["$RDOCTARGET:$CAPITARGET"],[nodoc:nodoc],[INSTALLDOC=nodoc],[INSTALLDOC=all])
AC_SUBST(INSTALLDOC)
+AC_ARG_ENABLE(install-mjit-header,
+ AS_HELP_STRING([--disable-install-mjit-header], [do not install MJIT header]),
+ [INSTALL_MJIT_HEADER=$enableval], [INSTALL_MJIT_HEADER=yes])
+AC_SUBST(INSTALL_MJIT_HEADER)
+
AC_ARG_ENABLE(install-static-library,
AS_HELP_STRING([--disable-install-static-library], [do not install static ruby library]),
[INSTALL_STATIC_LIBRARY=$enableval],
@@ -3981,6 +3986,7 @@ config_summary "debugflags" "$debugflags"
config_summary "warnflags" "$warnflags"
config_summary "strip command" "$STRIP"
config_summary "install doc" "$install_doc"
+config_summary "install MJIT header" "$INSTALL_MJIT_HEADER"
config_summary "man page type" "$MANTYPE"
config_summary "search path" "$search_path"
config_summary "static-linked-ext" ${EXTSTATIC:+"yes"}
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 9a9e2b4..f046d0b 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -302,6 +302,9 @@ CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
!if "$(USE_RUBYGEMS)" == "no"
CPPFLAGS = -DDISABLE_RUBYGEMS $(CPPFLAGS)
!endif
+!ifndef INSTALL_MJIT_HEADER
+INSTALL_MJIT_HEADER = yes
+!endif
!if "$(CPPOUTFLAG)" == ">"
MJIT_HEADER_FLAGS =
!else
@@ -1271,8 +1274,8 @@ probes.h: {$(VPATH)}probes.dmyh
#include "$(*F).dmyh"
<<KEEP
-main: $(MJIT_PRECOMPILED_HEADER)
-mjit-headers: $(MJIT_PRECOMPILED_HEADER)
+main: mjit-headers
+yes-mjit-headers: $(MJIT_PRECOMPILED_HEADER)
clean-local::
$(Q)$(RM) $(MJIT_PRECOMPILED_HEADER_NAME) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
$(Q)$(RM) $(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.time) mjit_config.h