memory-leaks

Still reachable: lots of words in many pages.
git clone https://git.kevinlegouguec.net/memory-leaks
Log | Files | Refs | README | LICENSE

commit 7c23690234f9e9af434e98cd8f9d3e0c49113608
parent fcfb5a08bb478167384183ca3a3721fba0668cba
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Thu, 23 May 2019 20:01:43 +0200

Update Emacs build script

To handle changes in configuration flags.  Also add Cairo support, now
that font hinting works.

Diffstat:
MREADME.md | 2+-
Mpersonal/setup/emacs.md | 27+++++++++++++++++++--------
2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md @@ -1,5 +1,5 @@ # Peniblec's Memory Leaks -## still reachable: 8232 words in 19 pages +## still reachable: 8271 words in 19 pages Hi! I am a software engineer interested in [a bunch of things]. diff --git a/personal/setup/emacs.md b/personal/setup/emacs.md @@ -1,7 +1,10 @@ # Compiling -This script seems to handle both a freshly cloned copy of the -repository, and a repository where compilation has already happened: +This script seems to handle most cases I care about: + +- a freshly cloned copy of the repository, +- a repository where compilation has already happened, +- a repository where I want to change the `configure` flags… ``` bash #!/bin/bash @@ -9,16 +12,24 @@ repository, and a repository where compilation has already happened: set -eux MAKE="make -j$(nproc --all)" -CONFIGURE_FLAGS="--with-xwidgets" +CONFIGURE_FLAGS="--with-xwidgets --with-cairo" + +check-config () +{ + local define=$(grep EMACS_CONFIG_OPTIONS src/config.h) + local pattern='^#define EMACS_CONFIG_OPTIONS "(.+)"$' + + [[ ${define} =~ ${pattern} ]] + test "${BASH_REMATCH[1]}" = "${CONFIGURE_FLAGS}" +} -if ! test -f Makefile +if ! test -f src/config.h || ! check-config then - ${MAKE} configure - ./configure ${CONFIGURE_FLAGS} + ./configure ${CONFIGURE_FLAGS} fi -if ! ${MAKE} CONFIGURE_FLAGS="${CONFIGURE_FLAGS}" +if ! ${MAKE} then - ${MAKE} CONFIGURE_FLAGS="${CONFIGURE_FLAGS}" bootstrap + ${MAKE} bootstrap fi ```