unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Maksim Kislyakov <mail@kmaksim.dev>
Cc: emacs-devel@gnu.org
Subject: Re: Why does Emacs's source tar archive contain *.elc files?
Date: Wed, 17 Jul 2024 16:16:34 +0300	[thread overview]
Message-ID: <86a5iggnv1.fsf@gnu.org> (raw)
In-Reply-To: <141f27f6-9e8e-49dc-a0f3-ecbf882f2f14@kmaksim.dev> (message from Maksim Kislyakov on Wed, 17 Jul 2024 15:45:48 +0300)

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



  reply	other threads:[~2024-07-17 13:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17 12:45 Why does Emacs's source tar archive contain *.elc files? Maksim Kislyakov
2024-07-17 13:16 ` Eli Zaretskii [this message]
2024-07-17 13:56   ` Maksim Kislyakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86a5iggnv1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mail@kmaksim.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).