branch: elpa/caml commit f04c2e495c0bdb388dd7302f345235980c962ada Author: Christophe Troestler <christophe.troest...@umons.ac.be> Commit: Christophe Troestler <christophe.troest...@umons.ac.be>
Makefile: add uninstall targets --- .gitignore | 1 + Makefile | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8220ec7..0f1f150 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ /caml-autoloads.el *.tgz caml-mode.*/ +ocamltags packages \ No newline at end of file diff --git a/Makefile b/Makefile index 41fa1c9..36c97ce 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,6 @@ FILES= caml-font.el caml.el camldebug.el \ inf-caml.el caml-help.el caml-types.el \ caml-xemacs.el caml-emacs.el -INSTALL_FILES = INSTALL_DIR ?= $(shell opam var share)/emacs/site-lisp INSTALL_BIN ?= $(shell opam var bin) @@ -52,7 +51,7 @@ endif EMACS ?= emacs INSTALL_MKDIR = mkdir -p -INSTALL_DATA = $(CP) +INSTALL_DATA = cp INSTALL_RM_R = $(RM) -r # Command for byte-compiling the files @@ -77,13 +76,15 @@ install-el: install: @echo "Installing in $(INSTALL_DIR)..." - if test -d $(INSTALL_DIR); then : ; \ - else $(INSTALL_MKDIR) $(INSTALL_DIR); fi + $(INSTALL_MKDIR) $(INSTALL_DIR) $(INSTALL_DATA) $(FILES) $(INSTALL_DIR) if [ -z "$(NOCOMPILE)" ]; then \ cd $(INSTALL_DIR); $(EMACS) --batch --eval '$(COMPILECMD)'; \ fi +uninstall: + cd $(INSTALL_DIR) && $(INSTALL_RM_R) $(FILES) $(FILES:.el=.elc) + ocamltags: ocamltags.in sed -e 's:@EMACS@:$(EMACS):' ocamltags.in >ocamltags chmod a+x ocamltags @@ -91,6 +92,9 @@ ocamltags: ocamltags.in install-ocamltags: ocamltags $(INSTALL_DATA) ocamltags $(INSTALL_BIN)/ocamltags +uninstall-ocamltags: + $(INSTALL_RM_R) $(INSTALL_BIN)/ocamltags + tarball: $(TARBALL) $(TARBALL): $(DIST_FILES) $(INSTALL_MKDIR) $(DIST_NAME) @@ -118,5 +122,6 @@ clean: $(RM) -r $(TARBALL) -.PHONY: install install-el ocamltags install-ocamltags \ +.PHONY: install uninstall install-el \ + ocamltags install-ocamltags uninstall-ocamltags \ tarball submit compile-only clean