File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -36,19 +36,23 @@ help:
36
36
large_test run the complete battery of test before merging changes\n \
37
37
"
38
38
39
- _init :
39
+ _init : clean
40
40
mkdir -p $(ODIN_BUILD_DIR )
41
41
42
42
clean :
43
43
$(RM ) -f $(ODIN_BUILD_DIR ) /.* .build
44
44
$(RM ) -Rf $(BUILD_DIR ) /CMakeCache.txt
45
45
$(RM ) -Rf $(BUILD_DIR ) /ODIN_II
46
46
47
- _build_it :
47
+ define _build_it_gen
48
+ _build_it_$(1 ) : _set_$(1 )
48
49
cd $(BUILD_DIR ) &&\
49
50
$(BUILDER )
50
51
51
- $(ODIN_BUILD_DIR ) /.% .build : clean _init
52
+ $(1 ) : _build_it_$(1 )
53
+ endef
54
+
55
+ $(ODIN_BUILD_DIR ) /.% .build : _init
52
56
touch $@
53
57
54
58
_set_build : $(ODIN_BUILD_DIR ) /.regular.build
@@ -71,15 +75,8 @@ _set_clang_tidy: $(ODIN_BUILD_DIR)/.tidy.build
71
75
cd $(BUILD_DIR ) && \
72
76
cmake $(CMAKE_GEN_ARGS ) $(CMAKE_ARGS ) -DODIN_TIDY=on ..
73
77
74
- build : _set_build _build_it
75
-
76
- debug : _set_debug _build_it
77
-
78
- warn : _set_warn _build_it
79
-
80
- gcov : _set_gcov _build_it
81
-
82
- clang_tidy : _set_clang_tidy _build_it
78
+ BUILD_IT_TARGETS = build debug warn gcov clang_tidy
79
+ $(foreach t,$(BUILD_IT_TARGETS), $(eval $(call _build_it_gen,$(t))))
83
80
84
81
scrub :
85
82
find SRC/ -type f \( -iname \* .gcno -or -iname \* .gcda -or -iname \* .gcov \) -exec rm -f {} \;
You can’t perform that action at this time.
0 commit comments