diff options
Diffstat (limited to '.local/bin/emacs-build')
| -rwxr-xr-x | .local/bin/emacs-build | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/.local/bin/emacs-build b/.local/bin/emacs-build index 375a402..c63338f 100755 --- a/.local/bin/emacs-build +++ b/.local/bin/emacs-build @@ -2,9 +2,9 @@ set -eux -src=$(realpath "${EMACS_SRC:-.}") -build=$(realpath "${EMACS_BUILD:-.}") -config_h=${build}/src/config.h +src_dir=$(realpath "${EMACS_SRC:-.}") +build_dir=$(realpath "${EMACS_BUILD:-.}") +config_h=${build_dir}/src/config.h make="make -j$(nproc --all)" configure_flags=( @@ -77,27 +77,17 @@ then ) fi -if ! test -f "${src}"/Makefile +if ! test -f "${src_dir}"/Makefile then - ${make} -C "${src}" configure + ${make} -C "${src_dir}" configure fi -check-config () -{ - if ! test -f "${config_h}" - then - return 1 - fi - - local pattern="#define EMACS_CONFIG_OPTIONS \"${configure_flags[@]}\"" - grep "${pattern}" "${config_h}" -} - -cd "${build}" - -if ! check-config -then - "${src}"/configure "${configure_flags[@]}" -fi +cd "${build_dir}" +# Had logic to check src/config.h:EMACS_CONFIG_OPTIONS to determine +# whether running 'configure' is redundant. Threw it all to the wind: +# date-based --prefix changes everyday; build times are not as long as +# they used to be; I can always invoke 'make' if I want fast iteration +# over build errors. +"${src_dir}"/configure "${configure_flags[@]}" ${make} "$@" |
