[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 67c5369: Rename and move eln system directory
From: |
Andrea Corallo |
Subject: |
feature/native-comp 67c5369: Rename and move eln system directory |
Date: |
Fri, 4 Sep 2020 13:48:10 -0400 (EDT) |
branch: feature/native-comp
commit 67c53691560616598f746491347bd223480e6172
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
Rename and move eln system directory
Rename eln sys directory into 'native-lisp' and move it from
"$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}/" to
"$(DESTDIR)${libdir}/emacs/".
Add to the directory name used to disambiguate the eln compatibility
the Emacs version to have it more user friendly.
* Makefile.in (clean, install-eln): Rename eln-cache into
native-lisp.
(ELN_DESTDIR): Move from
'$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}/' to
'$(DESTDIR)${libdir}/emacs/'.
* lisp/loadup.el: Update for comp-native-path-postfix ->
comp-native-version-dir rename.
* src/comp.c (syms_of_comp): Rename eln-cache -> native-lisp.
(syms_of_comp, Fcomp_el_to_eln_filename): Rename
comp-native-path-postfix -> comp-native-version-dir.
(hash_native_abi): Rework and add emacs-version to
comp-native-version-dir.
---
Makefile.in | 6 +++---
lisp/loadup.el | 2 +-
src/comp.c | 34 ++++++++++++++++------------------
3 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index a15850d..d42ad9d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -332,7 +332,7 @@ CONFIG_STATUS_FILES_IN = \
COPYDIR = ${srcdir}/etc ${srcdir}/lisp
COPYDESTS = "$(DESTDIR)${etcdir}" "$(DESTDIR)${lispdir}"
-ELN_DESTDIR = "$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}/"
+ELN_DESTDIR = "$(DESTDIR)${libdir}/emacs/"
all: ${SUBDIR} info
@@ -760,7 +760,7 @@ install-etc:
### Install native compiled Lisp files.
install-eln:
ifeq ($(HAVE_NATIVE_COMP),yes)
- find eln-cache -type f -exec ${INSTALL_DATA} -D "{}" "$(ELN_DESTDIR){}"
\;
+ find native-lisp -type f -exec ${INSTALL_DATA} -D "{}"
"$(ELN_DESTDIR){}" \;
endif
### Build Emacs and install it, stripping binaries while installing them.
@@ -873,7 +873,7 @@ clean: $(clean_dirs:=_clean)
[ ! -d test ] || $(MAKE) -C test $@
-rm -f ./*.tmp etc/*.tmp*
-rm -rf info-dir.*
- -rm -rf eln-cache
+ -rm -rf native-lisp
### 'bootclean'
### Delete all files that need to be remade for a clean bootstrap.
diff --git a/lisp/loadup.el b/lisp/loadup.el
index aaa5888..5718477 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -458,7 +458,7 @@ lost after dumping")))
(eln-dest-dir (cadr (member "--eln-dest" command-line-args))))
(when (and bin-dest-dir eln-dest-dir)
(setq eln-dest-dir
- (concat eln-dest-dir "eln-cache/" comp-native-path-postfix "/"))
+ (concat eln-dest-dir "native-lisp/" comp-native-version-dir "/"))
(mapatoms (lambda (s)
(let ((f (symbol-function s)))
(when (subr-native-elisp-p f)
diff --git a/src/comp.c b/src/comp.c
index fa5ffad..3a56f5f 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -771,21 +771,19 @@ comp_hash_source_file (Lisp_Object filename)
void
hash_native_abi (void)
{
- Lisp_Object string = Fmapconcat (intern_c_string ("subr-name"),
- Vcomp_subr_list, build_string (" "));
- Lisp_Object digest = comp_hash_string (string);
-
/* Check runs once. */
eassert (NILP (Vcomp_abi_hash));
- Vcomp_abi_hash = digest;
- /* If 10 characters are usually sufficient for git I guess 16 are
- fine for us here. */
- Vcomp_native_path_postfix =
- concat2 (Vsystem_configuration,
- concat2 (make_string ("-", 1),
- Fsubstring_no_properties (Vcomp_abi_hash,
- make_fixnum (0),
- make_fixnum (16))));
+
+ Vcomp_abi_hash =
+ comp_hash_string (Fmapconcat (intern_c_string ("subr-name"),
+ Vcomp_subr_list, build_string ("")));
+ Lisp_Object separator = build_string ("-");
+ Vcomp_native_version_dir =
+ concat3 (Vemacs_version,
+ separator,
+ concat3 (Vsystem_configuration,
+ separator,
+ Vcomp_abi_hash));
}
static void
@@ -4057,7 +4055,7 @@ If BASE-DIR is nil use the first entry in
`comp-eln-load-path'. */)
base_dir = Fexpand_file_name (base_dir, Vinvocation_directory);
return Fexpand_file_name (filename,
- concat2 (base_dir, Vcomp_native_path_postfix));
+ concat2 (base_dir, Vcomp_native_version_dir));
}
DEFUN ("comp--init-ctxt", Fcomp__init_ctxt, Scomp__init_ctxt,
@@ -5293,9 +5291,9 @@ native compiled one. */);
DEFVAR_LISP ("comp-abi-hash", Vcomp_abi_hash,
doc: /* String signing the ABI exposed to .eln files. */);
Vcomp_abi_hash = Qnil;
- DEFVAR_LISP ("comp-native-path-postfix", Vcomp_native_path_postfix,
- doc: /* Postifix to be added to the .eln compilation path. */);
- Vcomp_native_path_postfix = Qnil;
+ DEFVAR_LISP ("comp-native-version-dir", Vcomp_native_version_dir,
+ doc: /* Directory in use to disambiguate eln compatibility. */);
+ Vcomp_native_version_dir = Qnil;
DEFVAR_LISP ("comp-deferred-pending-h", Vcomp_deferred_pending_h,
doc: /* Hash table symbol-name -> function-value. For
@@ -5316,7 +5314,7 @@ The last directory of this list is assumed to be the
system one. */);
/* Temporary value in use for boostrap. We can't do better as
`invocation-directory' is still unset, will be fixed up during
dump reload. */
- Vcomp_eln_load_path = Fcons (build_string ("../eln-cache/"), Qnil);
+ Vcomp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil);
#endif /* #ifdef HAVE_NATIVE_COMP */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/native-comp 67c5369: Rename and move eln system directory,
Andrea Corallo <=