diff --git a/ci_build.sh b/ci_build.sh index c38fdea9..d4bfdce2 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -26,8 +26,6 @@ else pipx install meson export PATH=${HOME}/.local/bin:${PATH} - mkdir build - cd build || (echo "Could not switch into build dir" && exit 1) - PREFIX=${INST} ../configure.meson - meson compile --verbose + PREFIX=${INST} ./configure.meson build + meson compile --verbose -C build fi diff --git a/configure.meson b/configure.meson index ccb6230a..0400ca84 100755 --- a/configure.meson +++ b/configure.meson @@ -2,14 +2,11 @@ # set -xv -if [ -f meson.build ]; then - echo -e "Create a build dir first:" - echo -e "\tmkdir build" - echo -e "\tcd build" - echo -e "\t../$(basename $0)" - echo "Bye!" - exit 0 +if [ -z "$1" ] ; then + echo "Usage: ./$(basename $0) builddir" + exit 1 fi +BLD="$1" TOP=$(dirname "$0") @@ -21,10 +18,10 @@ meson setup --prefix ${PREFIX} \ --native-file $TOP/fdpp/toolchain.ini \ --cross-file $TOP/fdpp/toolchain.ini \ --cross-file $TOP/fdpp/kernel/toolchain.ini \ - --native-file $TOP/fdpp/kernel/toolchain.ini . $TOP + --native-file $TOP/fdpp/kernel/toolchain.ini $BLD $TOP [ "$?" = "0" ] || exit 1 echo echo "Done configure" -echo "Now run \"meson compile --verbose\" to build" -echo "After that you can do \"sudo meson install\" to install" +echo "Now run \"meson compile --verbose -C $BLD\" to build" +echo "After that you can do \"sudo meson install -C $BLD\" to install"