* Why does Emacs's source tar archive contain *.elc files?
@ 2024-07-17 12:45 Maksim Kislyakov
2024-07-17 13:16 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Maksim Kislyakov @ 2024-07-17 12:45 UTC (permalink / raw)
To: emacs-devel
Good day,
I was playing around compiling Emacs from sources. At some point, I
have found out that '*.tar' files with Emacs sources contain '*.elc' files.
As far as I understand, 'elc' is byte-compiled version of 'el' file.
- Why does the tar archive contain compiled sources? That seems strange.
Source code archive (which you use to compile program) contains compiled
code.
- Also, what will happen if I apply some patch before compiling Emacs?
'el' file's modification time will be newer that corresponding 'elc'
file's modification time.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why does Emacs's source tar archive contain *.elc files?
2024-07-17 12:45 Why does Emacs's source tar archive contain *.elc files? Maksim Kislyakov
@ 2024-07-17 13:16 ` Eli Zaretskii
2024-07-17 13:56 ` Maksim Kislyakov
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2024-07-17 13:16 UTC (permalink / raw)
To: Maksim Kislyakov; +Cc: emacs-devel
> Date: Wed, 17 Jul 2024 15:45:48 +0300
> From: Maksim Kislyakov <mail@kmaksim.dev>
>
> I was playing around compiling Emacs from sources. At some point, I
> have found out that '*.tar' files with Emacs sources contain '*.elc' files.
>
> As far as I understand, 'elc' is byte-compiled version of 'el' file.
Yes.
> - Why does the tar archive contain compiled sources? That seems strange.
> Source code archive (which you use to compile program) contains compiled
> code.
For the same reason the tarball includes other generated files: Info
manuals, the configure script, the few generated *.el files, the
configure script, etc.: it makes the build faster and requires fewer
development tools to be installed on the user's machine.
The actual line between the files that are provided in the release
tarballs and those which don't is NOT whether they are "compiled" in
some sense, but rather whether they are architecture-dependent or not.
The results of compiling *.c files are architecture-dependent, and
likewise the *.eln files produced by native compilation of Lisp code.
So we don't include those architecture-dependent files in the source
tarballs.
> - Also, what will happen if I apply some patch before compiling Emacs?
> 'el' file's modification time will be newer that corresponding 'elc'
> file's modification time.
If you modify some of the *.el files, then the "make" command will
recompile them and produce updated *.elc files. Similarly with the
*texi source files of the Info manuals, and other generated files
which come with the tarball.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why does Emacs's source tar archive contain *.elc files?
2024-07-17 13:16 ` Eli Zaretskii
@ 2024-07-17 13:56 ` Maksim Kislyakov
0 siblings, 0 replies; 3+ messages in thread
From: Maksim Kislyakov @ 2024-07-17 13:56 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Thank you for your answer!
On 17.07.2024 16:16, Eli Zaretskii wrote:
>> Date: Wed, 17 Jul 2024 15:45:48 +0300
>> From: Maksim Kislyakov <mail@kmaksim.dev>
>>
>> I was playing around compiling Emacs from sources. At some point, I
>> have found out that '*.tar' files with Emacs sources contain '*.elc' files.
>>
>> As far as I understand, 'elc' is byte-compiled version of 'el' file.
> Yes.
>
>> - Why does the tar archive contain compiled sources? That seems strange.
>> Source code archive (which you use to compile program) contains compiled
>> code.
> For the same reason the tarball includes other generated files: Info
> manuals, the configure script, the few generated *.el files, the
> configure script, etc.: it makes the build faster and requires fewer
> development tools to be installed on the user's machine.
>
> The actual line between the files that are provided in the release
> tarballs and those which don't is NOT whether they are "compiled" in
> some sense, but rather whether they are architecture-dependent or not.
> The results of compiling *.c files are architecture-dependent, and
> likewise the *.eln files produced by native compilation of Lisp code.
> So we don't include those architecture-dependent files in the source
> tarballs.
>
>> - Also, what will happen if I apply some patch before compiling Emacs?
>> 'el' file's modification time will be newer that corresponding 'elc'
>> file's modification time.
> If you modify some of the *.el files, then the "make" command will
> recompile them and produce updated *.elc files. Similarly with the
> *texi source files of the Info manuals, and other generated files
> which come with the tarball.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-17 13:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-17 12:45 Why does Emacs's source tar archive contain *.elc files? Maksim Kislyakov
2024-07-17 13:16 ` Eli Zaretskii
2024-07-17 13:56 ` Maksim Kislyakov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).