-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathbuild.sh
executable file
·70 lines (61 loc) · 1.22 KB
/
build.sh
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
set -e
make
ROOT="$PWD"
if [ -e build1 ] || [ -e build2 ] || [ -e build3 ]; then
echo >&2 "Build directories already exist, delete them using 'make clean' first."
exit 1
fi
mkdir build1 build2 build3
function rename {
for i in *.$1; do
mv $i ${i%.$1}.$2
done
}
function compile_everything {
../norebo ORP.Compile \
Norebo.Mod/s \
Kernel.Mod/s \
FileDir.Mod/s \
Files.Mod/s \
Modules.Mod/s \
Fonts.Mod/s \
Texts.Mod/s \
RS232.Mod/s \
Oberon.Mod/s \
CoreLinker.Mod/s \
ORS.Mod/s \
ORB.Mod/s \
ORG.Mod/s \
ORP.Mod/s \
ORTool.Mod/s
rename rsc rsx
../norebo CoreLinker.LinkSerial Modules InnerCore
rename rsx rsc
}
echo '=== Stage 1 ==='
cd build1
export NOREBO_PATH="$ROOT/Norebo:$ROOT/Oberon:$ROOT/Bootstrap"
compile_everything
rename smb smx
cd ..
echo
echo '=== Stage 2 ==='
cd build2
export NOREBO_PATH="$ROOT/Norebo:$ROOT/Oberon:$ROOT/build1"
compile_everything
rename smb smx
cd ..
echo
echo '=== Stage 3 ==='
cd build3
export NOREBO_PATH="$ROOT/Norebo:$ROOT/Oberon:$ROOT/build2"
compile_everything
cd ..
# Unhide the symbol files
cd build2
rename smx smb
cd ..
echo
echo '=== Verification === '
diff -r build2 build3 && echo 'OK: Stage 2 and Stage 3 are identical.'