1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

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.
This commit is contained in:
Andrea Corallo 2020-09-04 11:54:44 +02:00
parent 3023eb5692
commit 67c5369156
3 changed files with 20 additions and 22 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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 */