-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-efl.sh
executable file
·86 lines (66 loc) · 1.63 KB
/
build-efl.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
set -e
NOTIFY=notify-send
CTAGS=ctags
command -v $NOTIFY &>/dev/null || NOTIFY=:
command -v $CTAGS &>/dev/null || CTAGS=:
JOBS=50
ROOT="$HOME/projects"
PREFIX="$HOME/root"
PROJECTS="efl evas_generic_loaders elementary"
while getopts ":j:p:r:" opt; do
case $opt in
j)
JOBS=$OPTARG
;;
p)
PREFIX=$OPTARG
;;
r)
ROOT=$OPTARG
;;
esac
done
function on_exit {
if [ $? -gt 0 ]; then
TITLE=$PROJ
MSG="FAILED!";
else
TITLE=$0
MSG="That's All Folks!";
fi
echo $MSG
$NOTIFY $TITLE "$MSG"
unset OPTS
}
trap on_exit EXIT
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
declare -A OPTS
OPTS[default]="--prefix=$PREFIX"
OPTS[efl]="--enable-valgrind --enable-debug"
OPTS[elementary]="--disable-build-examples --enable-edbus2 --enable-debug"
cd $ROOT
for PROJ in $PROJECTS; do
cd $PROJ
# Just for convenience
echo "[Updating source tree]"
$NOTIFY $PROJ "Updating source tree"
git remote update --prune
$NOTIFY $PROJ "building"
echo "[Building $PROJ]"
echo "[ Options: ${OPTS[default]} ${OPTS[$PROJ]} ]"
make uninstall &>/dev/null || true
echo "[ Cleaning... ]"
make clean distclean &>/dev/null || true
echo "[ Configuring... ]"
./autogen.sh ${OPTS[default]} ${OPTS[$PROJ]} &>/dev/null
echo "[ Compiling... ]"
make -j$JOBS > /dev/null
echo "[ Installing... ]"
make install &>/dev/null
sudo ldconfig &>/dev/null
$NOTIFY $PROJ "DONE!"
echo "[ Done! ]"
cd ..
done