* Makefile.in (lispdirrel): Add replace template.
(epaths-force): Form correctly 'PATH_REL_LOADSEARCH' into epath.h
* configure.ac (lispdirrel): Define variable (relative path of the
lisp files from the installation directory).
* src/comp.c (Fcomp_el_to_eln_filename): Update algorithm not to
rely on 'PATH_DUMPLOADSEARCH' but on 'PATH_REL_LOADSEARCH'.
* src/epaths.in (PATH_REL_LOADSEARCH): Add macro template.
# These variables hold the values Emacs will actually use. They are
# based on the values of the standard Make variables above.
+# Where lisp files are installed in a distributed with Emacs (relative
+# path to the installation directory).
+lispdirrel=@lispdirrel@
+
# Where to install the lisp files distributed with Emacs.
# This includes the Emacs version, so that the lisp files for different
# versions of Emacs will install themselves in separate directories.
@(gamedir='${gamedir}'; \
sed < ${srcdir}/src/epaths.in > epaths.h.$$$$ \
-e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "${standardlisppath}";' \
+ -e 's;\(#.*PATH_REL_LOADSEARCH\).*$$;\1 "${lispdirrel}";' \
-e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "${locallisppath}";' \
-e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "${buildlisppath}";' \
-e '/^#define PATH_[^ ]*SEARCH /s/\([":]\):*/\1/g' \
dnl hence the single quotes. This is per the GNU coding standards, see
dnl (autoconf) Installation Directory Variables
dnl See also epaths.h below.
-lispdir='${datadir}/emacs/${version}/lisp'
+lispdirrel='${version}/lisp'
+lispdir='${datadir}/emacs/'${lispdirrel}
standardlisppath='${lispdir}'
locallisppath='${datadir}/emacs/${version}/site-lisp:'\
'${datadir}/emacs/site-lisp'
NS_IMPL_COCOA=yes
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=${ns_appdir}/Contents/MacOS
- ns_appresdir=${ns_appdir}/Contents/Resources
+ lispdirrel=Contents/Resources
+ ns_appresdir=${ns_appdir}/{lispdirrel}
ns_appsrc=Cocoa/Emacs.base
ns_fontfile=macfont.o
elif flags=$( (gnustep-config --objc-flags) 2>/dev/null); then
AC_SUBST(libexecdir)
AC_SUBST(mandir)
AC_SUBST(infodir)
+AC_SUBST(lispdirrel)
AC_SUBST(lispdir)
AC_SUBST(standardlisppath)
AC_SUBST(locallisppath)
As installing .eln files compiled during the build changes their
absolute path we need an hashing mechanism that is not sensitive
to that. For this we replace if match PATH_DUMPLOADSEARCH or
- PATH_LOADSEARCH with '//' before generating the hash. */
+ *PATH_REL_LOADSEARCH with '//' before computing the hash. */
if (NILP (loadsearch_re_list))
{
- Lisp_Object sys_re;
-#ifdef __APPLE__
- /* On MacOS we relax the match on PATH_LOADSEARCH making
- everything before ".app/" a wildcard. This to obtain a
- self-contained Emacs.app (bug#43532). */
- char *c;
- if ((c = strstr (PATH_LOADSEARCH, ".app/")))
- sys_re =
- concat2 (build_string ("\\`[[:ascii:]]+"),
- Fregexp_quote (build_string (c)));
- else
- sys_re = Fregexp_quote (build_string (PATH_LOADSEARCH));
-#else
- sys_re = Fregexp_quote (build_string (PATH_LOADSEARCH));
-#endif
+ Lisp_Object sys_re =
+ concat2 (build_string ("\\`[[:ascii:]]+"),
+ Fregexp_quote (build_string ("/" PATH_REL_LOADSEARCH "/")));
loadsearch_re_list =
- list2 (sys_re, Fregexp_quote (build_string (PATH_DUMPLOADSEARCH)));
+ list2 (sys_re, Fregexp_quote (build_string (PATH_DUMPLOADSEARCH "/")));
}
Lisp_Object lds_re_tail = loadsearch_re_list;
*/
#define PATH_LOADSEARCH "/usr/local/share/emacs/lisp"
+/* Like PATH_LOADSEARCH, but contains the relative path from the
+ installation directory.
+*/
+#define PATH_REL_LOADSEARCH ""
/* Like PATH_LOADSEARCH, but contains the non-standard pieces.
These are the site-lisp directories. Configure sets this to