BuildSystem: Rework the whole cmake build system

Now files are installed using the install() command instead of manually
copying files to their destinations. This allows automatic recompilation
of headers that did not work previously
This commit is contained in:
2024-06-19 04:20:23 +03:00
parent 318ce5dec8
commit ad6d95ba52
90 changed files with 546 additions and 1074 deletions

View File

@@ -7,6 +7,9 @@ source $BANAN_SCRIPT_DIR/config.sh
FAKEROOT_FILE="$BANAN_BUILD_DIR/fakeroot-context"
run_fakeroot() {
if [ ! -f $FAKEROOT_FILE ]; then
touch $FAKEROOT_FILE
fi
fakeroot -i $FAKEROOT_FILE -s $FAKEROOT_FILE -- /bin/bash -c '$@' bash $@
}
@@ -44,9 +47,14 @@ build_toolchain () {
create_image () {
build_target bootloader
build_target install-sysroot
build_target install
$BANAN_ROOT_DIR/ports/build.sh
build_target package-sysroot
pushd $BANAN_SYSROOT >/dev/null
run_fakeroot tar cf ${BANAN_SYSROOT_TAR} *
popd >/dev/null
$BANAN_SCRIPT_DIR/image.sh "$1"
}
@@ -106,8 +114,12 @@ case $1 in
build_target clean
rm -f $FAKEROOT_FILE
rm -rf $BANAN_SYSROOT
rm -f $BANAN_SYSROOT.tar
rm -f $BANAN_DISK_IMAGE_PATH
;;
distclean)
rm -rf $BANAN_BUILD_DIR
;;
*)
build_target $1
;;