build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.

(Patch by Adrien Nader!)

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.
build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.
build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables.

This makes the variable names more coherent and is in preparation for
another patch that will allow disabling ocamldoc and ocamlbuild.

This changes the interface of the configuration somewhat but I don't
think anything outside of the ocaml tree reads the Makefile.config file
that gets installed in order to see whether the debugger and camlp4 have
been built. It also changes a .mli which might be problematic but I also
believe it is safe and we have time to see if there's a bad impact.

It also adds a configure switch to skip building ocamldebug.

While at it, it fixes a PR number in the Changes file.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Wojciech Meyer 2013-07-28 15:52:14 +00:00
parent 311057b871
commit 6549fe7019
9 changed files with 53 additions and 41 deletions

View File

@ -153,7 +153,7 @@ Bug fixes:
- PR#5910: Fix code generation bug for "mod 1" on ARM.
- PR#5911: Signature substitutions fail in submodules
- PR#5914: Functor breaks with an equivalent argument signature
- PR#5920, PR#2957: linking failure for big bytecodes on 32bit architectures
- PR#5920, PR#5957: linking failure for big bytecodes on 32bit architectures
- PR#5928: Missing space between words in manual page for ocamlmktop
- PR#5930: ocamldep leaks temporary preprocessing files
- PR#5934: integer shift by negative amount (in otherlibs/num)

View File

@ -29,8 +29,8 @@ CAMLRUN=byterun/ocamlrun
SHELL=/bin/sh
MKDIR=mkdir -p
CAMLP4OUT=$(CAMLP4:=out)
CAMLP4OPT=$(CAMLP4:=opt)
CAMLP4OUT=$(WITH_CAMLP4:=out)
CAMLP4OPT=$(WITH_CAMLP4:=opt)
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver \
-I toplevel
@ -124,7 +124,7 @@ all:
$(MAKE) ocamltools
$(MAKE) library
$(MAKE) ocaml
$(MAKE) otherlibraries ocamlbuild.byte $(CAMLP4OUT) $(DEBUGGER) ocamldoc
$(MAKE) otherlibraries ocamlbuild.byte $(CAMLP4OUT) $(WITH_DEBUGGER) ocamldoc
# Compile everything the first time
world:
@ -267,7 +267,7 @@ opt.opt:
$(MAKE) ocaml
$(MAKE) opt-core
$(MAKE) ocamlc.opt
$(MAKE) otherlibraries $(DEBUGGER) ocamldoc \
$(MAKE) otherlibraries $(WITH_DEBUGGER) ocamldoc \
ocamlbuild.byte $(CAMLP4OUT)
$(MAKE) ocamlopt.opt
$(MAKE) otherlibrariesopt
@ -281,7 +281,7 @@ base.opt:
$(MAKE) ocaml
$(MAKE) opt-core
$(MAKE) ocamlc.opt
$(MAKE) otherlibraries ocamlbuild.byte $(CAMLP4OUT) $(DEBUGGER) ocamldoc
$(MAKE) otherlibraries ocamlbuild.byte $(CAMLP4OUT) $(WITH_DEBUGGER) ocamldoc
$(MAKE) ocamlopt.opt
$(MAKE) otherlibrariesopt

View File

@ -26,8 +26,8 @@ CAMLDEP=boot/ocamlrun tools/ocamldep
DEPFLAGS=$(INCLUDES)
CAMLRUN=byterun/ocamlrun
CAMLP4OUT=$(CAMLP4:=out)
CAMLP4OPT=$(CAMLP4:=opt)
CAMLP4OUT=$(WITH_CAMLP4:=out)
CAMLP4OPT=$(WITH_CAMLP4:=opt)
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver \
-I toplevel
@ -105,7 +105,7 @@ defaultentry:
# Recompile the system using the bootstrap compiler
all: runtime ocamlc ocamllex ocamlyacc ocamltools library ocaml \
otherlibraries ocamldoc.byte ocamlbuild.byte $(CAMLP4OUT) $(DEBUGGER)
otherlibraries ocamldoc.byte ocamlbuild.byte $(CAMLP4OUT) $(WITH_DEBUGGER)
# The compilation of ocaml will fail if the runtime has changed.
# Never mind, just do make bootstrap to reach fixpoint again.

View File

@ -18,7 +18,10 @@
PREFIX=C:/ocamlmgw
### Remove this to disable compiling camlp4
CAMLP4=camlp4
WITH_CAMLP4=camlp4
### Remove this to disable compiling ocamldebug
WITH_DEBUGGER=ocamldebugger
### Where to install the binaries
BINDIR=$(PREFIX)/bin
@ -72,7 +75,6 @@ ASPP=$(TOOLPREF)gcc -c
ASPPPROFFLAGS=
PROFILING=noprof
DYNLINKOPTS=
DEBUGGER=ocamldebugger
CC_PROFILE=
SYSTHREAD_SUPPORT=true
EXTRALIBS=

View File

@ -18,7 +18,10 @@
PREFIX=C:/ocamlmgw64
### Remove this to disable compiling camlp4
CAMLP4=camlp4
WITH_CAMLP4=camlp4
### Remove this to disable compiling ocamldebug
WITH_DEBUGGER=ocamldebugger
### Where to install the binaries
BINDIR=$(PREFIX)/bin
@ -72,7 +75,6 @@ ASPP=$(TOOLPREF)gcc -c
ASPPPROFFLAGS=
PROFILING=noprof
DYNLINKOPTS=
DEBUGGER=ocamldebugger
CC_PROFILE=
SYSTHREAD_SUPPORT=true
EXTRALIBS=

View File

@ -69,7 +69,6 @@ ASPP=
ASPPPROFFLAGS=
PROFILING=noprof
DYNLINKOPTS=
DEBUGGER=ocamldebugger
CC_PROFILE=
SYSTHREAD_SUPPORT=true
EXTRALIBS=
@ -151,7 +150,10 @@ PACKLD=link /lib /nologo /out:# there must be no space after this '/out:'
# This variable controls whether camlp4 will be built.
# If it is set to camlp4, then it will be built.
# If it is set to the empty string, then it will not be built.
CAMLP4=camlp4
WITH_CAMLP4=camlp4
### Clear this to disable compiling ocamldebug
WITH_DEBUGGER=ocamldebugger
############# Configuration for the contributed libraries

View File

@ -70,7 +70,6 @@ ASPP=
ASPPPROFFLAGS=
PROFILING=noprof
DYNLINKOPTS=
DEBUGGER=ocamldebugger
CC_PROFILE=
SYSTHREAD_SUPPORT=true
CMXS=cmxs
@ -156,7 +155,10 @@ PACKLD=link /lib /nologo /machine:AMD64 /out:# must have no space after '/out:'
# This variable controls whether camlp4 will be built.
# If it is set to camlp4, then it will be built.
# If it is set to the empty string, then it will not be built.
CAMLP4=camlp4
WITH_CAMLP4=camlp4
### Clear this to disable compiling ocamldebug
WITH_DEBUGGER=ocamldebugger
############# Configuration for the contributed libraries

50
configure vendored
View File

@ -38,12 +38,13 @@ tk_libs=''
tk_x11=yes
dl_defs=''
verbose=no
withcurses=yes
with_curses=yes
debugruntime=noruntimed
withsharedlibs=yes
with_sharedlibs=yes
gcc_warnings="-Wall"
partialld="ld -r"
withcamlp4=camlp4
with_camlp4=camlp4
with_debugger=ocamldebugger
with_frame_pointers=false
TOOLPREF=""
@ -121,9 +122,9 @@ while : ; do
-lib*)
cclibs="$2 $cclibs"; shift;;
-no-curses|--no-curses)
withcurses=no;;
with_curses=no;;
-no-shared-libs|--no-shared-libs)
withsharedlibs=no;;
with_sharedlibs=no;;
-x11include*|--x11include*)
x11_include_dir=$2; shift;;
-x11lib*|--x11lib*)
@ -152,7 +153,9 @@ while : ; do
-with-debug-runtime|--with-debug-runtime)
debugruntime=runtimed;;
-no-camlp4|--no-camlp4)
withcamlp4="";;
with_camlp4="";;
-no-debugger|--no-debugger)
with_debugger="";;
-with-frame-pointers|--with-frame-pointers)
with_frame_pointers=true;;
*) err "Unknown option \"$1\".";;
@ -372,12 +375,12 @@ case "$bytecc,$target" in
*gcc*,*-*-cygwin*)
bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32"
dllccompopts="-U_WIN32 -DCAML_DLL"
if test $withsharedlibs = yes; then
if test $with_sharedlibs = yes; then
flexlink="flexlink -chain cygwin -merge-manifest -stack 16777216"
flexdir=`$flexlink -where | dos2unix`
if test -z "$flexdir"; then
wrn "flexlink not found: native shared libraries won't be available."
withsharedlibs=no
with_sharedlibs=no
else
iflexdir="-I\"$flexdir\""
mkexe="$flexlink -exe"
@ -389,7 +392,7 @@ case "$bytecc,$target" in
*gcc*,*-*-mingw*)
bytecccompopts="-fno-defer-pop $gcc_warnings"
dllccompopt="-DCAML_DLL"
if test $withsharedlibs = yes; then
if test $with_sharedlibs = yes; then
case "$target" in
i686-*-*) flexlink_chain="mingw";;
x86_64-*-*) flexlink_chain="mingw64";;
@ -398,7 +401,7 @@ case "$bytecc,$target" in
flexdir=`$flexlink -where`
if test -z "$flexdir"; then
wrn "flexlink not found: native shared libraries won't be available."
withsharedlibs=no
with_sharedlibs=no
else
iflexdir="-I\"$flexdir\""
mkexe="$flexlink -exe"
@ -672,7 +675,7 @@ byteccrpath=''
mksharedlibrpath=''
natdynlinkopts=""
if test $withsharedlibs = "yes"; then
if test $with_sharedlibs = "yes"; then
case "$target" in
*-*-cygwin*)
mksharedlib="$flexlink"
@ -770,7 +773,7 @@ fi
natdynlink=false
if test $withsharedlibs = "yes"; then
if test $with_sharedlibs = "yes"; then
# TODO: handle *-*-mingw* (it has $withsharedlibs=no currently)
case "$target" in
*-*-cygwin*) natdynlink=true;;
@ -1029,7 +1032,7 @@ fi
# For the terminfo module
if test "$withcurses" = "yes"; then
if test "$with_curses" = "yes"; then
for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then
inf "termcap functions found (with libraries '$libs')"
@ -1320,15 +1323,16 @@ fi
# Determine if the debugger is supported
if test "$has_sockets" = "yes"; then
inf "Replay debugger supported."
debugger="ocamldebugger"
else
inf "No replay debugger (missing system calls)"
debugger=""
if test -n "$with_debugger"; then
if test "$has_sockets" = "yes"; then
inf "Replay debugger supported."
with_debugger="ocamldebugger"
else
inf "No replay debugger (missing system calls)"
with_debugger=""
fi
fi
# Determine if system stack overflows can be detected
case "$arch,$system" in
@ -1807,7 +1811,6 @@ echo "ASPPPROFFLAGS=$asppprofflags" >> Makefile
echo "PROFILING=$profiling" >> Makefile
echo "DYNLINKOPTS=$dllib" >> Makefile
echo "OTHERLIBRARIES=$otherlibraries" >> Makefile
echo "DEBUGGER=$debugger" >> Makefile
echo "CC_PROFILE=$cc_profile" >> Makefile
echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile
echo "PARTIALLD=$partialld" >> Makefile
@ -1832,7 +1835,8 @@ echo "MKEXEDEBUGFLAG=$mkexedebugflag" >> Makefile
echo "MKDLL=$mksharedlib" >> Makefile
echo "MKMAINDLL=$mkmaindll" >> Makefile
echo "RUNTIMED=${debugruntime}" >>Makefile
echo "CAMLP4=${withcamlp4}" >>Makefile
echo "WITH_CAMLP4=${with_camlp4}" >>Makefile
echo "WITH_DEBUGGER=${with_debugger}" >>Makefile
echo "ASM_CFI_SUPPORTED=$asm_cfi_supported" >> Makefile
echo "WITH_FRAME_POINTERS=$with_frame_pointers" >> Makefile
echo "TARGET=$target" >> Makefile
@ -1904,7 +1908,7 @@ else
fi
fi
if test "$debugger" = "ocamldebugger"; then
if test "$with_debugger" = "ocamldebugger"; then
inf "Source-level replay debugger: supported"
else
inf "Source-level replay debugger: not supported"

View File

@ -50,7 +50,7 @@ val asppprofflags : string
val profiling : string
val dynlinkopts : string
val otherlibraries : string
val debugger : string
val with_debugger : string
val cc_profile : string
val systhread_support : bool
val syslib : string -> string