Skip to content

Commit

Permalink
generate zarith_version.ml from configure instead of Makefile
Browse files Browse the repository at this point in the history
shoud help with compilation on Windows
  • Loading branch information
antoinemine committed Mar 2, 2021
1 parent b1a1be2 commit 6ce46a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ case "$ocamlver" in
;;
esac


# zarith version

version=`grep "version" META | head -1`
echo "let $version" > zarith_version.ml
echo "let backend = \"$backend\"" >> zarith_version.ml


# dump Makefile

cat > Makefile <<EOF
Expand Down
4 changes: 1 addition & 3 deletions project.mak
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif
MLSRC = zarith_version.ml z.ml q.ml big_int_Z.ml
MLISRC = z.mli q.mli big_int_Z.mli

AUTOGEN = zarith_version.ml
AUTOGEN =

CMIOBJ = $(MLISRC:%.mli=%.cmi)
CMXOBJ = $(MLISRC:%.mli=%.cmx)
Expand Down Expand Up @@ -88,8 +88,6 @@ doc: $(MLISRC)
mkdir -p html
$(OCAMLDOC) -html -d html -charset utf8 $+

zarith_version.ml: META
(echo "let"; grep "version" META | head -1; echo "let backend = \"$(BACKEND)\"") > zarith_version.ml


# install targets
Expand Down

0 comments on commit 6ce46a5

Please sign in to comment.