2004-08-20 10:04:35 -07:00
|
|
|
#########################################################################
|
|
|
|
# #
|
2011-07-27 07:17:02 -07:00
|
|
|
# OCaml #
|
2004-08-20 10:04:35 -07:00
|
|
|
# #
|
|
|
|
# Xavier Leroy, projet Cristal, INRIA Rocquencourt #
|
|
|
|
# #
|
|
|
|
# Copyright 1997 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
|
|
|
# under the terms of the GNU General Public License. #
|
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
1999-10-18 02:40:46 -07:00
|
|
|
include ../config/Makefile
|
|
|
|
|
1997-02-23 08:24:53 -08:00
|
|
|
# Files to install
|
1998-12-16 01:32:04 -08:00
|
|
|
FILES= caml-font.el caml-hilit.el caml.el camldebug.el \
|
2003-07-28 11:07:11 -07:00
|
|
|
inf-caml.el caml-compat.el caml-help.el caml-types.el \
|
2003-07-31 06:39:42 -07:00
|
|
|
caml-xemacs.el caml-emacs.el
|
1997-02-23 08:24:53 -08:00
|
|
|
|
|
|
|
# Where to install. If empty, automatically determined.
|
1997-06-12 08:25:38 -07:00
|
|
|
#EMACSDIR=
|
1997-02-23 08:24:53 -08:00
|
|
|
|
|
|
|
# Name of Emacs executable
|
|
|
|
EMACS=emacs
|
|
|
|
|
1998-12-16 01:32:04 -08:00
|
|
|
# Where to install ocamltags script
|
1999-10-18 02:40:46 -07:00
|
|
|
SCRIPTDIR = $(BINDIR)
|
1998-12-16 01:32:04 -08:00
|
|
|
|
1997-02-23 08:24:53 -08:00
|
|
|
# Command for byte-compiling the files
|
|
|
|
COMPILECMD=(progn \
|
2010-01-22 04:48:24 -08:00
|
|
|
(setq load-path (cons "." load-path)) \
|
|
|
|
(byte-compile-file "caml-xemacs.el") \
|
2003-08-25 08:01:20 -07:00
|
|
|
(byte-compile-file "caml-emacs.el") \
|
2010-01-22 04:48:24 -08:00
|
|
|
(byte-compile-file "caml.el") \
|
|
|
|
(byte-compile-file "inf-caml.el") \
|
|
|
|
(byte-compile-file "caml-help.el") \
|
|
|
|
(byte-compile-file "caml-types.el") \
|
2012-08-08 08:25:23 -07:00
|
|
|
(byte-compile-file "caml-font.el") \
|
2010-01-22 04:48:24 -08:00
|
|
|
(byte-compile-file "camldebug.el"))
|
1997-02-23 08:24:53 -08:00
|
|
|
|
|
|
|
install:
|
|
|
|
@if test "$(EMACSDIR)" = ""; then \
|
2012-02-03 08:04:49 -08:00
|
|
|
$(EMACS) --batch --eval 't; see PR#5403'; \
|
2010-01-22 04:48:24 -08:00
|
|
|
set xxx `($(EMACS) --batch --eval "(mapcar 'print load-path)") \
|
2011-09-13 05:25:52 -07:00
|
|
|
2>/dev/null | \
|
|
|
|
sed -n -e 's/^"\(.*\/site-lisp\).*/\1/gp' | \
|
|
|
|
sort -u`; \
|
|
|
|
if test "$$2" = "" -o "$$3" != ""; then \
|
|
|
|
echo "Cannot determine Emacs site-lisp directory:"; \
|
|
|
|
shift; while test "$$1" != ""; do echo "\t$$1"; shift; done; \
|
|
|
|
else \
|
2010-01-22 04:48:24 -08:00
|
|
|
$(MAKE) EMACSDIR="$$2" simple-install; \
|
2011-09-13 05:25:52 -07:00
|
|
|
fi; \
|
2010-01-22 04:48:24 -08:00
|
|
|
else \
|
|
|
|
$(MAKE) simple-install; \
|
|
|
|
fi
|
1997-02-23 08:24:53 -08:00
|
|
|
|
2003-08-29 08:38:28 -07:00
|
|
|
# install the .el files, but do not compile them.
|
|
|
|
install-el:
|
|
|
|
$(MAKE) NOCOMPILE=true install
|
|
|
|
|
1999-01-31 17:55:27 -08:00
|
|
|
simple-install:
|
1997-02-23 08:24:53 -08:00
|
|
|
@echo "Installing in $(EMACSDIR)..."
|
1997-08-26 08:21:16 -07:00
|
|
|
if test -d $(EMACSDIR); then : ; else mkdir -p $(EMACSDIR); fi
|
1997-02-23 08:24:53 -08:00
|
|
|
cp $(FILES) $(EMACSDIR)
|
2003-08-29 08:38:28 -07:00
|
|
|
if [ -z "$(NOCOMPILE)" ]; then \
|
|
|
|
cd $(EMACSDIR); $(EMACS) --batch --eval '$(COMPILECMD)'; \
|
|
|
|
fi
|
1999-01-31 17:55:27 -08:00
|
|
|
|
|
|
|
ocamltags: ocamltags.in
|
|
|
|
sed -e 's:@EMACS@:$(EMACS):' ocamltags.in >ocamltags
|
|
|
|
chmod a+x ocamltags
|
|
|
|
|
|
|
|
install-ocamltags: ocamltags
|
1999-10-18 02:40:46 -07:00
|
|
|
cp ocamltags $(SCRIPTDIR)/ocamltags
|
1997-02-23 08:24:53 -08:00
|
|
|
|
2011-07-20 02:17:07 -07:00
|
|
|
# This is for testing purposes
|
|
|
|
compile-only:
|
|
|
|
$(EMACS) --batch --eval '$(COMPILECMD)'
|
|
|
|
|
1997-02-23 08:24:53 -08:00
|
|
|
clean:
|
2012-08-08 07:32:59 -07:00
|
|
|
rm -f ocamltags *~ \#*# *.elc
|