mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-20 10:20:39 +00:00
runtime(-rs): add clean-generated-files target
The new clean-generated-files make target allows for removing the generated files (including the configuration.toml files). The tools/packaging/static-build/shim-v2/build.sh script now uses that target to always force the re-generation of those files. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
parent
36ea1b8ee7
commit
a13eecf7f3
@ -452,12 +452,15 @@ optimize: $(SOURCES) | show-summary show-header
|
|||||||
@RUSTFLAGS="-C link-arg=-s $(EXTRA_RUSTFLAGS) --deny warnings" cargo build --target $(TRIPLE) --$(BUILD_TYPE) $(EXTRA_RUSTFEATURES)
|
@RUSTFLAGS="-C link-arg=-s $(EXTRA_RUSTFLAGS) --deny warnings" cargo build --target $(TRIPLE) --$(BUILD_TYPE) $(EXTRA_RUSTFEATURES)
|
||||||
|
|
||||||
##TARGET clean: clean build
|
##TARGET clean: clean build
|
||||||
clean:
|
clean: clean-generated-files
|
||||||
@cargo clean
|
@cargo clean
|
||||||
@rm -f $(GENERATED_FILES)
|
|
||||||
@rm -f tarpaulin-report.html
|
@rm -f tarpaulin-report.html
|
||||||
@rm -f $(CONFIGS)
|
@rm -f $(CONFIGS)
|
||||||
|
|
||||||
|
##TARGET clean-generated-files: clean generated files
|
||||||
|
clean-generated-files:
|
||||||
|
@rm -f $(GENERATED_FILES)
|
||||||
|
|
||||||
vendor:
|
vendor:
|
||||||
@cargo vendor
|
@cargo vendor
|
||||||
|
|
||||||
|
@ -879,15 +879,16 @@ vendor: handle_vendor
|
|||||||
|
|
||||||
static-checks-build: $(GENERATED_FILES)
|
static-checks-build: $(GENERATED_FILES)
|
||||||
|
|
||||||
clean:
|
clean: clean-generated-files
|
||||||
$(QUIET_CLEAN)rm -f \
|
$(QUIET_CLEAN)rm -f \
|
||||||
$(CONFIGS) \
|
|
||||||
$(GENERATED_FILES) \
|
|
||||||
$(MONITOR) \
|
$(MONITOR) \
|
||||||
$(SHIMV2) \
|
$(SHIMV2) \
|
||||||
$(TARGET) \
|
$(TARGET) \
|
||||||
.git-commit .git-commit.tmp
|
.git-commit .git-commit.tmp
|
||||||
|
|
||||||
|
clean-generated-files:
|
||||||
|
$(QUIET_CLEAN)rm -f $(GENERATED_FILES)
|
||||||
|
|
||||||
show-usage: show-header
|
show-usage: show-header
|
||||||
@printf "• Overview:\n"
|
@printf "• Overview:\n"
|
||||||
@printf "\n"
|
@printf "\n"
|
||||||
@ -904,6 +905,7 @@ show-usage: show-header
|
|||||||
@printf "\tfast-test : run tests with failfast option.\n"
|
@printf "\tfast-test : run tests with failfast option.\n"
|
||||||
@printf "\tcheck : run code checks.\n"
|
@printf "\tcheck : run code checks.\n"
|
||||||
@printf "\tclean : remove built files.\n"
|
@printf "\tclean : remove built files.\n"
|
||||||
|
@printf "\tclean-generated-files : remove generated files.\n"
|
||||||
@printf "\tcontainerd-shim-v2 : only build containerd shim v2.\n"
|
@printf "\tcontainerd-shim-v2 : only build containerd shim v2.\n"
|
||||||
@printf "\tcoverage : run coverage tests.\n"
|
@printf "\tcoverage : run coverage tests.\n"
|
||||||
@printf "\tdefault : same as 'make build' (or just 'make').\n"
|
@printf "\tdefault : same as 'make build' (or just 'make').\n"
|
||||||
|
@ -62,7 +62,8 @@ sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
|||||||
--env CC="${CC}" \
|
--env CC="${CC}" \
|
||||||
-w "${repo_root_dir}/src/runtime-rs" \
|
-w "${repo_root_dir}/src/runtime-rs" \
|
||||||
"${container_image}" \
|
"${container_image}" \
|
||||||
bash -c "git config --global --add safe.directory ${repo_root_dir} && make PREFIX=${PREFIX} QEMUCMD=qemu-system-${arch}"
|
bash -c "git config --global --add safe.directory ${repo_root_dir} && \
|
||||||
|
make clean-generated-files && make PREFIX=${PREFIX} QEMUCMD=qemu-system-${arch}"
|
||||||
|
|
||||||
sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
||||||
--env CROSS_BUILD=${CROSS_BUILD} \
|
--env CROSS_BUILD=${CROSS_BUILD} \
|
||||||
@ -77,7 +78,8 @@ sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
|||||||
sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
||||||
-w "${repo_root_dir}/src/runtime" \
|
-w "${repo_root_dir}/src/runtime" \
|
||||||
"${container_image}" \
|
"${container_image}" \
|
||||||
bash -c "git config --global --add safe.directory ${repo_root_dir} && make PREFIX=${PREFIX} QEMUCMD=qemu-system-${arch} ${EXTRA_OPTS}"
|
bash -c "git config --global --add safe.directory ${repo_root_dir} && \
|
||||||
|
make clean-generated-files && make PREFIX=${PREFIX} QEMUCMD=qemu-system-${arch} ${EXTRA_OPTS}"
|
||||||
|
|
||||||
sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \
|
||||||
-w "${repo_root_dir}/src/runtime" \
|
-w "${repo_root_dir}/src/runtime" \
|
||||||
|
Loading…
Reference in New Issue
Block a user