Put native compiled files in user-emacs-directory/eln-cache#910
Put native compiled files in user-emacs-directory/eln-cache#910
Conversation
* Makefile (HYPB_BYTE_COMP_ELN_LOAD_PATH): Add users eln-cache last in
native-comp-eln-load-path so that batch-byte+native-compile uses that
for storing the en-files.
(%.elc): Use HYPB_BYTE_COMP_ELN_LOAD_PATH.
|
I think a lot of people today use native compilation so having a make target and build hyperbole with that is a useful feature to have if we can work out the location location to save the ELN files.
|
|
Also look at whether remove-package will update the eln-cache. |
Having a make target for it is not really needed and its usefulness can be questioned:
|
I don't think that is a problem. The eln-file is not standalone as elc. Without an el- or elc-file it will not be used and I think there are timestamp and hash-code checks that the eln-file is a valid native version of the source file. |
Native compilation can be async or forced to happen synchronously at package build time. Maybe that is where the make target could be useful. |
If you by package build time mean when the user installs it using the package manager then that is what the flag The make target is only useful for users downloading the source and really not that useful since they get it anyway just that it is async as point 2 above explains. |
|
I leave it to you to decide on the make taget then.
|
Thanks. It does not hurt at the moment but next time we do a change to the Makefile I might want to do this. |
What
Put native compiled files in user-emacs-directory/eln-cache.
Why
The function
batch-byte+native-compilestores the eln files in the last dir innative-comp-eln-load-path. This means that the system folder is preferred by this function. Only workaround is to append the user cache last. This was unnoticed since I used native compilation on a machine where I also build Emacs for the user and have write permission in the system folder. When trying theelntarget on a machine with a system installed Emacs this does not work.Note
I'm really thinking of removing the native build support from the Makefile. It does not seem to give us anything since the byte compilation provides all warnings and errors.