Skip to content

Commit

Permalink
Merge pull request ocaml#9250 from dra27/disable-ocamltest
Browse files Browse the repository at this point in the history
Add --disable-ocamltest to configure
  • Loading branch information
dra27 authored Feb 14, 2020
2 parents 9b36ee9 + fd6c0e3 commit 648d7a4
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ Working version

### Build system:

- #9250: Add --disable-ocamltest to configure and disable building for
non-development builds.
(David Allsopp, review by Sébastien Hinderer)

### Bug fixes:

- #7683, #1499: Fixes one case where the evaluation order in native-code
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ DEPFLAGS=-slash
DEPINCLUDES=$(INCLUDES)

OCAMLDOC_OPT=$(WITH_OCAMLDOC:=.opt)
OCAMLTEST_OPT=$(WITH_OCAMLTEST:=.opt)

BYTESTART=driver/main.cmo

Expand Down Expand Up @@ -210,11 +211,12 @@ opt.opt: checknative
$(MAKE) ocaml
$(MAKE) opt-core
$(MAKE) ocamlc.opt
$(MAKE) otherlibraries $(WITH_DEBUGGER) $(WITH_OCAMLDOC) ocamltest
$(MAKE) otherlibraries $(WITH_DEBUGGER) $(WITH_OCAMLDOC) \
$(WITH_OCAMLTEST)
$(MAKE) ocamlopt.opt
$(MAKE) otherlibrariesopt
$(MAKE) ocamllex.opt ocamltoolsopt ocamltoolsopt.opt $(OCAMLDOC_OPT) \
ocamltest.opt
$(OCAMLTEST_OPT)
ifneq "$(WITH_OCAMLDOC)" ""
$(MAKE) manpages
endif
Expand Down Expand Up @@ -244,7 +246,8 @@ coreboot:
.PHONY: all
all: coreall
$(MAKE) ocaml
$(MAKE) otherlibraries $(WITH_DEBUGGER) $(WITH_OCAMLDOC) ocamltest
$(MAKE) otherlibraries $(WITH_DEBUGGER) $(WITH_OCAMLDOC) \
$(WITH_OCAMLTEST)
ifneq "$(WITH_OCAMLDOC)" ""
$(MAKE) manpages
endif
Expand Down
1 change: 1 addition & 0 deletions Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ RUNTIMEI=@instrumented_runtime@
WITH_DEBUGGER=@with_debugger@
WITH_CAMLTEX=@with_camltex@
WITH_OCAMLDOC=@ocamldoc@
WITH_OCAMLTEST=@ocamltest@
ASM_CFI_SUPPORTED=@asm_cfi_supported@
WITH_FRAME_POINTERS=@frame_pointers@
WITH_SPACETIME=@spacetime@
Expand Down
17 changes: 17 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ bfd_cppflags
x_libraries
x_includes
pthread_link
ocamltest
ocamldoc
with_camltex
with_debugger
Expand Down Expand Up @@ -894,6 +895,7 @@ enable_str_lib
enable_unix_lib
enable_bigarray_lib
enable_ocamldoc
enable_ocamltest
enable_frame_pointers
enable_naked_pointers
enable_spacetime
Expand Down Expand Up @@ -1564,6 +1566,7 @@ Optional Features:
--disable-unix-lib do not build the unix library
--disable-bigarray-lib do not build the legacy separate bigarray library
--disable-ocamldoc do not build the ocamldoc documentation system
--disable-ocamltest do not build the ocamltest driver
--enable-frame-pointers use frame pointers in runtime and generated code
--disable-naked-pointers
do not allow naked pointers
Expand Down Expand Up @@ -2892,6 +2895,7 @@ VERSION=4.11.0+dev0-2019-10-18






## Generated files
Expand Down Expand Up @@ -3137,6 +3141,12 @@ else
fi


# Check whether --enable-ocamltest was given.
if test "${enable_ocamltest+set}" = set; then :
enableval=$enable_ocamltest;
fi


# Check whether --enable-frame-pointers was given.
if test "${enable_frame_pointers+set}" = set; then :
enableval=$enable_frame_pointers;
Expand Down Expand Up @@ -16736,6 +16746,13 @@ else
ocamldoc=ocamldoc
fi

case $enable_ocamltest,4.11.0+dev0-2019-10-18 in #(
yes,*|,*+dev*) :
ocamltest='ocamltest' ;; #(
*) :
ocamltest='' ;;
esac

if test x"$enable_flambda" = "xyes"; then :
flambda=true
if test x"$enable_flambda_invariants" = "xyes"; then :
Expand Down
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ AC_SUBST([as_has_debug_prefix_map])
AC_SUBST([with_debugger]) # TODO: rename this variable
AC_SUBST([with_camltex])
AC_SUBST([ocamldoc])
AC_SUBST([ocamltest])
AC_SUBST([pthread_link])
AC_SUBST([x_includes])
AC_SUBST([x_libraries])
Expand Down Expand Up @@ -276,6 +277,10 @@ AC_ARG_ENABLE([ocamldoc],
[],
[ocamldoc=auto])

AC_ARG_ENABLE([ocamltest],
[AS_HELP_STRING([--disable-ocamltest],
[do not build the ocamltest driver])])

AC_ARG_ENABLE([frame-pointers],
[AS_HELP_STRING([--enable-frame-pointers],
[use frame pointers in runtime and generated code])])
Expand Down Expand Up @@ -1684,6 +1689,10 @@ AS_IF([test x"$enable_ocamldoc" = "xno"],
[ocamldoc=""],
[ocamldoc=ocamldoc])

AS_CASE([$enable_ocamltest,AC_PACKAGE_VERSION],
[yes,*|,*+dev*],[ocamltest='ocamltest'],
[ocamltest=''])

AS_IF([test x"$enable_flambda" = "xyes"],
[flambda=true
AS_IF([test x"$enable_flambda_invariants" = "xyes"],
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/appveyor/appveyor_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function set_configuration {
;;
esac

./configure $build $host --prefix="$2"
./configure $build $host --prefix="$2" --enable-ocamltest

FILE=$(pwd | cygpath -f - -m)/Makefile.config
echo "Edit $FILE to turn C compiler warnings into errors"
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/inria/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ set -ex
# default values
make=make
instdir="$HOME/ocaml-tmp-install"
confoptions="${OCAML_CONFIGURE_OPTIONS}"
confoptions="--enable-ocamltest ${OCAML_CONFIGURE_OPTIONS}"
make_native=true
cleanup=false
check_make_alldepend=false
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/inria/main
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ host=''
conffile=Makefile.config
make=make
instdir="$HOME/ocaml-tmp-install"
confoptions="${OCAML_CONFIGURE_OPTIONS}"
confoptions="--enable-ocamltest ${OCAML_CONFIGURE_OPTIONS}"
make_native=true
cleanup=false
check_make_alldepend=false
Expand Down
2 changes: 2 additions & 0 deletions tools/ci/travis/travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ EOF
--disable-bigarray-lib \
--disable-ocamldoc \
--disable-native-compiler \
--enable-ocamltest \
$CONFIG_ARG"
else
configure_flags="\
--prefix=$PREFIX \
--enable-flambda-invariants \
--enable-ocamltest \
$CONFIG_ARG"
fi
case $XARCH in
Expand Down

0 comments on commit 648d7a4

Please sign in to comment.