move to new build system

This commit is contained in:
2024-06-06 14:17:47 -05:00
parent 88d8bf63f5
commit aee68520b3
563 changed files with 4283 additions and 361439 deletions

View File

@ -1,28 +1,12 @@
#!/bin/bash
NUM_JOBS=${MY_NUM_JOBS}
if [[ -z "${NUM_JOBS}" ]]; then
NUM_JOBS=$(getconf _NPROCESSORS_ONLN 2> /dev/null || getconf NPROCESSORS_ONLN 2> /dev/null || echo 1)
if [ "${NUM_JOBS}" -gt "2" ]; then
NUM_JOBS=$(expr ${NUM_JOBS} - 2)
elif [ "${NUM_JOBS}" -gt "1" ]; then
NUM_JOBS=$(expr ${NUM_JOBS} - 1)
fi
fi
CURRENT_DIR=$(dirname "$0")
CURRENT_DIR=$(realpath ${CURRENT_DIR})
BUILD_TYPE=$1
BUILD_CLEAN=$2
. "${CURRENT_DIR}/env.sh" "$1" "$2" "$3" 1 1
SOURCE_DIR=$(dirname "$0")/..
SOURCE_DIR=$(realpath ${SOURCE_DIR})
DOCKER_NAME=mingw64
DOCKER_CONTAINER=${PROJECT_APP_NAME}_${DOCKER_NAME}
DOCKER_TAG=${PROJECT_APP_NAME}:${DOCKER_NAME}
NAME=mingw64
BUILD_ARCH=64_bit
docker stop repertory_${NAME}
docker rm repertory_${NAME}
docker build --build-arg NUM_JOBS=${MY_NUM_JOBS} -t repertory:${NAME} - < ${SOURCE_DIR}/docker/${BUILD_ARCH}/${NAME} &&
docker run -td -u $(id -u):$(id -g) --name repertory_${NAME} -w ${SOURCE_DIR} -v ${SOURCE_DIR}:${SOURCE_DIR}:rw,z repertory:${NAME} &&
docker exec repertory_${NAME} /bin/bash -c "${SOURCE_DIR}/scripts/make_common.sh ${BUILD_TYPE} \"${BUILD_CLEAN}\" 1"
docker stop repertory_${NAME}
docker rm repertory_${NAME}
. "${CURRENT_DIR}/docker_common.sh" || exit 1