commit a548a8aa39fda09600255b5ebcf2561513e6fae1 parent 8f4fb413763d2485a32d9d5882f8e977e95fee9d Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com> Date: Sat, 7 Dec 2019 21:03:20 +0100 Add script to compile Emacs Diffstat:
| A | .local/bin/emacs-build | | | 29 | +++++++++++++++++++++++++++++ |
1 file changed, 29 insertions(+), 0 deletions(-)
diff --git a/.local/bin/emacs-build 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}