-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfpc
executable file
·44 lines (40 loc) · 1.08 KB
/
fpc
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
#! /bin/sh
# Run the tests with FPC
rm -fr fpc-build
mkdir fpc-build
cd fpc-build
if test -z "$FPC";
then
FPC="/usr/lib/fpc/*/ppc*"
fi
for f in ../*.pas;
do
# Try with different versions and modes until something works
# *nix only at the moment
for fpc in $FPC;
do
# Try to do most things in default mode
# Go for EP next, for things not implemented in default mode
# ISO should be last (and only for versions without an EP mode)
# Primarily to see the lowest version that can handle these things, and in which mode
for mode in fpc extendedpascal iso;
do
$fpc -FE. -FU. -M$mode $f
err=$?
if test "$err" = "0";
then
version=`echo $fpc | grep -Po '\d+\.\d+\.\d+'`
if test -z "$version";
then
version=$($fpc -iV)
fi
echo "$f ($version, $mode)" >> success
break 2;
fi
done
done
if test "$err" != "0";
then
echo "$f" >> failure
fi
done