Commit 0ef0ac80 authored by POGODALLA Sylvain's avatar POGODALLA Sylvain

Added the possibility to install (and uninstall) the emacs mode and

the examples under the share/acg directory

M    trunk/configure
M    trunk/Makefile.in
M    trunk/config/configure.ac
M    trunk/INSTALL
parent 1e66a071
......@@ -93,6 +93,34 @@ If you wan to uninstall it then run:
make uninstall
If you want to install the emacs mode and the examples (see below for
the installation details), you can run
make install-emacs
and
make install-examples
respectively.
To uninstall them, run:
make uninstall-emacs
and
make uninstall-examples
respectively.
Those 3 steps are covered by the command
make install-all
and
make uninstall-all
********************
** ACG emacs mode **
********************
......@@ -107,23 +135,25 @@ copy the following lines in your .emacs
(setq auto-mode-alist (cons '("\\.acg" . acg-mode) auto-mode-alist))
(autoload 'acg-mode "acg" "Major mode for editing ACG definitions" t)
where EMACS_DIR_PATH is the path of a directory where you copied acg.el (typically)
** if you run
Note:
make install-emacs
+ you can install the acg.el file into any directory
specifying the EMACS_PATH while invoking the ./configure
command.
the emacs directory and the emacs/acg.el file will be copied in the
/DATAROOTDIR/acg directory. The default value for /DATAROOTDIR is
/PREFIX/share except if you ran the ./configure script with some
--datarootdir=/SOME/DIR option.
Default is PREFIX/share/emacs/site-lisp/acg
If you installed acgtk using opam, then the default path is
+ If you installed acgtk using opam, then the default path is
OPAM_REPOSITORY/OCAML_VERSION/share/acg
To uninstall the emacs mode, run:
make uninstall-emacs
** Site distribution:
copy acg.el under an acg directory in your site-lisp directory
(typically /usr/share/emacs/site-lisp/)
......@@ -137,6 +167,31 @@ copy the following lines in it:
where now EMACS_DIR_PATH is the acg directory in your site-lisp
directory (typically /usr/share/emacs/site-lisp/acg)
************
* Examples *
************
Example files are given in the ./examples directory. Read the
./examples/README file
You can install this directory by running
make install-examples
the examples directoryfile will be copied in the /DATAROOTDIR/acg
directory. The default value for /DATAROOTDIR is /PREFIX/share except
if you ran the ./configure script with some --datarootdir=/SOME/DIR
option.
If you installed acgtk using opam, then the default path is
OPAM_REPOSITORY/OCAML_VERSION/share/acg
To uninstall the examples, run:
make uninstall-examples
*********************
......
......@@ -33,7 +33,8 @@ exec_prefix = @exec_prefix@
ACG_DIR=src/scripting
ACGC_DIR=src/acg-data
EMACS_DIR=@emacs_dir@
DATA_DIR=@datarootdir@/acg
byte: acg acgc
......@@ -65,18 +66,30 @@ clean:
superclean: clean
-find . -path "./*/*.in" -print | sed -e 's/\(.*\)\.in/\1/' | xargs -n 1 rm
install-all: install install-emacs install-examples
uninstall-all: uninstall uninstall-emacs uninstall-examples
install:
for file in $(BINARIES); do if test -x $$file ; then cp $$file @bindir@/. ; fi ; done
uninstall:
for file in $(BINARIES); do if test -x @bindir@/$$file ; then rm @bindir@/$$file ; fi ; done
rm -r $(DATA_DIR)
install-emacs:
mkdir -p $(EMACS_DIR) && cp emacs/acg.el $(EMACS_DIR)/.
mkdir -p $(DATA_DIR) && cp -r emacs $(DATA_DIR)/.
uninstall-emacs:
rm $(EMACS_DIR)/acg.el
rm -r $(EMACS_DIR)
rm -rf $(DATA_DIR)/emacs
install-examples:
mkdir -p $(DATA_DIR) && cp -r examples $(DATA_DIR)/.
uninstall-examples:
rm -rf $(DATA_DIR)/examples
# Part for the auto configuration
......
......@@ -208,15 +208,6 @@ fi
AC_MSG_RESULT($OCAMLP4 calls will be done with the $CAMLP4_LIB library)
AC_ARG_VAR(EMACS_PATH,[Directory where to installt the emacs acg-mode. Default is PREFIX/share/emacs/site-lisp/acg.])
if test -n "$EMACS_PATH" ; then
AC_SUBST(emacs_dir,$EMACS_PATH)
else
AC_SUBST(emacs_dir,$(prefix)/share/emacs/site-lisp/acg)
fi
############################
# substitutions to perform
AC_SUBST(OCAMLC)
......
......@@ -591,8 +591,6 @@ OCAMLP4_LOC
OCAML09WARNINGS
TYPES
CAMLP4_LIB
emacs_dir
EMACS_PATH
BOLT_LEVEL
BOLT_PP
BOLT_LIB
......@@ -664,8 +662,7 @@ host_alias
target_alias
DYPGEN_PATH
DYPGENLIB_PATH
BOLTLIB_PATH
EMACS_PATH'
BOLTLIB_PATH'
# Initialize some variables set by options.
......@@ -1286,8 +1283,6 @@ Some influential environment variables:
BOLTLIB_PATH
Directory where to find the bolt library if not in a standard
location
EMACS_PATH Directory where to installt the emacs acg-mode. Default is
PREFIX/share/emacs/site-lisp/acg.
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
......@@ -2935,17 +2930,6 @@ fi
$as_echo "$OCAMLP4 calls will be done with the $CAMLP4_LIB library" >&6; }
if test -n "$EMACS_PATH" ; then
emacs_dir=$EMACS_PATH
else
emacs_dir=$(prefix)/share/emacs/site-lisp/acg
fi
############################
# substitutions to perform
......
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