FreeDOS/ci_build.sh

47 lines
1.0 KiB
Bash
Raw Normal View History

#!/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
2021-10-08 00:11:57 +02:00
mkdir _output/gcc
git clean -x -d -f -e test -e _output -e _watcom -e $OWTAR
2021-12-30 17:30:29 +01:00
make -C country clean
make all COMPILER=gcc
2021-10-08 00:11:57 +02:00
mv -n bin/KGC*.map bin/KGC*.sys _output/gcc/.
2021-12-30 17:30:29 +01:00
mv -n bin/country.sys _output/gcc/.
# GCC share
(cd share && make clobber && env COMPILER=gcc ./build.sh)
2021-10-08 00:11:57 +02:00
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
2021-10-08 00:11:57 +02:00
mkdir _output/wc
git clean -x -d -f -e test -e _output -e _watcom -e $OWTAR
2021-12-30 17:30:29 +01:00
make -C country clean
make all COMPILER=owlinux
2021-10-08 00:11:57 +02:00
mv -n bin/KWC*.map bin/KWC*.sys _output/wc/.
2021-12-30 17:30:29 +01:00
mv -n bin/country.sys _output/wc/.
2021-01-09 01:00:25 +01:00
echo done