From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulrich Mueller Subject: Re: Location of OpenDocument style files should be configurable Date: Tue, 3 Jan 2012 14:59:37 +0100 Message-ID: <20227.2505.411437.609469@a1i15.kph.uni-mainz.de> References: <20220.19946.360761.625682@a1i15.kph.uni-mainz.de> <81k45du97t.fsf@gmail.com> <20222.21041.522506.741641@a1i15.kph.uni-mainz.de> <20224.42871.411055.861546@a1i15.kph.uni-mainz.de> <20224.50573.418581.674268@a1i15.kph.uni-mainz.de> <81sjjykxet.fsf@gmail.com> <20226.52383.241764.850928@a1i15.kph.uni-mainz.de> <878vlpulnl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri4uC-0005WX-7o for emacs-orgmode@gnu.org; Tue, 03 Jan 2012 08:59:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ri4u8-0008GP-Ox for emacs-orgmode@gnu.org; Tue, 03 Jan 2012 08:59:56 -0500 Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:55792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri4u8-0008Fx-Bj for emacs-orgmode@gnu.org; Tue, 03 Jan 2012 08:59:52 -0500 In-Reply-To: <878vlpulnl.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org, Jambunathan K >>>>> On Tue, 03 Jan 2012, Bastien wrote: >>> It would be wonderful if you could provide a patch (and a usage >>> note). >> >> Included below. > Please add more explanations in such patches -- Jambunathan's > explanations are a model of clarity and detailfulness. Sorry. Please find an updated patch below. Cheers, Ulrich >From 9af8ea97022e23231395046bcfbf5f1e71ac5f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Mon, 2 Jan 2012 22:00:38 +0100 Subject: [PATCH] Support DESTDIR in Makefile. >From the GNU coding standards: `DESTDIR' is a variable prepended to each installed target file. [...] This provides for "staged installs", where the installed files are not placed directly into their expected location but are instead copied into a temporary location (`DESTDIR'). However, installed files maintain their relative directory structure and any embedded file names will not be modified. --- Makefile | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 642b21f..4f06c4e 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,9 @@ datadir = $(prefix)/share/emacs/etc # Where info files go infodir = $(prefix)/share/info +# Alternate destination root directory for staged installs +DESTDIR = + ##---------------------------------------------------------------------- ## YOU MAY NEED TO EDIT THESE ##---------------------------------------------------------------------- @@ -253,18 +256,21 @@ g: lisp/org-odt.elc: 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 -- 1.7.8.2