aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/osmo-build-dep.sh
blob: 6e9ef8619411ee28047ad77682c51b2bf520d998 (plain)
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
#!/bin/sh

project="$1"
branch="$2"
cfg="$3"

set -e

set +x
example="
Example:
  export deps=\$PWD/deps inst=\$PWD/inst
  mkdir -p \$deps
  mkdir -p \$inst
  MAKE=make PARALLEL_MAKE=-j8 osmo-build-dep.sh libosmocore
"

echo
echo
echo
echo " =============================== $project ==============================="
echo
if [ -z "$project" ]; then
	echo "internal failure: \$project is empty$example"
	exit 1
fi
if [ -z "$deps" ]; then
	echo "internal failure: \$deps is empty$example"
	exit 1
fi
if [ -z "$inst" ]; then
	echo "internal failure: \$inst is empty$example"
	exit 1
fi
if [ -z "$MAKE" ]; then
	echo "internal failure: \$MAKE is empty$example"
	exit 1
fi
set -x

mkdir -p "$deps"
cd "$deps"
osmo-deps.sh "$project" "$branch"
cd "$project"

autoreconf --install --force
./configure --prefix="$inst" $cfg
$MAKE $PARALLEL_MAKE install