From 6e11415b9c3b2e36e91a5979249093426e3c6ad1 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Fri, 19 Oct 2018 12:31:02 +0000 Subject: [PATCH] configure.ac: add --disable-install-mjit-header and substitute INSTALL_MJIT_HEADER. This would be convenient as a workaround for user if we found a platform that can't compile Ruby after Ruby 2.6.0 release. common.mk: Install MJIT header only when INSTALL_MJIT_HEADER Makefile.in: ditto win32/Makefile.sub: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- Makefile.in | 5 +++-- common.mk | 5 +++-- configure.ac | 6 ++++++ win32/Makefile.sub | 7 +++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index c3dcb369e7..393c2e5d20 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 43433574e6..c3d7aac162 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 50247ca545..7af738d96b 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 9a9e2b4724..f046d0bfcd 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" <