chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / bm / bmake / setup-hook.sh
blobacca59004730b666fc28acbc72c4b4006e4c7d56
1 # shellcheck shell=bash disable=SC2086,SC2154,SC2206
3 addMakeFlags() {
4 export prefix="$out"
5 export MANDIR="${!outputMan}/share/man"
6 export MANTARGET=man
7 export BINOWN=
8 export STRIP_FLAG=
11 bmakeBuildPhase() {
12 runHook preBuild
14 local flagsArray=(
15 ${enableParallelBuilding:+-j${NIX_BUILD_CORES}}
16 SHELL="$SHELL"
18 concatTo flagsArray makeFlags makeFlagsArray buildFlags buildFlagsArray
20 nixInfoLog "${FUNCNAME[0]}: flagsArray: ${flagsArray[@]}"
21 bmake ${makefile:+-f $makefile} "${flagsArray[@]}"
23 runHook postBuild
26 bmakeCheckPhase() {
27 runHook preCheck
29 if [ -z "${checkTarget:-}" ]; then
30 #TODO(@oxij): should flagsArray influence make -n?
31 if bmake -n ${makefile:+-f $makefile} check >/dev/null 2>&1; then
32 checkTarget="check"
33 elif bmake -n ${makefile:+-f $makefile} test >/dev/null 2>&1; then
34 checkTarget="test"
38 if [ -z "${checkTarget:-}" ]; then
39 nixInfoLog "${FUNCNAME[0]}: no test target found in bmake, doing nothing"
40 else
41 local flagsArray=(
42 ${enableParallelChecking:+-j${NIX_BUILD_CORES}}
43 SHELL="$SHELL"
45 concatTo flagsArray makeFlags makeFlagsArray checkFlags=VERBOSE=y checkFlagsArray checkTarget
47 nixInfoLog "${FUNCNAME[0]}: flagsArray: ${flagsArray[@]}"
48 bmake ${makefile:+-f $makefile} "${flagsArray[@]}"
51 runHook postCheck
54 bmakeInstallPhase() {
55 runHook preInstall
57 if [ -n "$prefix" ]; then
58 mkdir -p "$prefix"
61 local flagsArray=(
62 ${enableParallelInstalling:+-j${NIX_BUILD_CORES}}
63 SHELL="$SHELL"
65 concatTo flagsArray makeFlags makeFlagsArray installFlags installFlagsArray installTargets=install
67 nixInfoLog "${FUNCNAME[0]}: flagsArray: ${flagsArray[@]}"
68 bmake ${makefile:+-f $makefile} "${flagsArray[@]}"
70 runHook postInstall
73 bmakeDistPhase() {
74 runHook preDist
76 if [ -n "$prefix" ]; then
77 mkdir -p "$prefix"
80 local flagsArray=()
81 concatTo flagsArray distFlags distFlagsArray distTarget=dist
83 nixInfoLog "${FUNCNAME[0]}: flagsArray: ${flagsArray[@]}"
84 bmake ${makefile:+-f $makefile} "${flagsArray[@]}"
86 if [ "${dontCopyDist:-0}" != 1 ]; then
87 mkdir -p "$out/tarballs"
89 # Note: don't quote $tarballs, since we explicitly permit
90 # wildcards in there.
91 cp -pvd ${tarballs:-*.tar.gz} "$out/tarballs"
94 runHook postDist
97 preConfigureHooks+=(addMakeFlags)
99 if [ -z "${dontUseBmakeBuild-}" ] && [ -z "${buildPhase-}" ]; then
100 buildPhase=bmakeBuildPhase
101 nixInfoLog "${FUNCNAME[0]}: set buildPhase to bmakeBuildPhase"
104 if [ -z "${dontUseBmakeCheck-}" ] && [ -z "${checkPhase-}" ]; then
105 checkPhase=bmakeCheckPhase
106 nixInfoLog "${FUNCNAME[0]}: set checkPhase to bmakeCheckPhase"
109 if [ -z "${dontUseBmakeInstall-}" ] && [ -z "${installPhase-}" ]; then
110 installPhase=bmakeInstallPhase
111 nixInfoLog "${FUNCNAME[0]}: set installPhase to bmakeInstallPhase"
114 if [ -z "${dontUseBmakeDist-}" ] && [ -z "${distPhase-}" ]; then
115 distPhase=bmakeDistPhase
116 nixInfoLog "${FUNCNAME[0]}: set distPhase to bmakeDistPhase"