-
Notifications
You must be signed in to change notification settings - Fork 144
/
Copy pathci_build.sh
executable file
·46 lines (36 loc) · 1.04 KB
/
ci_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
#!/bin/sh
set -e
if [ -z "${BUILD_DIR}" ] ; then
BUILD_DIR=$(pwd)
fi
echo BUILD_DIR is \"${BUILD_DIR}\"
# Output directory
rm -rf _output
mkdir _output
OWTAR=ow-snapshot.tar.xz
# GCC
mkdir _output/gcc
git clean -x -d -f -e test -e _output -e _watcom -e $OWTAR
make -C country clean
make all COMPILER=gcc
mv -n bin/KGC*.map bin/KGC*.sys _output/gcc/.
mv -n bin/country.sys _output/gcc/.
# GCC share
(cd share && make clobber && env COMPILER=gcc ./build.sh)
mv -n share/share.com _output/gcc/.
mv -n share/share.map _output/gcc/.
# Watcom
if [ ! -d _watcom ] ; then
[ -f $OWTAR ] || wget --no-verbose https://github.com/open-watcom/open-watcom-v2/releases/download/2023-02-01-Build/$OWTAR
mkdir _watcom
(cd _watcom && tar -xf ../$OWTAR)
fi
export PATH=$BUILD_DIR/bin:$PATH:$BUILD_DIR/_watcom/binl64
export WATCOM=$BUILD_DIR/_watcom
mkdir _output/wc
git clean -x -d -f -e test -e _output -e _watcom -e $OWTAR
make -C country clean
make all COMPILER=owlinux
mv -n bin/KWC*.map bin/KWC*.sys _output/wc/.
mv -n bin/country.sys _output/wc/.
echo done