Graydon Hoare | 9c6e7e6 | 2011-03-16 16:17:32 | [diff] [blame] | 1 | ###################################################################### |
| 2 | # Residual auto-configuration |
| 3 | ###################################################################### |
| 4 | |
| 5 | include config.mk |
Graydon Hoare | 40624e3 | 2011-05-01 20:18:52 | [diff] [blame] | 6 | MKFILES := Makefile config.mk $(wildcard $(CFG_SRC_DIR)/mk/*.mk) |
Graydon Hoare | 7da64ae | 2011-08-05 01:26:54 | [diff] [blame] | 7 | MKFILES += $(CFG_SRC_DIR)/src/rt/libuv/Makefile |
| 8 | MKFILES += $(wildcard $(CFG_SRC_DIR)/src/rt/libuv/*.mk) |
Graydon Hoare | 9c6e7e6 | 2011-03-16 16:17:32 | [diff] [blame] | 9 | |
| 10 | ifneq ($(MAKE_RESTARTS),) |
| 11 | CFG_INFO := $(info cfg: make restarts: $(MAKE_RESTARTS)) |
| 12 | endif |
| 13 | |
Graydon Hoare | 1321580 | 2011-09-21 18:24:59 | [diff] [blame^] | 14 | CFG_INFO := $(info cfg: shell host triple $(CFG_HOST_TRIPLE)) |
| 15 | CFG_INFO := $(info cfg: llvm host triple $(CFG_LLVM_TRIPLE)) |
Graydon Hoare | 9c6e7e6 | 2011-03-16 16:17:32 | [diff] [blame] | 16 | |
Graydon Hoare | cae703c | 2011-04-08 22:44:41 | [diff] [blame] | 17 | ifdef CFG_DISABLE_OPTIMIZE |
Graydon Hoare | 19ebc0f | 2011-04-08 23:29:19 | [diff] [blame] | 18 | $(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE)) |
Patrick Walton | c52fb52 | 2011-04-29 17:23:07 | [diff] [blame] | 19 | CFG_RUSTC_FLAGS := |
Graydon Hoare | cae703c | 2011-04-08 22:44:41 | [diff] [blame] | 20 | else |
Patrick Walton | c52fb52 | 2011-04-29 17:23:07 | [diff] [blame] | 21 | CFG_RUSTC_FLAGS := -O |
Graydon Hoare | cae703c | 2011-04-08 22:44:41 | [diff] [blame] | 22 | endif |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 23 | |
Patrick Walton | 3f77e7d | 2011-04-25 21:20:28 | [diff] [blame] | 24 | ifdef SAVE_TEMPS |
Marijn Haverbeke | 6b11f6c | 2011-04-26 18:32:08 | [diff] [blame] | 25 | CFG_RUSTC_FLAGS += --save-temps |
Patrick Walton | 3f77e7d | 2011-04-25 21:20:28 | [diff] [blame] | 26 | endif |
Patrick Walton | 648c4ae | 2011-04-29 18:55:32 | [diff] [blame] | 27 | ifdef TIME_PASSES |
| 28 | CFG_RUSTC_FLAGS += --time-passes |
| 29 | endif |
Brian Anderson | 2752284 | 2011-06-19 00:26:41 | [diff] [blame] | 30 | ifdef TIME_LLVM_PASSES |
| 31 | CFG_RUSTC_FLAGS += --time-llvm-passes |
| 32 | endif |
Patrick Walton | 9aeb679 | 2011-04-29 19:16:14 | [diff] [blame] | 33 | ifdef NO_TYPESTATE |
| 34 | CFG_RUSTC_FLAGS += --no-typestate |
| 35 | endif |
Patrick Walton | 404db4d | 2011-05-11 00:48:49 | [diff] [blame] | 36 | ifdef DEBUG |
| 37 | CFG_RUSTC_FLAGS += -g |
| 38 | endif |
Patrick Walton | 3f77e7d | 2011-04-25 21:20:28 | [diff] [blame] | 39 | |
Graydon Hoare | 40624e3 | 2011-05-01 20:18:52 | [diff] [blame] | 40 | # platform-specific auto-configuration |
| 41 | include $(CFG_SRC_DIR)/mk/platform.mk |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 42 | |
Brian Anderson | cad8c73 | 2011-05-14 03:20:34 | [diff] [blame] | 43 | # Run the stage1/2 compilers under valgrind |
| 44 | ifdef VALGRIND_COMPILE |
| 45 | CFG_VALGRIND_COMPILE :=$(CFG_VALGRIND) |
| 46 | else |
| 47 | CFG_VALGRIND_COMPILE := |
| 48 | endif |
| 49 | |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 50 | CFG_RUNTIME :=$(call CFG_LIB_NAME,rustrt) |
Graydon Hoare | 7ac885e | 2011-03-22 06:06:42 | [diff] [blame] | 51 | CFG_RUSTLLVM :=$(call CFG_LIB_NAME,rustllvm) |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 52 | CFG_STDLIB :=$(call CFG_LIB_NAME,std) |
Brian Anderson | 5fb9cad | 2011-07-01 06:16:01 | [diff] [blame] | 53 | CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc) |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 54 | |
Rafael Ávila de Espíndola | 88894b6 | 2011-07-20 20:02:36 | [diff] [blame] | 55 | ifdef CFG_DISABLE_SHAREDSTD |
Brian Anderson | 6fc3316 | 2011-07-22 06:54:48 | [diff] [blame] | 56 | CFG_STDLIB_DEFAULT = $(1)/lib/libstd.rlib |
Rafael Ávila de Espíndola | 88894b6 | 2011-07-20 20:02:36 | [diff] [blame] | 57 | else |
Brian Anderson | 6fc3316 | 2011-07-22 06:54:48 | [diff] [blame] | 58 | CFG_STDLIB_DEFAULT = $(2)/$(CFG_STDLIB) |
Rafael Ávila de Espíndola | 88894b6 | 2011-07-20 20:02:36 | [diff] [blame] | 59 | endif |
| 60 | |
Graydon Hoare | 1e03f00 | 2011-05-06 18:21:51 | [diff] [blame] | 61 | # version-string calculation |
| 62 | CFG_GIT_DIR := $(CFG_SRC_DIR).git |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 63 | CFG_VERSION = prerelease |
Graydon Hoare | 0a8f9a3 | 2011-06-13 21:45:26 | [diff] [blame] | 64 | ifneq ($(wildcard $(CFG_GIT)),) |
Graydon Hoare | 1e03f00 | 2011-05-06 18:21:51 | [diff] [blame] | 65 | ifneq ($(wildcard $(CFG_GIT_DIR)),) |
| 66 | CFG_VERSION += $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \ |
| 67 | --pretty=format:'(%h %ci)') |
| 68 | endif |
Graydon Hoare | 0a8f9a3 | 2011-06-13 21:45:26 | [diff] [blame] | 69 | endif |
Graydon Hoare | 1e03f00 | 2011-05-06 18:21:51 | [diff] [blame] | 70 | |
Graydon Hoare | 94731fa | 2011-03-30 04:45:09 | [diff] [blame] | 71 | ifdef CFG_DISABLE_VALGRIND |
| 72 | $(info cfg: disabling valgrind (CFG_DISABLE_VALGRIND)) |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 73 | CFG_VALGRIND := |
Graydon Hoare | 9c6e7e6 | 2011-03-16 16:17:32 | [diff] [blame] | 74 | endif |
Patrick Walton | 518e2d2 | 2011-05-06 01:11:40 | [diff] [blame] | 75 | ifdef CFG_BAD_VALGRIND |
| 76 | $(info cfg: disabling valgrind due to its unreliability on this platform) |
| 77 | CFG_VALGRIND := |
| 78 | endif |
Graydon Hoare | 9c6e7e6 | 2011-03-16 16:17:32 | [diff] [blame] | 79 | |
Graydon Hoare | 28a4e77 | 2011-03-23 17:37:35 | [diff] [blame] | 80 | DOCS := |
| 81 | ifeq ($(CFG_MAKEINFO),) |
| 82 | $(info cfg: no makeinfo found, omitting doc/rust.html) |
| 83 | else |
| 84 | DOCS += doc/rust.html |
| 85 | endif |
| 86 | |
| 87 | ifeq ($(CFG_TEXI2PDF),) |
| 88 | $(info cfg: no texi2pdf found, omitting doc/rust.pdf) |
| 89 | else |
Graydon Hoare | f740747 | 2011-03-23 20:31:51 | [diff] [blame] | 90 | ifeq ($(CFG_TEX),) |
| 91 | $(info cfg: no tex found, omitting doc/rust.pdf) |
| 92 | else |
| 93 | DOCS += doc/rust.pdf |
| 94 | endif |
Graydon Hoare | 28a4e77 | 2011-03-23 17:37:35 | [diff] [blame] | 95 | endif |
| 96 | |
Graydon Hoare | 94731fa | 2011-03-30 04:45:09 | [diff] [blame] | 97 | ifdef CFG_DISABLE_DOCS |
| 98 | $(info cfg: disabling doc build (CFG_DISABLE_DOCS)) |
| 99 | DOCS := |
| 100 | endif |
Graydon Hoare | 28a4e77 | 2011-03-23 17:37:35 | [diff] [blame] | 101 | |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 102 | ###################################################################### |
| 103 | # Target-and-rule "utility variables" |
| 104 | ###################################################################### |
| 105 | |
| 106 | ifdef VERBOSE |
| 107 | Q := |
| 108 | E = |
| 109 | else |
| 110 | Q := @ |
| 111 | E = echo $(1) |
| 112 | endif |
| 113 | |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 114 | S := $(CFG_SRC_DIR) |
| 115 | X := $(CFG_EXE_SUFFIX) |
| 116 | |
| 117 | # Look in doc and src dirs. |
| 118 | VPATH := $(S)doc $(S)src |
| 119 | |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 120 | # "Source" files we generate in builddir along the way. |
Graydon Hoare | 40624e3 | 2011-05-01 20:18:52 | [diff] [blame] | 121 | GENERATED := |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 122 | |
| 123 | # Delete the built-in rules. |
| 124 | .SUFFIXES: |
| 125 | %:: %,v |
| 126 | %:: RCS/%,v |
| 127 | %:: RCS/% |
| 128 | %:: s.% |
| 129 | %:: SCCS/s.% |
Graydon Hoare | 9c6e7e6 | 2011-03-16 16:17:32 | [diff] [blame] | 130 | |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 131 | ###################################################################### |
| 132 | # Standard library variables |
| 133 | ###################################################################### |
| 134 | |
Graydon Hoare | 6597439 | 2011-03-21 20:42:29 | [diff] [blame] | 135 | STDLIB_CRATE := $(S)src/lib/std.rc |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 136 | STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/lib/,*.rc *.rs */*.rs)) |
| 137 | |
| 138 | ###################################################################### |
| 139 | # rustc crate variables |
| 140 | ###################################################################### |
| 141 | |
Graydon Hoare | 6597439 | 2011-03-21 20:42:29 | [diff] [blame] | 142 | COMPILER_CRATE := $(S)src/comp/rustc.rc |
Graydon Hoare | 874a7bf | 2011-03-19 00:30:06 | [diff] [blame] | 143 | COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/comp/, \ |
Tim Chevalier | 60399ed | 2011-05-18 22:34:52 | [diff] [blame] | 144 | rustc.rc *.rs */*.rs */*/*.rs)) |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 145 | |
| 146 | ###################################################################### |
Graydon Hoare | d987b49 | 2011-05-03 06:37:52 | [diff] [blame] | 147 | # Exports for sub-utilities |
| 148 | ###################################################################### |
| 149 | |
| 150 | export CFG_SRC_DIR |
Graydon Hoare | ad954fc | 2011-07-23 19:26:47 | [diff] [blame] | 151 | export CFG_BUILD_DIR |
Graydon Hoare | 1e03f00 | 2011-05-06 18:21:51 | [diff] [blame] | 152 | export CFG_VERSION |
Graydon Hoare | 6a4a85f | 2011-05-18 19:00:26 | [diff] [blame] | 153 | export CFG_LLVM_ROOT |
Graydon Hoare | 0dc2aa3 | 2011-06-28 18:18:25 | [diff] [blame] | 154 | export CFG_ENABLE_MINGW_CROSS |
Graydon Hoare | d987b49 | 2011-05-03 06:37:52 | [diff] [blame] | 155 | |
Patrick Walton | 04f966f | 2011-05-05 01:28:30 | [diff] [blame] | 156 | ###################################################################### |
| 157 | # Subprograms |
| 158 | ###################################################################### |
| 159 | |
Graydon Hoare | 8fc51df | 2011-06-27 18:53:04 | [diff] [blame] | 160 | LLVM_AS := $(CFG_LLVM_BINDIR)/llvm-as$(X) |
Patrick Walton | 04f966f | 2011-05-05 01:28:30 | [diff] [blame] | 161 | |
Graydon Hoare | 8fc51df | 2011-06-27 18:53:04 | [diff] [blame] | 162 | LLC := $(CFG_LLVM_BINDIR)/llc$(X) |
Graydon Hoare | d987b49 | 2011-05-03 06:37:52 | [diff] [blame] | 163 | |
| 164 | ###################################################################### |
Graydon Hoare | fafb42e | 2011-07-15 23:12:41 | [diff] [blame] | 165 | # Per-stage targets and runner |
| 166 | ###################################################################### |
| 167 | |
| 168 | define SREQ |
Rafael Ávila de Espíndola | 88894b6 | 2011-07-20 20:02:36 | [diff] [blame] | 169 | ifdef CFG_DISABLE_SHAREDSTD |
Graydon Hoare | fafb42e | 2011-07-15 23:12:41 | [diff] [blame] | 170 | SREQ$(1) = stage$(1)/rustc$(X) \ |
| 171 | stage$(1)/$$(CFG_RUNTIME) \ |
Marijn Haverbeke | 863d121 | 2011-07-27 13:44:21 | [diff] [blame] | 172 | $$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(1)) \ |
Rafael Ávila de Espíndola | 88894b6 | 2011-07-20 20:02:36 | [diff] [blame] | 173 | stage$(1)/$$(CFG_RUSTLLVM) \ |
| 174 | stage$(1)/lib/glue.o \ |
| 175 | stage$(1)/lib/main.o \ |
| 176 | stage$(1)/lib/$$(CFG_RUNTIME) \ |
| 177 | $$(MKFILES) |
| 178 | else |
| 179 | SREQ$(1) = stage$(1)/rustc$(X) \ |
| 180 | stage$(1)/$$(CFG_RUNTIME) \ |
Marijn Haverbeke | 863d121 | 2011-07-27 13:44:21 | [diff] [blame] | 181 | $$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(1)) \ |
Graydon Hoare | fafb42e | 2011-07-15 23:12:41 | [diff] [blame] | 182 | stage$(1)/$$(CFG_RUSTLLVM) \ |
| 183 | stage$(1)/lib/glue.o \ |
| 184 | stage$(1)/lib/main.o \ |
| 185 | stage$(1)/lib/$$(CFG_RUNTIME) \ |
Marijn Haverbeke | 863d121 | 2011-07-27 13:44:21 | [diff] [blame] | 186 | stage$(1)/lib/$$(CFG_STDLIB) \ |
Graydon Hoare | fafb42e | 2011-07-15 23:12:41 | [diff] [blame] | 187 | $$(MKFILES) |
Rafael Ávila de Espíndola | 88894b6 | 2011-07-20 20:02:36 | [diff] [blame] | 188 | endif |
Graydon Hoare | fafb42e | 2011-07-15 23:12:41 | [diff] [blame] | 189 | |
Brian Anderson | e3d3aaa | 2011-08-26 18:11:49 | [diff] [blame] | 190 | ifeq ($(1),0) |
| 191 | # Don't run the the stage0 compiler under valgrind - that ship has sailed |
| 192 | CFG_VALGRIND_COMPILE$(1) = |
| 193 | else |
| 194 | CFG_VALGRIND_COMPILE$(1) = $$(CFG_VALGRIND_COMPILE) |
| 195 | endif |
| 196 | |
Rafael Ávila de Espíndola | ea371a3 | 2011-07-21 19:10:43 | [diff] [blame] | 197 | STAGE$(1) := $$(Q)$$(call CFG_RUN_TARG,stage$(1), \ |
Brian Anderson | e3d3aaa | 2011-08-26 18:11:49 | [diff] [blame] | 198 | $$(CFG_VALGRIND_COMPILE$(1)) stage$(1)/rustc$$(X) \ |
Graydon Hoare | fafb42e | 2011-07-15 23:12:41 | [diff] [blame] | 199 | $$(CFG_RUSTC_FLAGS)) |
| 200 | endef |
| 201 | |
Brian Anderson | 2cb3a79 | 2011-07-20 03:03:13 | [diff] [blame] | 202 | FUZZ := stage1/fuzzer$(X) |
Graydon Hoare | 46b0aa5 | 2011-07-18 22:57:12 | [diff] [blame] | 203 | |
Graydon Hoare | fafb42e | 2011-07-15 23:12:41 | [diff] [blame] | 204 | $(eval $(call SREQ,0)) |
| 205 | $(eval $(call SREQ,1)) |
| 206 | $(eval $(call SREQ,2)) |
| 207 | $(eval $(call SREQ,3)) |
| 208 | |
| 209 | ###################################################################### |
| 210 | # Entrypoint rule |
Graydon Hoare | 4c2245d | 2011-03-18 06:51:45 | [diff] [blame] | 211 | ###################################################################### |
| 212 | |
Graydon Hoare | ae784df | 2011-05-14 00:00:43 | [diff] [blame] | 213 | ifneq ($(CFG_IN_TRANSITION),) |
| 214 | |
Graydon Hoare | 9ac2948 | 2011-05-16 22:14:58 | [diff] [blame] | 215 | CFG_INFO := $(info cfg:) |
Graydon Hoare | ae784df | 2011-05-14 00:00:43 | [diff] [blame] | 216 | CFG_INFO := $(info cfg: *** compiler is in snapshot transition ***) |
| 217 | CFG_INFO := $(info cfg: *** stage2 and later will not be built ***) |
Graydon Hoare | 9ac2948 | 2011-05-16 22:14:58 | [diff] [blame] | 218 | CFG_INFO := $(info cfg:) |
Graydon Hoare | ae784df | 2011-05-14 00:00:43 | [diff] [blame] | 219 | |
Marijn Haverbeke | 863d121 | 2011-07-27 13:44:21 | [diff] [blame] | 220 | all: $(SREQ0) $(SREQ1) $(GENERATED) $(DOCS) $(FUZZ) |
Graydon Hoare | ae784df | 2011-05-14 00:00:43 | [diff] [blame] | 221 | else |
Graydon Hoare | 46b0aa5 | 2011-07-18 22:57:12 | [diff] [blame] | 222 | all: $(SREQ0) $(SREQ1) $(SREQ2) $(SREQ3) $(GENERATED) $(DOCS) $(FUZZ) |
Graydon Hoare | ae784df | 2011-05-14 00:00:43 | [diff] [blame] | 223 | endif |
| 224 | |
Graydon Hoare | 10f3360 | 2011-03-25 17:29:45 | [diff] [blame] | 225 | |
| 226 | ###################################################################### |
| 227 | # Re-configuration |
| 228 | ###################################################################### |
| 229 | |
Graydon Hoare | ae784df | 2011-05-14 00:00:43 | [diff] [blame] | 230 | config.mk: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt |
Graydon Hoare | 10f3360 | 2011-03-25 17:29:45 | [diff] [blame] | 231 | @$(call E, cfg: reconfiguring) |
Graydon Hoare | df8161d | 2011-06-30 20:41:20 | [diff] [blame] | 232 | $(Q)$(S)configure $(CFG_CONFIGURE_ARGS) |
Graydon Hoare | 10f3360 | 2011-03-25 17:29:45 | [diff] [blame] | 233 | |
| 234 | |
Graydon Hoare | e961f53 | 2011-03-21 18:23:19 | [diff] [blame] | 235 | ###################################################################### |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 236 | # Primary-target makefiles |
Graydon Hoare | e961f53 | 2011-03-21 18:23:19 | [diff] [blame] | 237 | ###################################################################### |
| 238 | |
Patrick Walton | 04f966f | 2011-05-05 01:28:30 | [diff] [blame] | 239 | include $(CFG_SRC_DIR)/mk/intrinsics.mk |
Graydon Hoare | fafb42e | 2011-07-15 23:12:41 | [diff] [blame] | 240 | include $(CFG_SRC_DIR)/mk/stageN.mk |
Michael Sullivan | b01ecb1 | 2011-07-21 18:58:01 | [diff] [blame] | 241 | include $(CFG_SRC_DIR)/mk/stage0.mk |
Graydon Hoare | 40624e3 | 2011-05-01 20:18:52 | [diff] [blame] | 242 | include $(CFG_SRC_DIR)/mk/rt.mk |
| 243 | include $(CFG_SRC_DIR)/mk/rustllvm.mk |
Graydon Hoare | 40624e3 | 2011-05-01 20:18:52 | [diff] [blame] | 244 | include $(CFG_SRC_DIR)/mk/autodep.mk |
Brian Anderson | a5ea56c | 2011-05-06 00:56:02 | [diff] [blame] | 245 | include $(CFG_SRC_DIR)/mk/fuzzer.mk |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 246 | include $(CFG_SRC_DIR)/mk/docs.mk |
| 247 | |
| 248 | |
| 249 | ###################################################################### |
| 250 | # Secondary makefiles, conditionalized for speed |
| 251 | ###################################################################### |
| 252 | |
Graydon Hoare | df8161d | 2011-06-30 20:41:20 | [diff] [blame] | 253 | ifneq ($(strip $(findstring dist,$(MAKECMDGOALS)) \ |
| 254 | $(findstring check,$(MAKECMDGOALS)) \ |
| 255 | $(findstring test,$(MAKECMDGOALS)) \ |
Graydon Hoare | 39151f2 | 2011-07-13 22:44:09 | [diff] [blame] | 256 | $(findstring tidy,$(MAKECMDGOALS)) \ |
Graydon Hoare | df8161d | 2011-06-30 20:41:20 | [diff] [blame] | 257 | $(findstring clean,$(MAKECMDGOALS))),) |
| 258 | CFG_INFO := $(info cfg: including dist rules) |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 259 | include $(CFG_SRC_DIR)/mk/dist.mk |
| 260 | endif |
| 261 | |
Graydon Hoare | df8161d | 2011-06-30 20:41:20 | [diff] [blame] | 262 | ifneq ($(strip $(findstring snap,$(MAKECMDGOALS)) \ |
| 263 | $(findstring clean,$(MAKECMDGOALS))),) |
| 264 | CFG_INFO := $(info cfg: including snap rules) |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 265 | include $(CFG_SRC_DIR)/mk/snap.mk |
| 266 | endif |
| 267 | |
| 268 | ifneq ($(findstring reformat,$(MAKECMDGOALS)),) |
Graydon Hoare | df8161d | 2011-06-30 20:41:20 | [diff] [blame] | 269 | CFG_INFO := $(info cfg: including reformat rules) |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 270 | include $(CFG_SRC_DIR)/mk/pp.mk |
| 271 | endif |
| 272 | |
Graydon Hoare | df8161d | 2011-06-30 20:41:20 | [diff] [blame] | 273 | ifneq ($(strip $(findstring check,$(MAKECMDGOALS)) \ |
| 274 | $(findstring test,$(MAKECMDGOALS)) \ |
Graydon Hoare | d5b2d62 | 2011-09-13 22:06:21 | [diff] [blame] | 275 | $(findstring perf,$(MAKECMDGOALS)) \ |
Graydon Hoare | df8161d | 2011-06-30 20:41:20 | [diff] [blame] | 276 | $(findstring tidy,$(MAKECMDGOALS))),) |
| 277 | CFG_INFO := $(info cfg: including test rules) |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 278 | include $(CFG_SRC_DIR)/mk/tests.mk |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 279 | endif |
| 280 | |
Graydon Hoare | d5b2d62 | 2011-09-13 22:06:21 | [diff] [blame] | 281 | ifneq ($(findstring perf,$(MAKECMDGOALS)),) |
| 282 | CFG_INFO := $(info cfg: including perf rules) |
| 283 | include $(CFG_SRC_DIR)/mk/perf.mk |
| 284 | endif |
| 285 | |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 286 | ifneq ($(findstring clean,$(MAKECMDGOALS)),) |
Graydon Hoare | df8161d | 2011-06-30 20:41:20 | [diff] [blame] | 287 | CFG_INFO := $(info cfg: including clean rules) |
Graydon Hoare | 79ba315 | 2011-06-25 19:23:27 | [diff] [blame] | 288 | include $(CFG_SRC_DIR)/mk/clean.mk |
Michael Sullivan | b01ecb1 | 2011-07-21 18:58:01 | [diff] [blame] | 289 | endif |