Skip to content

Commit

Permalink
cold: fail if patch or bunzip2 missing
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbou committed Oct 22, 2019
1 parent 291cb50 commit 0038dcc
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ compiler:
env MAKE=$(MAKE) ./shell/bootstrap-ocaml.sh $(OCAML_PORT)

cold: compiler
env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" ./configure $(CONFIGURE_ARGS)
env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" ./configure --enable-cold-check $(CONFIGURE_ARGS)
env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" $(MAKE) lib-ext
env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" $(MAKE)

Expand Down
17 changes: 17 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ enable_checks
enable_developer_mode
with_mccs
with_private_runtime
enable_cold_check
enable_certificate_check
'
ac_precious_vars='build_alias
Expand Down Expand Up @@ -1340,6 +1341,7 @@ Optional Features:
--enable-developer-mode Enable developer features
--enable-cold-check Fail on some check necessary for make cold
--disable-certificate-check
Do not check the certificate of opam's dependency
archives
Expand Down Expand Up @@ -3169,6 +3171,12 @@ else
fi
# Check whether --enable-cold_check was given.
if test "${enable_cold_check+set}" = set; then :
enableval=$enable_cold_check; COLD_CHECK=yes
fi
if test "x" != "x$LIB_PREFIX"; then :
CPATH=$CPATH:$LIB_PREFIX/include
Expand Down Expand Up @@ -4817,6 +4825,15 @@ else
fi
if test "x${COLD_CHECK}" = "xyes" ; then
if test "x$PATCH" = "x" ; then
as_fn_error $? "You must have patch installed." "$LINENO" 5
fi
if test "x$BUNZIP2" = "x" ; then
as_fn_error $? "You must have bunzip2 installed." "$LINENO" 5
fi
fi
if test "${OCAML_OS_TYPE}" = "Win32"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a workable solution for ln -s" >&5
Expand Down
14 changes: 14 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ AC_ARG_WITH([private_runtime],
[For a mingw-w64 build, manifest the runtime DLLs locally in Opam.Runtime.arch]),,[with_private_runtime=no]
)

AC_ARG_ENABLE([cold_check],
AC_HELP_STRING([--enable-cold-check],
[Fail on some check necessary for make cold]),[COLD_CHECK=yes],[]
)

AS_IF([test "x" != "x$LIB_PREFIX"], [
CPATH=$CPATH:$LIB_PREFIX/include
LIBRARY_PATH=$LIBRARY_PATH:$LIB_PREFIX/lib
Expand Down Expand Up @@ -219,6 +224,15 @@ AC_CHECK_TOOL(CPPO,cppo)
AC_CHECK_TOOL(PATCH,patch)
AC_CHECK_TOOL(BUNZIP2,bunzip2)

if test "x${COLD_CHECK}" = "xyes" ; then
if test "x$PATCH" = "x" ; then
AC_MSG_ERROR([You must have patch installed.])
fi
if test "x$BUNZIP2" = "x" ; then
AC_MSG_ERROR([You must have bunzip2 installed.])
fi
fi

AS_IF([test "${OCAML_OS_TYPE}" = "Win32"],[
AC_MSG_CHECKING([for a workable solution for ln -s])
ln -s configure conftestLink
Expand Down

0 comments on commit 0038dcc

Please sign in to comment.