-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathf_TEMPLATE_build.sbn-sh
72 lines (67 loc) · 2.01 KB
/
f_TEMPLATE_build.sbn-sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
set -e
. "${WLB_SCRIPT_FOLDER:-$(dirname "$(readlink -f "$BASH_SOURCE")")}/helpers.sh"
{{GENERAL_BLD_CONFIG_VARS}}
# BLD_CONFIG_BUILD_FOLDER_NAME="myapp2"; #if you want it compiling in a diff folder
# BLD_CONFIG_BUILD_DEBUG=1
function ourmain() {
startcommon;
if test 5 -gt 100; then
echo "Just move the fi down as you want to skip steps, or pass the step to skip to (per below) as the first arg"
fi
if [[ -z $SKIP_STEP || $SKIP_STEP == "checkout" ]]; then
git_clone_and_add_ignore {{GitRepo}} .
fi
{{if ours.enabled HaveOurPatch}}
if [[ -z $SKIP_STEP || $SKIP_STEP == "our_patch" ]]; then
apply_our_repo_patch; # Applies from patches folder repo_BUILD_NAME.patch to the sources
fi
{{- end }}
{{if ours.enabled GNU_LIBS_USED}}
if [[ $BLD_CONFIG_GNU_LIBS_USED -eq "1" ]]; then
if [[ -z $SKIP_STEP || $SKIP_STEP == "gnulib" ]]; then
gnulib_switch_to_master_and_patch;
fi
cd $BLD_CONFIG_SRC_FOLDER
if [[ -z $SKIP_STEP || $SKIP_STEP == "bootstrap" ]]; then
gnulib_add_addl_modules_and_bootstrap;
fi
fi
if [[ $SKIP_STEP == "autoconf" ]]; then #not empty allowed as if we bootstrapped above we dont need to run nautoconf
autoreconf --symlink --verbose --install
SKIP_STEP=""
fi
{{ else if ours.enabled NoGnuLibButAutoconf }}
if [[ -z $SKIP_STEP || $SKIP_STEP == "autoconf" ]]; then
gnulib_ensure_buildaux_scripts_copied
autoreconf --symlink --verbose --install
libtool_fixes
autoreconf --verbose #update for libtool fixes
SKIP_STEP=""
fi
{{- end }}
{{if ours.enabled VCPKG_DEPS}}
if [[ -z $SKIP_STEP || $SKIP_STEP == "vcpkg" ]]; then
vcpkg_install_package
fi
{{ end }}
cd $BLD_CONFIG_SRC_FOLDER
if [[ -z $SKIP_STEP || $SKIP_STEP == "configure" ]]; then
{{-if ! ours.enabled CMAKE_STYLE }}
configure_apply_fixes_and_run;
{{- else }}
cmake_config_run;
{{- end }}
else
setup_build_env;
fi
{{if ! ours.enabled CMAKE_STYLE }}
run_make
make_install
{{else}}
cmake_make
cmake_install
{{end}}
finalcommon;
}
ourmain;