Commit 3962c050 authored by Gerd Stolpmann's avatar Gerd Stolpmann

prep 1.8.2

parent 40a5e3dc
version = "1.7"
requires = "camlp4"
version = "1.8.2"
requires = "camlp4,bytes"
# This line counts when the compiler is invoked with
# ocamlfind ocamlc -syntax -package xstrp4
......
......@@ -15,7 +15,7 @@ include Makefile.conf
OBJECTS = xstrp4_here_types.cmo xstrp4_here_lexer.cmo xstrp4_here.cmo
ARCHIVE = xstrp4.cma
NAME = xstrp4
REQUIRES =
REQUIRES = bytes
all: $(ARCHIVE)
......@@ -25,7 +25,7 @@ $(ARCHIVE): $(OBJECTS)
sample: sample.ml
ocamlfind ocamlc \
-package xstrp4 -syntax camlp4o \
-package xstrp4 -syntax camlp4o -linkpkg \
sample.ml \
-o sample
......@@ -36,8 +36,8 @@ view.sample: all
# general rules:
OPTIONS =
OCAMLC = $(OCAMLFIND) ocamlc -g -safe-string $(OPTIONS) $(CAMLP4_OPTS)
OCAMLOPT = $(OCAMLFIND) ocamlopt -g -safe-string $(OPTIONS) $(CAMLP4_OPTS)
OCAMLC = $(OCAMLFIND) ocamlc -g $(STRING_OPTS) $(OPTIONS) $(CAMLP4_OPTS) -package "$(REQUIRES)"
OCAMLOPT = $(OCAMLFIND) ocamlopt -g $(STRING_OPTS) $(OPTIONS) $(CAMLP4_OPTS) -package "$(REQUIRES)"
OCAMLDEP = ocamldep $(OPTIONS)
OCAMLFIND = ocamlfind
......
......@@ -47,7 +47,7 @@ set_defaults () {
ocamlc=`get_path ocamlc`
set_defaults
version="1.8.1"
version="1.8.2"
exec_suffix=""
#######################################################################
......@@ -165,6 +165,19 @@ else
exit 1
fi
######################################################################
# immutable strings
printf "%s" "Checking for -safe-string... "
string_opts=""
if ocamlc -safe-string >/dev/null 2>/dev/null; then
echo "yes"
string_opts="-safe-string"
else
echo "no"
fi
######################################################################
# Check camlp4 version
......@@ -198,6 +211,9 @@ cat <<_EOF_ >Makefile.conf
# The Xstrp4 version:
VERSION = $version
# whether to enable -safe-string
STRING_OPTS = $string_opts
# Camlp4 style:
CAMLP4_STYLE = $camlp4_style
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment