Commit acc138fc authored by Jacques-Pascal Deplaix's avatar Jacques-Pascal Deplaix Committed by Jean-Christophe Filliâtre
Browse files

Compile the emacs mode if emacs is available

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