Use compile scripts in makefile + add bytecomp step to native comp script
ci/woodpecker/push/woodpecker Pipeline failed Details

WIP-cache
Hugo Thunnissen 9 months ago
parent 4a75cd350c
commit 52e1254001

@ -10,9 +10,11 @@ cask: $(CASK_DIR)
.PHONY: compile
compile: cask
cask emacs -batch -L . -L test \
-f batch-byte-compile $$(cask files); \
(ret=$$? ; cask clean-elc && exit $$ret)
bash ./compile.bash
.PHONY: compile-native
compile-native: cask
bash ./native-compile.bash
.PHONY: test
test: compile

@ -1,11 +1,20 @@
#!/bin/bash
rm ./**/*.elc
rm *.elc
for file in ./*.el; do
echo 'Compiling '"$file"' ...'
cask emacs -batch -L . --eval '(setq native-compile-error-on-warn t)' -f batch-native-compile "$file" || break
cask emacs -batch -L . --eval '(progn '"(require 'comp)"' (setq byte-compile-error-on-warn t native-compile-target-directory (car native-comp-eln-load-path)) (nreverse native-comp-eln-load-path))' -f batch-byte+native-compile "$file" || break
done
for file in ./**/*.el; do
echo 'Compiling '"$file"' ...'
cask emacs -batch -L . --eval '(setq byte-compile-error-on-warn t)' -f batch-native-compile "$file" || break
cask emacs -batch -L . --eval '(progn '"(require 'comp)"' (setq byte-compile-error-on-warn t native-compile-target-directory (car native-comp-eln-load-path)) (nreverse native-comp-eln-load-path))' -f batch-byte+native-compile "$file" || break
done
if [[ -z $NO_REMOVE_ELC ]]; then
rm ./**/*.elc
rm *.elc
fi

Loading…
Cancel
Save