makefile: refactor "clean" target; add "distclean"
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* clean now just removes the object files, dwo debugging objects, .cmake and intermediary .bin files but keeps CMakeCache and similar * a new target - distclean - is introduced to do what was previously done by "clean", essentially: completely remove the build folders
This commit is contained in:
parent
7f05984946
commit
b14600c352
7
Makefile
7
Makefile
|
@ -14,7 +14,7 @@ v_env = VALGRIND=
|
|||
v_db = $(d_folder)_valgr
|
||||
v_rl = $(r_folder)_valgr
|
||||
|
||||
.PHONY: check tidy build debug release valgrind san test clean
|
||||
.PHONY: check tidy build debug release valgrind san test clean distclean
|
||||
|
||||
debug:
|
||||
if [ ! -d "$(d_folder)" ]; then mkdir -pv $(d_folder); fi
|
||||
|
@ -62,5 +62,8 @@ build: debug
|
|||
test: check build
|
||||
|
||||
clean:
|
||||
find . -iwholename '*cmake*' -not -name CMakeLists.txt -delete
|
||||
@find . -regextype posix-egrep -regex ".*\.(o|dwo|out|bin|cmake)" -delete
|
||||
|
||||
distclean:
|
||||
@find . -iwholename '*cmake*' -not -name CMakeLists.txt -delete
|
||||
|
||||
|
|
Reference in New Issue