File: build.sh

package info (click to toggle)
distcc 3.4%2Breally3.4-13
  • links: PTS
  • area: main
  • in suites: sid
  • size: 4,740 kB
  • sloc: ansic: 27,888; python: 6,460; sh: 4,330; makefile: 912; perl: 68
file content (27 lines) | stat: -rwxr-xr-x 768 bytes parent folder | download | duplicates (5)
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
#!/bin/bash

set -e # exit immediately if a command returns with a nonzero exit code

echo "*** Building distcc/base image"
docker build -t distcc/base -f base/Dockerfile base

if [ $# -eq 0 ]; then
  compilers=("gcc-4.8" "gcc-5" "clang-3.8")
else
  compilers=("$1")
fi

for compiler in "${compilers[@]}"
do
  echo "*** Building distcc/$compiler image"
  docker build -t distcc/$compiler -f compilers/Dockerfile.$compiler .
done

echo "*** Building distcc"
for compiler in "${compilers[@]}"
do
  echo "*** Building distcc with distcc/$compiler image"
  set -x
  docker run --rm -it -v /tmp:/tmp -v `pwd`/..:/src:rw -w /src distcc/$compiler bash -c "./autogen.sh && ./configure && make clean && make && make install && make check" &> distcc-$compiler.log
  set +x
done