Skip to content

Commit

Permalink
[opam] Install doc conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
Gbury committed Jan 25, 2017
1 parent 74a4677 commit 1cb5eb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ TO_INSTALL=META $(addprefix _build/src/,$(LIB) $(TO_INSTALL_LIB))

install: lib
ocamlfind install $(NAME) $(TO_INSTALL)
mkdir -p $(DOCDIR)
cp -v $(NAME).docdir/*.html $(NAME).docdir/*.css $(DOCDIR)
if [ -d "$(NAME).docdir" ]; then \
mkdir -p $(DOCDIR) ; \
cp -v $(NAME).docdir/*.html $(NAME).docdir/*.css $(DOCDIR) ; \
fi

uninstall:
ocamlfind remove $(NAME)
rm -rf $(DOCDIR)

remove:
ocamlfind remove $(NAME) || true

reinstall: | remove install
reinstall: | uninstall install

.PHONY: clean doc all bench install uninstall remove reinstall enable_log disable_log bin test
2 changes: 1 addition & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ install: [
[make "DOCDIR=%{msat:doc}%" "install"]
]
remove: [
[make "uninstall"]
[make "DOCDIR=%{msat:doc}%" "uninstall"]
]
depends: [
"ocamlfind" {build}
Expand Down

0 comments on commit 1cb5eb3

Please sign in to comment.