Commit a7bdd229 authored by Emery Hemingway's avatar Emery Hemingway
Browse files

tup: decompose setup hook into more functions

This makes it possible to call the body of the configure and build
phases without calling or changing the order of other hooks.
parent 8c7c922c
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
#!/bin/sh

tupConfigurePhase() {
    runHook preConfigure

tupConfigure() {
    echo -n CONFIG_TUP_ARCH= >> tup.config
    case "$system" in
    "i686-*")      echo i386 >> tup.config;;
@@ -20,7 +18,11 @@ tupConfigurePhase() {

    tup init
    tup generate --verbose tupBuild.sh
}

tupConfigurePhase() {
    runHook preConfigure
    tupConfigure
    runHook postConfigure
}

@@ -28,14 +30,15 @@ if [ -z "${dontUseTupConfigure-}" -a -z "${configurePhase-}" ]; then
    configurePhase=tupConfigurePhase
fi


tupBuildPhase() {
    runHook preBuild

tupBuild() {
    pushd .
    ./tupBuild.sh
    popd
}

tupBuildPhase() {
    runHook preBuild
    tupBuild
    runHook postBuild
}

+0 −2
Original line number Diff line number Diff line
@@ -41195,8 +41195,6 @@ with pkgs;
  tp-auto-kbbl = callPackage ../tools/system/tp-auto-kbbl { };
  tup = callPackage ../development/tools/build-managers/tup { };
  turtle-build = callPackage ../development/tools/build-managers/turtle-build { };
  tusk = callPackage ../applications/office/tusk { };