summaryrefslogtreecommitdiff
path: root/src/comp.c
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-08-16 11:18:36 +0200
committerAndrea Corallo <akrl@sdf.org>2020-08-17 18:04:23 +0200
commit171db3110159d95803dea13c4ee7bca4a795747b (patch)
tree6dd47e1c08c0282b819847c7ad59bb47fe67fe1d /src/comp.c
parentb6238d826e5abd1f49144df711deac6bffa3fe32 (diff)
downloademacs-171db3110159d95803dea13c4ee7bca4a795747b.tar.gz
emacs-171db3110159d95803dea13c4ee7bca4a795747b.tar.bz2
emacs-171db3110159d95803dea13c4ee7bca4a795747b.zip
Make install target functional for new eln-cache directory arrangement
* src/comp.h (fixup_eln_load_path): New extern. * src/comp.c (fixup_eln_load_path): New function. * src/pdumper.c (dump_do_dump_relocation): Update to make use of 'fixup_eln_load_path'. * lisp/loadup.el: Update to store in the compilation unit the correct eln-cache installed path. Rename --lisp-dest -> --eln-dest and. * Makefile.in: Pass the eln destination directory to src/Makefile. Rename LISP_DESTDIR -> ELN_DESTDIR. (ELN_DESTDIR): Define. (install-eln): New target. (install): Add install-eln as prerequisite. * src/Makefile.in: Rename --lisp-dest -> --eln-dest and LISP_DESTDIR -> ELN_DESTDIR.
Diffstat (limited to 'src/comp.c')
-rw-r--r--src/comp.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c
index b795afae351..d42bb4f8eb5 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4529,6 +4529,27 @@ maybe_defer_native_compilation (Lisp_Object function_name,
/* Functions used to load eln files. */
/**************************************/
+/* Fixup the system eln-cache dir. This is the last entry in
+ `comp-eln-load-path'. */
+void
+fixup_eln_load_path (Lisp_Object directory)
+{
+ Lisp_Object last_cell = Qnil;
+ Lisp_Object tmp = Vcomp_eln_load_path;
+ FOR_EACH_TAIL (tmp)
+ if (CONSP (tmp))
+ last_cell = tmp;
+
+ Lisp_Object eln_cache_sys =
+ Ffile_name_directory (concat2 (Vinvocation_directory,
+ directory));
+ /* One directory up... */
+ eln_cache_sys =
+ Ffile_name_directory (Fsubstring (eln_cache_sys, Qnil,
+ make_fixnum (-1)));
+ Fsetcar (last_cell, eln_cache_sys);
+}
+
typedef char *(*comp_lit_str_func) (void);
/* Deserialize read and return static object. */