4

When I download and install auctex, I read that

The simplest way of installing AUCTeX is by using the Emacs package manager integrated in Emacs 24 and greater (ELPA). Simply do M-x package-list-packages RET, mark the auctex package for installation with i, and hit x to execute the installation procedure. That's all.

The remainder of this section is about installing AUCTeX from a release tarball or from a checkout of the AUCTeX repository. Installing AUCTeX should be simple: merely ./configure, make, and make install for a standard site-wide installation (most other installations can be done by specifying a --prefix=... option).

In both ways, what compiler(s) are used?

In the first approach, the output of installation said

Compiling file /home/tim/.emacs.d/elpa/auctex-11.87.7/auctex-pkg.el at Sun Sep 28 14:29:44 2014
Entering directory `/home/tim/.emacs.d/elpa/auctex-11.87.7/'

In the second approach, I searched in the Makefile, and don't find gcc or g++.

8

The compilation you refer to is usually called byte-compilation of emacs lisp. It generates a different and faster representation of functions for the emacs interpreter. Unlike compilation of C code using gcc where the resulting code is run directly by the hardware, byte-compiled code still needs the Emacs interpreter.

Emacs comes with a native compiler that can natively byte-compile an emacs lisp file. If you see the makefile, you should see a reference to emacs --batch which is calling emacs in non-interactive mode to convert .el files to byte-code. Interactively, you can achieve the same behavior using byte-compile-file or byte-compile-buffer.

You can read more about byte-compilation from the manual.

  • Thanks. Is the compiler emacs --batch then? – Tim Sep 28 '14 at 19:09
  • Yes, the compiler is emacs itself. --batch calls emacs in a non-interactive mode i.e. it performs the compilation and quits without additional user input. – Vamsi Sep 28 '14 at 19:38
4

In both cases, the compiler used is Emacs itself.

When installing from ELPA, most of the build process is handled by package.el, therefore by the running instance of Emacs. package.el also loads directly the product of this build process, so that the package becomes immediately available.

In the Makefile-based approach, we have repeated calls to an external Emacs process. This can be seen in the Makefile with the following snippet

ELCC=$(EMACS) -batch -q -no-site-file -no-init-file -l lpath.el
...
lisp:   tex-site.el $(AUCSRC) $(STYLESRC) $(MULESRC)
    $(ELCC) -f batch-byte-compile $(AUCSRC) $(STYLESRC) $(MULESRC)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.