Debian Codegraph @

automation/eclair_analysis/prepare.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # Stop immediately if any executed command has exit status different from 0.
3 set -e
4
5 script_name="$(basenamescip-shell system . . basename. "$0")"
6 script_dir="$(
7 cd "$(dirnamescip-shell system . . dirname. "$0")"
8 echoscip-shell system . . echo. "${PWD}"
9 )"
10
11 fatalscip-shell shell xen 4.20.2+37-g61ff35323e-1 fatal().() {
12 echoscip-shell system . . echo. "${script_name}: $*" >&2
13 exit 1
14 }
15
16 usagescip-shell shell xen 4.20.2+37-g61ff35323e-1 usage().() {
17 fatalscip-shell shell xen 4.20.2+37-g61ff35323e-1 fatal(). "Usage: ${script_name}"
18 }
19
20 if [scip-shell system . . `[`. $# -ne 1 ]; then
21 usagescip-shell shell xen 4.20.2+37-g61ff35323e-1 usage().
22 exit 1
23 fi
24
25 export XEN_TARGET_ARCH
26
27 if [scip-shell system . . `[`. "$1" = "X86_64" ]; then
28 CONFIG_FILE="${script_dir}/xen_x86_config"
29 XEN_TARGET_ARCH=x86_64
30 elif [scip-shell system . . `[`. "$1" = "ARM64" ]; then
31 CONFIG_FILE="${script_dir}/xen_arm_config"
32 XEN_TARGET_ARCH=arm64
33 else
34 fatalscip-shell shell xen 4.20.2+37-g61ff35323e-1 fatal(). "Unknown configuration: $1"
35 fi
36
37 (
38 ./configure
39 cpscip-shell system . . cp. "${CONFIG_FILE}" xen/.config
40 makescip-shell system . . make. clean
41 findscip-shell system . . find. . -type f -name "*.safparse" -print -delete
42 "${script_dir}/build.sh" "$1"
43 # Generate additional configuration files
44 "${script_dir}/ECLAIR/generate_ecl.sh"
45 makescip-shell system . . make. clean
46 cd xen
47 makescip-shell system . . make. -f "${script_dir}/Makefile.prepare" prepare
48 # Translate the /* SAF-n-safe */ comments into ECLAIR CBTs
49 scripts/xen-analysis.py --run-eclair --no-build --no-clean
50 # Translate function-properties.json into ECLAIR properties
51 python3scip-shell system . . python3. "${script_dir}/propertyparser.py"
52 )