Skip to content

Commit

Permalink
Support installing
Browse files Browse the repository at this point in the history
Install Batteries and estring.  Also embeds the estring version in
META to simplify the build.
  • Loading branch information
mdekstrand committed Apr 11, 2010
1 parent 93c9ece commit ac3850e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
26 changes: 25 additions & 1 deletion Makefile
Expand Up @@ -10,7 +10,7 @@ OCAMLBUILD ?= ocamlbuild

BATTERIES_NATIVE ?= yes

.PHONY: all clean doc
.PHONY: all clean doc install uninstall reinstall

all: build/META
test ! -e src/batteries_config.ml || rm src/batteries_config.ml
Expand All @@ -25,6 +25,30 @@ doc:
$(OCAMLBUILD) batteries.docdir/index.html
test -e apidocs || ln -s _build/batteries.docdir apidocs

install: all
ocamlfind install estring libs/estring/META \
_build/libs/estring/*.cmo \
_build/libs/estring/*.cmi \
_build/libs/estring/*.mli
ocamlfind install $(NAME) build/META \
_build/src/*.cma _build/src/*.cmxa \
_build/src/*.cmx _build/src/*.cmi _build/src/*.mli \
_build/src/syntax/pa_comprehension/pa_comprehension.cmo \
_build/src/syntax/pa_strings/pa_strings.cma

uninstall:
ocamlfind remove estring
ocamlfind remove $(NAME)
rm -rf $(DOCROOT)

install-doc: doc
mkdir -p $(DOCROOT)
cp apidocs/* $(DOCROOT)

reinstall:
$(MAKE) uninstall
$(MAKE) install

build/META: build/META.in
sed -e 's|@VERSION@|$(VERSION)|' \
build/META.in > build/META
Expand Down
1 change: 0 additions & 1 deletion libs/.gitignore
@@ -1 +0,0 @@
estring/META
2 changes: 1 addition & 1 deletion libs/estring/META.in → libs/estring/META
@@ -1,6 +1,6 @@
# -*- conf -*-
description = "syntax extension for extended strings"
version = "@VERSION@"
version = "1.0"
requires = "camlp4"
archive(syntax,preprocessor) = "pa_estring.cmo"
archive(syntax,toploop) = "pa_estring.cmo pa_estring_top.cmo"

0 comments on commit ac3850e

Please sign in to comment.