From f7ea4bef4339116caa15fc67fdf4718ffbab3cd5 Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Fri, 24 Feb 2012 16:20:25 +0530 Subject: [PATCH] Makefile: Support DESTDIR in Makefile * Makefile (install-lisp, install-info, install-data): Support DESTDIR. Patch by Ulrich Mueller . See http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00042.html --- Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index c99f05c9d..1753dd8d4 100644 --- a/Makefile +++ b/Makefile @@ -258,18 +258,21 @@ org-odt-data-dir: install-lisp: BATCH_EXTRA = -eval "(setq org-odt-data-dir (expand-file-name \"$(datadir)\"))" install-lisp: $(LISPFILES) $(ELCFILES) - if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ; - $(CP) $(LISPFILES) $(lispdir) - $(CP) $(ELCFILES) $(lispdir) + if [ ! -d $(DESTDIR)$(lispdir) ]; then \ + $(MKDIR) $(DESTDIR)$(lispdir); else true; fi ; + $(CP) $(LISPFILES) $(DESTDIR)$(lispdir) + $(CP) $(ELCFILES) $(DESTDIR)$(lispdir) install-info: $(INFOFILES) - if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ; - $(CP) $(INFOFILES) $(infodir) - $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES) + if [ ! -d $(DESTDIR)$(infodir) ]; then \ + $(MKDIR) $(DESTDIR)$(infodir); else true; fi ; + $(CP) $(INFOFILES) $(DESTDIR)$(infodir) + $(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) $(INFOFILES) install-data: $(DATAFILES) - if [ ! -d $(datadir) ]; then $(MKDIR) $(datadir); else true; fi ; - $(CP) $(DATAFILES) $(datadir) + if [ ! -d $(DESTDIR)$(datadir) ]; then \ + $(MKDIR) $(DESTDIR)$(datadir); else true; fi ; + $(CP) $(DATAFILES) $(DESTDIR)$(datadir) autoloads: lisp/org-install.el