Debian Codegraph @

testing/guestbin/swan-build

raw
1 #!/bin/sh
2
3 # we run with -x so : works instead of echo for output (not logging)
4 set -eux
5
6 if [ -r testing/guestbin/swan-build ]; then
7 cat <<EOF
8
9 ${PWD} is a top-level source directory.
10 Not CDing to /source
11
12 EOF
13 else
14 cd /source
15 fi
16
17 if [ -f /usr/libexec/ipsec/pluto ]; then
18 : ABORT: existing pluto found at /usr/libexec/ipsec/pluto
19 exit 1
20 fi
21
22 # we don't trust all makefile dependencies, esp lib/
23 rm -rf $(make showobjdir) modobj
24
25 targets="base module"
26 echo ">>> $0 'make $targets' on $(hostname) at $(date)" >>compile-log.txt
27 if make "$@" $targets >>compile-log.txt 2>&1; then
28 : 'make $targets' success
29 else
30 status=$?
31 tail -20 compile-log.txt
32 : 'make $targets' failed: ${status}\; see compile-log.txt for details
33 exit ${status}
34 fi
35
36 echo "$0 finished on $(hostname) at $(date)"