Commit acc138fc authored by Kate's avatar Kate Committed by Jean-Christophe Filliatre

Compile the emacs mode if emacs is available

parent cc6d1e85
......@@ -16,6 +16,7 @@ why3.conf
*.vo
*.vd
*.glob
*.elc
\#*\#
# /
......
......@@ -59,6 +59,7 @@ endif
RUBBER = @RUBBER@
HEVEA = @HEVEA@
HACHA = @HACHA@
EMACS = @EMACS@
#PSVIEWER = @PSVIEWER@
#PDFVIEWER = @PDFVIEWER@
......@@ -82,6 +83,8 @@ EXTLIBS = str unix nums dynlink
EXTCMA = $(addsuffix .cma,$(EXTLIBS)) $(addsuffix .cmo,$(EXTOBJS))
EXTCMXA = $(addsuffix .cmxa,$(EXTLIBS)) $(addsuffix .cmx,$(EXTOBJS))
TARGET_EMACS = share/emacs/why3.elc
###############
# main target
###############
......@@ -232,7 +235,11 @@ clean_old_install:
rm -rf $(OCAMLINSTALLLIB)/why3
ifeq ($(EMACS),no)
install_no_local:: clean_old_install
else
install_no_local:: clean_old_install $(TARGET_EMACS)
endif
mkdir -p $(BINDIR)
mkdir -p $(DATADIR)/why3
mkdir -p $(DATADIR)/why3/images
......@@ -256,6 +263,9 @@ install_no_local:: clean_old_install
cp -f share/why3session.dtd $(DATADIR)/why3
cp -rf share/javascript $(DATADIR)/why3/javascript
cp -f share/emacs/why3.el $(DATADIR)/why3/emacs/why3.el
ifneq ($(EMACS),no)
cp -f share/emacs/why3.elc $(DATADIR)/why3/emacs/why3.elc
endif
cp -f share/vim/why3.vim $(DATADIR)/why3/vim/why3.vim
cp -f share/lang/why3.lang $(DATADIR)/why3/lang/why3.lang
......@@ -275,6 +285,13 @@ endif
install-all: install install-lib
##################
# Why3 emacs mode
##################
%.elc: %.el
$(EMACS) --batch --no-init-file -f batch-byte-compile $<
##################
# Why3 plugins
##################
......
......@@ -340,6 +340,9 @@ if test "$enable_html_doc" = yes ; then
fi
fi
# checking for emacs
AC_CHECK_PROG(EMACS,emacs,emacs,no)
# checking for Zarith
if test "$enable_zarith" = yes; then
if test "$USEOCAMLFIND" = yes; then
......@@ -739,6 +742,7 @@ AC_SUBST(enable_html_doc)
AC_SUBST(RUBBER)
AC_SUBST(HEVEA)
AC_SUBST(HACHA)
AC_SUBST(EMACS)
AC_SUBST(enable_frama_c)
......
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