mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Makefile: ensure 'clean' does not fail if build directory does not exist
This commit is contained in:
parent
5114158090
commit
1ad25369e7
2
Makefile
2
Makefile
@ -468,7 +468,7 @@ validate_module_configs:
|
||||
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
|
||||
|
||||
clean:
|
||||
@find "$(SRC_DIR)/build" -mindepth 1 -maxdepth 1 -type d -exec sh -c "echo {}; cmake --build {} -- clean || rm -rf {}" \; # use generated build system to clean, wipe build directory if it fails
|
||||
@[ ! -d "$(SRC_DIR)/build" ] || find "$(SRC_DIR)/build" -mindepth 1 -maxdepth 1 -type d -exec sh -c "echo {}; cmake --build {} -- clean || rm -rf {}" \; # use generated build system to clean, wipe build directory if it fails
|
||||
@git submodule foreach git clean -dX --force # some submodules generate build artifacts in source
|
||||
|
||||
submodulesclean:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user