diff --git a/Makefile b/Makefile index 0ce2a03e..3d7f0399 100644 --- a/Makefile +++ b/Makefile @@ -47,13 +47,13 @@ scripts_dir:=$(cur_dir)/scripts ci_dir:=$(cur_dir)/ci src_dirs:= -include $(ci_dir)/ci.mk +-include $(ci_dir)/ci.mk targets:=$(MAKECMDGOALS) ifeq ($(targets),) targets:=all endif -non_build_targets+=ci clean +non_build_targets+=ci cleanc build_targets:=$(strip $(foreach target, $(targets), \ $(if $(findstring $(target),$(non_build_targets)),,$(target)))) @@ -327,6 +327,8 @@ clean: # Instantiate CI rules +ifneq ($(wildcard $(ci_dir)/ci.mk),) + all_files= $(realpath \ $(cur_dir)/Makefile \ $(call list_dir_files_recursive, $(src_dir), *) \ @@ -342,3 +344,5 @@ $(call ci, format, $(all_c_files)) .PHONY: ci ci: license-check format-check + +endif