unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* native byte-compile of local Elisp
@ 2021-12-31  8:51 Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; only message in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-31  8:51 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-31  8:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-31  8:51 native byte-compile of local Elisp Emanuel Berg via Users list for the GNU Emacs text editor

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