File: release-compile

package info (click to toggle)
storm-lang 0.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 51,836 kB
  • sloc: ansic: 261,420; cpp: 138,870; sh: 14,877; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (55 lines) | stat: -rwxr-xr-x 1,085 bytes parent folder | download | duplicates (4)
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
#!/bin/bash

arch="$1"
command="$2"
version="$3"
echo "Compiling $version..."


# Update the COMPILER.version file if needed.
TMP_VERSION=${STORM_ROOT}/COMPILER.version
DST_VERSION=${STORM_ROOT}/Compiler/COMPILER.version

echo "core.info" > ${TMP_VERSION}
echo "$version" >> ${TMP_VERSION}

if [[ ! -f ${DST_VERSION} ]]
then
    mv ${TMP_VERSION} ${DST_VERSION}
elif ! diff ${TMP_VERSION} ${DST_VERSION} > /dev/null
then
    mv ${TMP_VERSION} ${DST_VERSION}
else
    rm ${TMP_VERSION}
fi


cd $STORM_ROOT

if [[ "$STORM_USE_COMPAT" == "1" ]]
then
    compat="compat"
else
    compat=""
fi

mm release $compat $command -ne || { echo "Compilation ($arch) failed!"; exit 1; }

releasedir=release
if [[ $command == *64* ]]
then
    releasedir=release64
fi

if [[ $command == *mps* ]]
then
    echo "Done! Running test suite..."
    ${releasedir}/Test_mps --all || { echo "Tests failed ($arch)!"; exit 1; }
    echo "Success!"
elif [[ $command == *smm* ]]
then
    echo "Skipping test suite for SMM."
else
    echo "ERROR: Unknown garbage collector. Command line: ${command}"
    exit 1
fi