Guest User

Untitled

a guest
Feb 16th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. #########################################################################
  2. # #
  3. # Objective Caml #
  4. # #
  5. # Xavier Leroy, projet Cristal, INRIA Rocquencourt #
  6. # #
  7. # Copyright 1997 Institut National de Recherche en Informatique et #
  8. # en Automatique. All rights reserved. This file is distributed #
  9. # under the terms of the GNU General Public License. #
  10. # #
  11. #########################################################################
  12.  
  13. # $Id: Makefile 10661 2010-08-30 10:16:22Z doligez $
  14.  
  15. include ../config/Makefile
  16.  
  17. # Files to install
  18. FILES= caml-font.el caml-hilit.el caml.el camldebug.el \
  19. inf-caml.el caml-compat.el caml-help.el caml-types.el \
  20. caml-xemacs.el caml-emacs.el
  21.  
  22. # Where to install. If empty, automatically determined.
  23. #EMACSDIR=
  24.  
  25. # Name of Emacs executable
  26. EMACS=emacs
  27.  
  28. # Where to install ocamltags script
  29. SCRIPTDIR = $(BINDIR)
  30.  
  31. # Command for byte-compiling the files
  32. COMPILECMD=(progn \
  33. (setq load-path (cons "." load-path)) \
  34. (byte-compile-file "caml-xemacs.el") \
  35. (byte-compile-file "caml-emacs.el") \
  36. (byte-compile-file "caml.el") \
  37. (byte-compile-file "inf-caml.el") \
  38. (byte-compile-file "caml-help.el") \
  39. (byte-compile-file "caml-types.el") \
  40. (byte-compile-file "camldebug.el"))
  41.  
  42. emacs:
  43. @if test "`which $(EMACS) 2>/dev/null`" = ""; then \
  44. echo `which $(EMACS) 2>&1`; \
  45. exit 2; \
  46. fi
  47.  
  48. install: emacs
  49. @if test "$(EMACSDIR)" != ""; then \
  50. $(MAKE) simple-install; \
  51. else \
  52. emacsdir=`($(EMACS) --batch --eval "(mapcar 'print load-path)") \
  53. 2>/dev/null | \
  54. sed -n -e '/\/site-lisp/{s/"//g;p;q}'`; \
  55. if test "$$emacsdir" = ""; then \
  56. echo "Cannot determine Emacs site-lisp directory"; \
  57. exit 2; \
  58. fi; \
  59. $(MAKE) EMACSDIR="$$emacsdir" simple-install; \
  60. fi
  61.  
  62. # install the .el files, but do not compile them.
  63. install-el:
  64. $(MAKE) NOCOMPILE=true install
  65.  
  66. simple-install: emacs
  67. @echo "Installing in $(EMACSDIR)..."
  68. if test -d $(EMACSDIR); then : ; else mkdir -p $(EMACSDIR); fi
  69. cp $(FILES) $(EMACSDIR)
  70. if [ -z "$(NOCOMPILE)" ]; then \
  71. cd $(EMACSDIR); $(EMACS) --batch --eval '$(COMPILECMD)'; \
  72. fi
  73.  
  74. ocamltags: ocamltags.in
  75. sed -e 's:@EMACS@:$(EMACS):' ocamltags.in >ocamltags
  76. chmod a+x ocamltags
  77.  
  78. install-ocamltags: ocamltags
  79. cp ocamltags $(SCRIPTDIR)/ocamltags
  80.  
  81. # This is for testing purposes
  82. compile-only:
  83. $(EMACS) --batch --eval '$(COMPILECMD)'
  84.  
  85. clean:
  86. rm -f ocamltags *~ #*# *.elc
Add Comment
Please, Sign In to add comment