From 3cff36b7ab427e040c9cac80a41cde9cfa0ac75d Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 11 Mar 2023 20:12:37 -0500 Subject: [PATCH] Meta+CMake: Remove "image" ninja target in favor of "qemu-image" "image" was an alias for "qemu-image". I want to add an `image` userland utility, which clashes with that shortname. So remove the existing "image" target. It was just an alias for "qemu-image". If you use serenity.sh to build, nothing changes. This only affects you if you run ninja manually -- you now have to say `ninja qemu-image` to build the disk image. --- .github/workflows/cmake.yml | 4 ++-- CMakeLists.txt | 6 +----- Documentation/RunningTests.md | 2 +- Meta/Azure/Serenity.yml | 2 +- Meta/serenity.sh | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7762519296ca9f..575f552252708d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -194,7 +194,7 @@ jobs: - name: Create Serenity Rootfs if: ${{ matrix.debug-options == 'NORMAL_DEBUG'}} working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }} - run: ninja install && ninja image + run: ninja install && ninja qemu-image - name: Run On-Target Tests if: ${{ matrix.debug-options == 'NORMAL_DEBUG'}} @@ -236,6 +236,6 @@ jobs: run: | # Running the tests apparently leaves the image sufficiently broken rm _disk_image - ninja image + ninja qemu-image /usr/bin/time ../../Meta/export-argsparser-manpages.sh --verify-git-state timeout-minutes: 10 diff --git a/CMakeLists.txt b/CMakeLists.txt index d316febfda19d9..f2543506e3e0e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,15 +73,11 @@ add_custom_target(run # out forcing re-builds when they might not want them. add_custom_target(setup-and-run COMMAND ${CMAKE_MAKE_PROGRAM} install - COMMAND ${CMAKE_MAKE_PROGRAM} image + COMMAND ${CMAKE_MAKE_PROGRAM} qemu-image COMMAND ${CMAKE_MAKE_PROGRAM} run USES_TERMINAL ) -add_custom_target(image - DEPENDS qemu-image -) - add_custom_target(qemu-image COMMAND "${CMAKE_COMMAND}" -E env "SERENITY_SOURCE_DIR=${SerenityOS_SOURCE_DIR}" "SERENITY_ARCH=${SERENITY_ARCH}" "SERENITY_TOOLCHAIN=${CMAKE_CXX_COMPILER_ID}" "LLVM_VERSION=${CMAKE_CXX_COMPILER_VERSION}" "${SerenityOS_SOURCE_DIR}/Meta/build-image-qemu.sh" BYPRODUCTS "${CMAKE_BINARY_DIR}/_disk_image" diff --git a/Documentation/RunningTests.md b/Documentation/RunningTests.md index 2ff64d72968104..1fe29bc1d6d4ed 100644 --- a/Documentation/RunningTests.md +++ b/Documentation/RunningTests.md @@ -79,7 +79,7 @@ For completeness, a basic on-target test run will need the SerenityOS image buil cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-x86_64 cmake --build Build/superbuild-x86_64 cd Build/x86_64 -ninja install && ninja image && ninja run +ninja install && ninja qemu-image && ninja run ``` In the initial terminal, one can easily run the test runner script: diff --git a/Meta/Azure/Serenity.yml b/Meta/Azure/Serenity.yml index 76a9180d53eaf8..43bc1e82fcea91 100644 --- a/Meta/Azure/Serenity.yml +++ b/Meta/Azure/Serenity.yml @@ -65,7 +65,7 @@ jobs: CCACHE_DIR: '$(SERENITY_CCACHE_DIR)' - script: | - ninja install && ninja image + ninja install && ninja qemu-image displayName: 'Create RootFS' workingDirectory: $(Build.SourcesDirectory)/Build/${{ parameters.arch }}clang diff --git a/Meta/serenity.sh b/Meta/serenity.sh index eb985da2b649d1..157926af5a4b21 100755 --- a/Meta/serenity.sh +++ b/Meta/serenity.sh @@ -283,7 +283,7 @@ build_image() { if [ "$SERENITY_RUN" = "limine" ]; then build_target limine-image else - build_target image + build_target qemu-image fi }