diff options
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/emacs-build | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/.local/bin/emacs-build b/.local/bin/emacs-build new file mode 100755 index 0000000..c367bfe --- /dev/null +++ b/.local/bin/emacs-build @@ -0,0 +1,29 @@ +#!/bin/bash + +set -eux + +make="make -j$(nproc --all)" +configure_flags="--with-xwidgets --with-cairo" + +if ! test -f Makefile +then + ${make} configure +fi + +check-config () +{ + if ! test -f src/config.h + then + return 1 + fi + + local pattern='#define EMACS_CONFIG_OPTIONS "'${configure_flags}'"' + grep "${pattern}" src/config.h +} + +if ! check-config +then + ./configure ${configure_flags} +fi + +${make} |
