]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml-emacs_batch_mode.patch
- release 5
[packages/ocaml.git] / ocaml-emacs_batch_mode.patch
1 diff -urN ocaml-3.07/emacs/Makefile ocaml-3.07.zm/emacs/Makefile
2 --- ocaml-3.07/emacs/Makefile   2003-08-29 17:38:28.000000000 +0200
3 +++ ocaml-3.07.zm/emacs/Makefile        2003-11-03 20:48:40.000000000 +0100
4 @@ -28,7 +28,7 @@
5  
6  install:
7         @if test "$(EMACSDIR)" = ""; then \
8 -          set xxx `($(EMACS) --batch --eval "(mapcar 'print load-path)") \
9 +          set xxx `($(EMACS) -batch -l -f -eval "(mapcar 'print load-path)") \
10                     2>/dev/null | \
11                     sed -n -e '/\/site-lisp/s/"//gp'`; \
12            if test "$$2" = ""; then \
13 @@ -49,7 +49,7 @@
14         if test -d $(EMACSDIR); then : ; else mkdir -p $(EMACSDIR); fi
15         cp $(FILES) $(EMACSDIR)
16         if [ -z "$(NOCOMPILE)" ]; then \
17 -         cd $(EMACSDIR); $(EMACS) --batch --eval '$(COMPILECMD)'; \
18 +         cd $(EMACSDIR); $(EMACS) -batch -l -f -eval '$(COMPILECMD)'; \
19         fi
20  
21  ocamltags:     ocamltags.in
22 diff -urN ocaml-3.07/emacs/Makefile~ ocaml-3.07.zm/emacs/Makefile~
23 --- ocaml-3.07/emacs/Makefile~  1970-01-01 01:00:00.000000000 +0100
24 +++ ocaml-3.07.zm/emacs/Makefile~       2003-08-29 17:38:28.000000000 +0200
25 @@ -0,0 +1,63 @@
26 +# $Id$
27 +
28 +include ../config/Makefile
29 +
30 +# Files to install
31 +FILES= caml-font.el caml-hilit.el caml.el camldebug.el \
32 +       inf-caml.el caml-compat.el caml-help.el caml-types.el \
33 +       caml-xemacs.el caml-emacs.el
34 +
35 +# Where to install. If empty, automatically determined.
36 +#EMACSDIR=
37 +
38 +# Name of Emacs executable
39 +EMACS=emacs
40 +
41 +# Where to install ocamltags script
42 +SCRIPTDIR = $(BINDIR)
43 +
44 +# Command for byte-compiling the files
45 +COMPILECMD=(progn \
46 +              (setq load-path (cons "." load-path)) \
47 +              (byte-compile-file "caml-xemacs.el") \
48 +             (byte-compile-file "caml-emacs.el") \
49 +              (byte-compile-file "caml.el") \
50 +              (byte-compile-file "inf-caml.el") \
51 +              (byte-compile-file "caml-help.el") \
52 +              (byte-compile-file "camldebug.el"))
53 +
54 +install:
55 +       @if test "$(EMACSDIR)" = ""; then \
56 +          set xxx `($(EMACS) --batch --eval "(mapcar 'print load-path)") \
57 +                   2>/dev/null | \
58 +                   sed -n -e '/\/site-lisp/s/"//gp'`; \
59 +          if test "$$2" = ""; then \
60 +            echo "Cannot determine Emacs site-lisp directory"; \
61 +            exit 2; \
62 +          fi; \
63 +          $(MAKE) EMACSDIR="$$2" simple-install; \
64 +        else \
65 +          $(MAKE) simple-install; \
66 +        fi
67 +
68 +# install the .el files, but do not compile them.
69 +install-el:
70 +       $(MAKE) NOCOMPILE=true install
71 +
72 +simple-install:
73 +       @echo "Installing in $(EMACSDIR)..."
74 +       if test -d $(EMACSDIR); then : ; else mkdir -p $(EMACSDIR); fi
75 +       cp $(FILES) $(EMACSDIR)
76 +       if [ -z "$(NOCOMPILE)" ]; then \
77 +         cd $(EMACSDIR); $(EMACS) --batch --eval '$(COMPILECMD)'; \
78 +       fi
79 +
80 +ocamltags:     ocamltags.in
81 +       sed -e 's:@EMACS@:$(EMACS):' ocamltags.in >ocamltags
82 +       chmod a+x ocamltags
83 +
84 +install-ocamltags: ocamltags
85 +       cp ocamltags $(SCRIPTDIR)/ocamltags
86 +
87 +clean:
88 +       rm -f ocamltags *~ #*#
This page took 0.032537 seconds and 3 git commands to generate.