return Qt;
}
-DEFUN ("comp-el-to-eln-filename", Fcomp_el_to_eln_filename,
- Scomp_el_to_eln_filename, 1, 2, 0,
- doc: /* Return the corresponding .eln filename for source FILENAME.
-If BASE-DIR is nil use the first entry in `comp-eln-load-path'. */)
- (Lisp_Object filename, Lisp_Object base_dir)
+DEFUN ("comp-el-to-eln-rel-filename", Fcomp_el_to_eln_rel_filename,
+ Scomp_el_to_eln_rel_filename, 1, 1, 0,
+ doc: /* Return the corresponding .eln relative filename. */)
+ (Lisp_Object filename)
{
CHECK_STRING (filename);
make_fixnum (-3))),
separator);
Lisp_Object hash = concat3 (path_hash, separator, content_hash);
- filename = concat3 (filename, hash, build_string (NATIVE_ELISP_SUFFIX));
+ return concat3 (filename, hash, build_string (NATIVE_ELISP_SUFFIX));
+}
+
+DEFUN ("comp-el-to-eln-filename", Fcomp_el_to_eln_filename,
+ Scomp_el_to_eln_filename, 1, 2, 0,
+ doc: /* Return the corresponding .eln filename for source FILENAME.
+If BASE-DIR is nil use the first entry in `comp-eln-load-path'. */)
+ (Lisp_Object filename, Lisp_Object base_dir)
+{
+ filename = Fcomp_el_to_eln_rel_filename (filename);
/* If base_dir was not specified search inside Vcomp_eln_load_path
for the first directory where we have write access. */
"configuration, please recompile"));
defsubr (&Scomp__subr_signature);
+ defsubr (&Scomp_el_to_eln_rel_filename);
defsubr (&Scomp_el_to_eln_filename);
defsubr (&Scomp_native_driver_options_effective_p);
defsubr (&Scomp__install_trampoline);
/* Search eln in the eln-cache directories. */
Lisp_Object eln_path_tail = Vcomp_eln_load_path;
- FOR_EACH_TAIL_SAFE (eln_path_tail)
+ Lisp_Object src_name =
+ Fsubstring (*filename, Qnil, make_fixnum (-1));
+ if (NILP (Ffile_exists_p (src_name)))
{
- Lisp_Object src_name =
- Fsubstring (*filename, Qnil, make_fixnum (-1));
+ src_name = concat2 (src_name, build_string (".gz"));
if (NILP (Ffile_exists_p (src_name)))
- {
- src_name = concat2 (src_name, build_string (".gz"));
- if (NILP (Ffile_exists_p (src_name)))
- /* Can't find the corresponding source file. */
- return;
- }
+ /* Can't find the corresponding source file. */
+ return;
+ }
+ Lisp_Object eln_rel_name = Fcomp_el_to_eln_rel_filename (src_name);
+
+ FOR_EACH_TAIL_SAFE (eln_path_tail)
+ {
Lisp_Object eln_name =
- Fcomp_el_to_eln_filename (src_name, XCAR (eln_path_tail));
+ Fexpand_file_name (eln_rel_name, XCAR (eln_path_tail));
int eln_fd = emacs_open (SSDATA (ENCODE_FILE (eln_name)), O_RDONLY, 0);
if (eln_fd > 0)