]> git.notmuchmail.org Git - notmuch/commitdiff
Separate Emacs misc. files dir. from Emacs code dir.
authorAmadeusz Żołnowski <aidecoe@aidecoe.name>
Tue, 25 Oct 2011 08:07:02 +0000 (10:07 +0200)
committerDavid Bremner <bremner@debian.org>
Fri, 28 Oct 2011 17:07:44 +0000 (14:07 -0300)
New option --emacsetcdir was added, but it's set default to the same
value as --emacslispdir for backward compatibility.

configure
emacs/Makefile.local

index 3999ce8f3a80509dda16572a3a92bcbf4035a103..e90b76fa187f3b05893d90f085b595875fb79b35 100755 (executable)
--- a/configure
+++ b/configure
@@ -97,6 +97,7 @@ Fine tuning of some installation directories is available:
        --mandir=DIR            Install man pages to DIR [PREFIX/share/man]
        --sysconfdir=DIR        Read-only single-machine data [PREFIX/etc]
        --emacslispdir=DIR      Emacs code [PREFIX/share/emacs/site-lisp]
+       --emacsetcdir=DIR       Emacs miscellaneous files [PREFIX/share/emacs/site-lisp]
        --bashcompletiondir=DIR Bash completions files [SYSCONFDIR/bash_completion.d]
        --zshcompletiondir=DIR  Zsh completions files [PREFIX/share/zsh/functions/Completion/Unix]
 
@@ -139,6 +140,8 @@ for option; do
        SYSCONFDIR="${option#*=}"
     elif [ "${option%%=*}" = '--emacslispdir' ] ; then
        EMACSLISPDIR="${option#*=}"
+    elif [ "${option%%=*}" = '--emacsetcdir' ] ; then
+       EMACSETCDIR="${option#*=}"
     elif [ "${option%%=*}" = '--bashcompletiondir' ] ; then
        BASHCOMPLETIONDIR="${option#*=}"
     elif [ "${option%%=*}" = '--zshcompletiondir' ] ; then
@@ -330,6 +333,14 @@ if [ -z "${EMACSLISPDIR}" ]; then
     fi
 fi
 
+if [ -z "${EMACSETCDIR}" ]; then
+    if pkg-config --exists emacs; then
+       EMACSETCDIR=$(pkg-config emacs --variable sitepkglispdir)
+    else
+       EMACSETCDIR='$(prefix)/share/emacs/site-lisp'
+    fi
+fi
+
 printf "Checking if emacs is available... "
 if emacs --quick --batch > /dev/null 2>&1; then
     printf "Yes.\n"
@@ -614,6 +625,10 @@ sysconfdir = ${SYSCONFDIR:=\$(prefix)/etc}
 # The directory to which emacs lisp files should be installed
 emacslispdir=${EMACSLISPDIR}
 
+# The directory to which emacs miscellaneous (machine-independent) files should
+# be installed
+emacsetcdir=${EMACSETCDIR}
+
 # Whether there's an emacs binary available for byte-compiling
 HAVE_EMACS = ${have_emacs}
 
index ce0c3f007127e634404c0c540e88eee12cb8c1cb..0c58b82457db20174006f32765bf00a645eaec18 100644 (file)
@@ -38,6 +38,7 @@ install-emacs:
 ifeq ($(HAVE_EMACS),1)
        install -m0644 $(emacs_bytecode) "$(DESTDIR)$(emacslispdir)"
 endif
-       install -m0644 $(emacs_images) "$(DESTDIR)$(emacslispdir)"
+       mkdir -p "$(DESTDIR)$(emacsetcdir)"
+       install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
 
 CLEAN := $(CLEAN) $(emacs_bytecode)