File: clean-build.sh

package info (click to toggle)
anbox 0.0~git20190124-1
  • links: PTS, VCS
  • area: contrib
  • in suites: buster
  • size: 22,000 kB
  • sloc: cpp: 76,190; ansic: 7,434; sh: 1,350; xml: 818; java: 780; python: 390; makefile: 35; lisp: 7
file content (59 lines) | stat: -rwxr-xr-x 1,034 bytes parent folder | download
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
#!/bin/sh

set -ex

apt-get update -qq
apt-get install -qq -y \
  build-essential \
  cmake \
  cmake-data \
  cmake-extras \
  debhelper \
  dbus \
  git \
  google-mock \
  libboost-dev \
  libboost-filesystem-dev \
  libboost-log-dev \
  libboost-iostreams-dev \
  libboost-program-options-dev \
  libboost-system-dev \
  libboost-test-dev \
  libboost-thread-dev \
  libcap-dev \
  libegl1-mesa-dev \
  libgles2-mesa-dev \
  libglm-dev \
  libgtest-dev \
  liblxc1 \
  libproperties-cpp-dev \
  libprotobuf-dev \
  libsdl2-dev \
  libsdl2-image-dev \
  libsystemd-dev \
  lxc-dev \
  pkg-config \
  protobuf-compiler

apt-get clean

cd /anbox

cleanup() {
  # In cases where anbox comes directly from a checked out Android
  # build environment we miss some symlinks which are present on
  # the host and don't have a valid git repository in that case.
  if [ -d .git ] ; then
    git clean -fdx .
    git reset --hard
  fi
}

cleanup

mkdir build || rm -rf build/*
cd build
cmake ..
VERBOSE=1 make -j10
VERBOSE=1 make test
cd ..