summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJambunathan K <kjambunathan@gmail.com>2012-02-24 16:20:25 +0530
committerJambunathan K <kjambunathan@gmail.com>2012-02-24 16:20:25 +0530
commitf7ea4bef4339116caa15fc67fdf4718ffbab3cd5 (patch)
tree95105b9f0627178205ace3bbfe57a0b1dd868bff
parent9ae171a86e8a397ed0b71f0cc7f916eb1d150835 (diff)
downloadorg-mode-f7ea4bef4339116caa15fc67fdf4718ffbab3cd5.tar.gz
Makefile: Support DESTDIR in Makefile
* Makefile (install-lisp, install-info, install-data): Support DESTDIR. Patch by Ulrich Mueller <ulm@gentoo.org>. See http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00042.html
-rw-r--r--Makefile19
1 files changed, 11 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index c99f05c..1753dd8 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