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.
This commit is contained in:
Nico Weber 2023-03-11 20:12:37 -05:00 committed by Linus Groh
parent 952222ec4d
commit 3cff36b7ab
Notes: sideshowbarker 2024-07-16 23:03:22 +09:00
5 changed files with 6 additions and 10 deletions

View file

@ -194,7 +194,7 @@ jobs:
- name: Create Serenity Rootfs - name: Create Serenity Rootfs
if: ${{ matrix.debug-options == 'NORMAL_DEBUG'}} if: ${{ matrix.debug-options == 'NORMAL_DEBUG'}}
working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }} working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }}
run: ninja install && ninja image run: ninja install && ninja qemu-image
- name: Run On-Target Tests - name: Run On-Target Tests
if: ${{ matrix.debug-options == 'NORMAL_DEBUG'}} if: ${{ matrix.debug-options == 'NORMAL_DEBUG'}}
@ -236,6 +236,6 @@ jobs:
run: | run: |
# Running the tests apparently leaves the image sufficiently broken # Running the tests apparently leaves the image sufficiently broken
rm _disk_image rm _disk_image
ninja image ninja qemu-image
/usr/bin/time ../../Meta/export-argsparser-manpages.sh --verify-git-state /usr/bin/time ../../Meta/export-argsparser-manpages.sh --verify-git-state
timeout-minutes: 10 timeout-minutes: 10

View file

@ -73,15 +73,11 @@ add_custom_target(run
# out forcing re-builds when they might not want them. # out forcing re-builds when they might not want them.
add_custom_target(setup-and-run add_custom_target(setup-and-run
COMMAND ${CMAKE_MAKE_PROGRAM} install COMMAND ${CMAKE_MAKE_PROGRAM} install
COMMAND ${CMAKE_MAKE_PROGRAM} image COMMAND ${CMAKE_MAKE_PROGRAM} qemu-image
COMMAND ${CMAKE_MAKE_PROGRAM} run COMMAND ${CMAKE_MAKE_PROGRAM} run
USES_TERMINAL USES_TERMINAL
) )
add_custom_target(image
DEPENDS qemu-image
)
add_custom_target(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" 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" BYPRODUCTS "${CMAKE_BINARY_DIR}/_disk_image"

View file

@ -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 -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-x86_64
cmake --build Build/superbuild-x86_64 cmake --build Build/superbuild-x86_64
cd Build/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: In the initial terminal, one can easily run the test runner script:

View file

@ -65,7 +65,7 @@ jobs:
CCACHE_DIR: '$(SERENITY_CCACHE_DIR)' CCACHE_DIR: '$(SERENITY_CCACHE_DIR)'
- script: | - script: |
ninja install && ninja image ninja install && ninja qemu-image
displayName: 'Create RootFS' displayName: 'Create RootFS'
workingDirectory: $(Build.SourcesDirectory)/Build/${{ parameters.arch }}clang workingDirectory: $(Build.SourcesDirectory)/Build/${{ parameters.arch }}clang

View file

@ -283,7 +283,7 @@ build_image() {
if [ "$SERENITY_RUN" = "limine" ]; then if [ "$SERENITY_RUN" = "limine" ]; then
build_target limine-image build_target limine-image
else else
build_target image build_target qemu-image
fi fi
} }