From 183078131a6ea1b62b97e1e361e58ffcc850a084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 18 Aug 2012 23:47:43 +0200 Subject: [PATCH] Capture the path to `guile', when available. --- .gitignore | 1 + configure.ac | 11 +++++++ src/script/Makefile.am | 30 +++++++++++-------- ...al-guile-jobs => hydra-eval-guile-jobs.in} | 2 +- 4 files changed, 30 insertions(+), 14 deletions(-) rename src/script/{hydra-eval-guile-jobs => hydra-eval-guile-jobs.in} (99%) mode change 100755 => 100644 diff --git a/.gitignore b/.gitignore index e3439c14..32423768 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ Makefile.in /aclocal.m4 /missing /install-sh +/src/script/hydra-eval-guile-jobs diff --git a/configure.ac b/configure.ac index 5d066959..ba32fe85 100644 --- a/configure.ac +++ b/configure.ac @@ -77,6 +77,13 @@ LIBS="$old_LIBS" PKG_CHECK_MODULES([BDW_GC], [bdw-gc]) PKG_CHECK_MODULES([GUILE], [guile-2.0], [HAVE_GUILE=yes], [HAVE_GUILE=no]) +if test "x$HAVE_GUILE" = xyes; then + AC_PATH_PROG([GUILE], [guile]) +else + GUILE="guile" +fi +AC_SUBST([GUILE]) + testPath="$(dirname $(type -p expr))" AC_SUBST(testPath) @@ -91,8 +98,12 @@ AC_CONFIG_FILES([ src/lib/Makefile src/root/Makefile src/script/Makefile + src/script/hydra-eval-guile-jobs tests/Makefile tests/jobs/config.nix ]) +AC_CONFIG_COMMANDS([executable-scripts], + [chmod +x src/script/hydra-eval-guile-jobs]) + AC_OUTPUT diff --git a/src/script/Makefile.am b/src/script/Makefile.am index 586b8498..8cc48484 100644 --- a/src/script/Makefile.am +++ b/src/script/Makefile.am @@ -1,15 +1,19 @@ -EXTRA_DIST = \ - hydra-control \ - $(bin_SCRIPTS) +EXTRA_DIST = \ + $(distributable_scripts) \ + hydra-control \ + hydra-eval-guile-jobs.in -bin_SCRIPTS = \ - hydra-init \ - hydra-build \ - hydra-evaluator \ - hydra-eval-guile-jobs \ - hydra-queue-runner \ - hydra-server \ - hydra-update-gc-roots \ - nix-prefetch-git \ - nix-prefetch-bzr \ +distributable_scripts = \ + hydra-init \ + hydra-build \ + hydra-evaluator \ + hydra-queue-runner \ + hydra-server \ + hydra-update-gc-roots \ + nix-prefetch-git \ + nix-prefetch-bzr \ nix-prefetch-hg + +bin_SCRIPTS = \ + $(distributable_scripts) \ + hydra-eval-guile-jobs diff --git a/src/script/hydra-eval-guile-jobs b/src/script/hydra-eval-guile-jobs.in old mode 100755 new mode 100644 similarity index 99% rename from src/script/hydra-eval-guile-jobs rename to src/script/hydra-eval-guile-jobs.in index a234a58f..b8405e35 --- a/src/script/hydra-eval-guile-jobs +++ b/src/script/hydra-eval-guile-jobs.in @@ -8,7 +8,7 @@ main="(module-ref (resolve-interface '(hydra-eval-guile-jobs)) 'eval-guile-jobs) unset GUILE_LOAD_PATH unset GUILE_LOAD_COMPILED_PATH -exec ${GUILE:-guile} --no-auto-compile \ +exec ${GUILE:-@GUILE@} --no-auto-compile \ -l "$0" -c "(apply $main (cdr (command-line)))" "$@" !# ;;; Copyright (C) 2012 Ludovic Courtès