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.
This commit is contained in:
Emery Hemingway
2024-01-04 06:24:03 +00:00
parent 8c7c922cc7
commit a7bdd229cd
4 changed files with 10 additions and 9 deletions
@@ -1,8 +1,6 @@
#!/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
}
-2
View File
@@ -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 { };