/
runmeq.sh
executable file
·71 lines (51 loc) · 1.38 KB
/
runmeq.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
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# mrv2
# Copyright Contributors to the mrv2 Project. All rights reserved.
#
#
# Wrap up script to compile just mrv2, do the documenting and packaging.
#
#
if [[ ! $RUNME ]]; then
. etc/build_dir.sh
else
. etc/functions.sh
fi
echo "BUILD_DIR=${BUILD_DIR}"
dir=$BUILD_DIR/mrv2/src/mrv2-build
if [[ ! -d $dir ]]; then
echo "mrv2 build directory:"
echo $dir
echo "does not exist."
echo "Please run:"
echo " $ runme.sh [sameflags]"
exit 1
fi
if [[ "$CMAKE_TARGET" == "package" ]]; then
# Needed to to force a relink and update build info.
touch mrv2/lib/mrvWidgets/mrvVersion.cpp
fi
if [[ "$CMAKE_TARGET" == "" ]]; then
CMAKE_TARGET=install
fi
if [[ $CMAKE_TARGET == "package" || $CMAKE_TARGET == "install" ]]; then
#
# First, generate the translations and install them
#
cd $dir
run_cmd cmake --build . $FLAGS --config $CMAKE_BUILD_TYPE -t mo
run_cmd cmake --build . $FLAGS --config $CMAKE_BUILD_TYPE -t install
cd -
fi
if [[ "$CMAKE_TARGET" == doc* ]]; then
. ./etc/sphinx_install.sh # Install Sphinx python modules
cd $dir
run_cmd cmake --build . $FLAGS --config $CMAKE_BUILD_TYPE -t doc
export CMAKE_TARGET=install
cd -
fi
cd $dir
run_cmd cmake --build . $FLAGS --config $CMAKE_BUILD_TYPE -t ${CMAKE_TARGET}
cd -
. etc/build_end.sh