summaryrefslogtreecommitdiff
path: root/scripts/native-compile.bash
blob: ac5d6e249a12c57893fe8760787d8cdbba4654e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

rm ./**/*.elc
rm *.elc

for file in ./*.el; do
    echo 'Compiling '"$file"' ...'
    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 '(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