help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

native byte-compile of local Elisp


From: Emanuel Berg
Subject: native byte-compile of local Elisp
Date: Fri, 31 Dec 2021 09:51:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

If one compiles Emacs with the configure option
--with-native-compilation do you then automatically get native
compile of your own Elisp when you byte-compile it?

E.g., like this?

# this file:
#   https://dataswamp.org/~incal/emacs-init/Makefile

emacs            = /usr/local/bin/emacs

init-file        = ${HOME}/.emacs
init-file-elc    = $(init-file).elc

emacs-dir        = ${HOME}/.emacs.d

ema-path         = $(emacs-dir)/emacs-init

ema-bibtex       = $(ema-path)/bibtex
ema-erc          = $(ema-path)/erc
ema-gnus         = $(ema-path)/gnus
ema-ide          = $(ema-path)/ide
ema-w3m          = $(ema-path)/w3m

ema              = \"$(ema-erc)\"    \
                   \"$(ema-bibtex)\" \
                   \"$(ema-gnus)\"   \
                   \"$(ema-ide)\"    \
                   \"$(ema-path)\"   \
                   \"$(ema-w3m)\"

elpa-path        = $(emacs-dir)/elpa

crontab-mode     = $(elpa-path)/crontab-mode-20210715.133
gnuplot-mode     = $(elpa-path)/gnuplot-mode-20171013.1616
google-translate = $(elpa-path)/google-translate-20210406.1138
lua-mode         = $(elpa-path)/lua-mode-20210809.1320
markdown-mode    = $(elpa-path)/markdown-mode-20211022.55
seq              = $(elpa-path)/seq-2.23
sml-mode         = $(elpa-path)/sml-mode-6.10
w3m              = $(elpa-path)/w3m-20211122.335

elpa             = \"$(crontab-mode)\"     \
                   \"$(gnuplot-mode)\"     \
                   \"$(google-translate)\" \
                   \"$(lua-mode)\"         \
                   \"$(markdown-mode)\"    \
                   \"$(seq)\"              \
                   \"$(sml-mode)\"         \
                   \"$(w3m)\"              \

packs            = $(elpa) $(ema)

el-files         = $(shell zsh -c "ls -1 **/*.el")
elc-files        = $(el-files:.el=.elc)

sed-filter       = 2>&1 | sed '/^\(Loading\|Wrote\)/d'

byte-compile     = $(emacs)                                  \
        --batch                                                   \
        --eval "(setq load-path (append load-path '($(packs)))))" \
        -f batch-byte-compile

all: $(elc-files) $(init-file-elc)

$(init-file-elc): $(init-file)
        $(byte-compile) $< $(sed-filter)

%.elc: %.el
        $(byte-compile) $< $(sed-filter)

clean:
        $(shell zsh -c "rm -rf **/*.elc(N)")
        rm -f $(init-file-elc)

again:
        ${MAKE} clean
        ${MAKE} all

test:
        echo $(byte-compile)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]