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
This commit is contained in:
k0kubun 2018-10-19 12:31:02 +00:00
Родитель 5a8b81fdd3
Коммит 6e11415b9c
4 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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"}

Просмотреть файл

@ -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