Skip to content

Commit

Permalink
Byte and native compile comp.el after patching it
Browse files Browse the repository at this point in the history
This ensures emacs does not need to recompile it later at runtime.

Signed-off-by: Alex Murray <murray.alex@gmail.com>
  • Loading branch information
alexmurray committed Aug 4, 2023
1 parent fd91cf8 commit c2ae964
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ parts:
# ensure we use the right path in the patch file
VERSION=$(echo usr/share/emacs/*/lisp/emacs-lisp/comp.el | cut -d / -f 4)
sed s/@@VERSION@@/$VERSION/g $SNAPCRAFT_PROJECT_DIR/native-comp.patch | patch -p1
../parts/emacs/build/src/emacs -batch -f batch-byte-compile usr/share/emacs/*/lisp/emacs-lisp/comp.el
../parts/emacs/build/src/emacs -batch -f batch-byte+native-compile usr/share/emacs/*/lisp/emacs-lisp/comp.el
# compiled eln files get put back in the build directory - copy them over
# manually
cp ../parts/emacs/build/native-lisp/*/comp-*.eln usr/lib/emacs/*/native-lisp/*/
gzip usr/share/emacs/*/lisp/emacs-lisp/comp.el
site-lisp:
source: site-lisp
Expand Down

0 comments on commit c2ae964

Please sign in to comment.