-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·60 lines (49 loc) · 1.74 KB
/
build.sh
File metadata and controls
executable file
·60 lines (49 loc) · 1.74 KB
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
#!/bin/bash
# Copyright 2012 Alexander Lochmann
#
# This file is part of SystemTap4Android.
#
# SystemTap4Android is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SystemTap4Android is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SystemTap4Android. If not, see <http://www.gnu.org/licenses/>.
CUR_DIR=`pwd`
TOOLS_DIR=${CUR_DIR}"/tools"
ANDROID_BUILD_OUTPUT="${SRC_DIR}/android_build_out.txt"
TOOLS_OUTPUT="${TOOLS_DIR}/make_out.txt"
BUILDSCRIPT_ANDROID="./build_android.sh"
cd ${SRC_DIR}
if [ -e "Makefile" ];
then
echo "Workspace already configured. Cleaning it..."
make distclean > /dev/null 2>&1
fi
echo "Starting buildscript for Android..."
${BUILDSCRIPT_ANDROID} > ${ANDROID_BUILD_OUTPUT} 2>&1
if [ $? -gt 0 ];
then
echo "Error compiling SystemTap for Android. For further information look at ${ANDROID_BUILD_OUTPUT}" >&2
cd ${PWD}
exit 1
fi
echo "Building stapandroid tool..."
echo "make -C ${TOOLS_DIR}/stapandroid" >> ${TOOLS_OUTPUT}
make -C ${TOOLS_DIR}/stapandroid >> ${TOOLS_OUTPUT} 2>&1
if [ $? -gt 0 ];
then
echo "Error compiling stapandroid control tool. For further information look at ${TOOLS_OUTPUT}" >&2
cd ${PWD}
exit 1
fi
echo "Information about every step during the build process is located at ${SRC_DIR}:"
echo "Android binaries: ${ANDROID_BUILD_OUTPUT}"
echo "tools: ${TOOLS_OUT}"
cd ${PWD}