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. */)
+ doc: /* Return the relative name of the .eln file for FILENAME.
+FILENAME must exist, and if it's a symlink, the target must exist.
+If FILENAME is compressed, it must have the \".gz\" extension,
+and Emacs must have been compiled with zlib; the file will be
+uncompressed on the fly to hash its contents.
+Value includes the original base name, followed by 2 hash values,
+one for the file name and another for its contents, followed by .eln. */)
(Lisp_Object filename)
{
CHECK_STRING (filename);
DEFUN ("comp-el-to-eln-filename", Fcomp_el_to_eln_filename,
Scomp_el_to_eln_filename, 1, 2, 0,
- doc: /* Return the .eln filename for source FILENAME to used
-for new compilations.
-If BASE-DIR is non-nil use it as a base directory, look for a suitable
-directory in `comp-eln-load-path' otherwise. */)
+ doc: /* Return the absolute .eln file name for source FILENAME.
+The resulting .eln file name is intended to be used for natively
+compiling FILENAME. FILENAME must exist and be readable, but other
+than that, its leading directories are ignored when constructing
+the name of the .eln file.
+If BASE-DIR is non-nil, use it as the directory for the .eln file;
+non-absolute BASE-DIR is interpreted as relative to `invocation-directory'.
+If BASE-DIR is omitted or nil, look for the first writable directory
+in `native-comp-eln-load-path', and use as BASE-DIR its subdirectory
+whose name is given by `comp-native-version-dir'.
+If FILENAME specifies a preloaded file, the directory for the .eln
+file is the \"preloaded/\" subdirectory of the directory determined
+as described above. FILENAME is considered to be a preloaded file if
+the value of `comp-file-preloaded-p' is non-nil, or if FILENAME
+appears in the value of the environment variable LISP_PRELOADED;
+the latter is supposed to be used by the Emacs build procedure. */)
(Lisp_Object filename, Lisp_Object base_dir)
{
Lisp_Object source_filename = filename;
}
\f
-/* `comp-eln-load-path' clean-up support code. */
+/* `native-comp-eln-load-path' clean-up support code. */
static Lisp_Object all_loaded_comp_units_h;
/* Windows does not let us delete a .eln file that is currently loaded
by a process. The strategy is to rename .eln files into .old.eln
instead of removing them when this is not possible and clean-up
- `comp-eln-load-path' when exiting.
+ `native-comp-eln-load-path' when exiting.
Any error is ignored because it may be due to the file being loaded
in another Emacs instance. */
/**************************************/
/* Fixup the system eln-cache directory, which is the last entry in
- `comp-eln-load-path'. Argument is a .eln file in that directory. */
+ `native-comp-eln-load-path'. Argument is a .eln file in that directory. */
void
fixup_eln_load_path (Lisp_Object eln_filename)
{