93
93
# #############################################
94
94
95
95
$(OBJDIR)/hello.o: src/greetings/hello.cpp
96
- @echo $(notdir $<)
96
+ @echo " $(notdir $<)"
97
97
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
98
98
$(OBJDIR)/hello1.o: src/hello.cpp
99
- @echo $(notdir $<)
99
+ @echo " $(notdir $<)"
100
100
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
101
101
102
102
]]
@@ -115,10 +115,10 @@ $(OBJDIR)/hello1.o: src/hello.cpp
115
115
# #############################################
116
116
117
117
$(OBJDIR)/hello.o: src/hello.c
118
- @echo $(notdir $<)
118
+ @echo " $(notdir $<)"
119
119
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
120
120
$(OBJDIR)/test.o: src/test.cpp
121
- @echo $(notdir $<)
121
+ @echo " $(notdir $<)"
122
122
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
123
123
124
124
]]
@@ -138,10 +138,10 @@ $(OBJDIR)/test.o: src/test.cpp
138
138
# #############################################
139
139
140
140
$(OBJDIR)/hello.o: src/hello.c
141
- @echo $(notdir $<)
141
+ @echo " $(notdir $<)"
142
142
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
143
143
$(OBJDIR)/test.o: src/test.c
144
- @echo $(notdir $<)
144
+ @echo " $(notdir $<)"
145
145
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
146
146
]]
147
147
end
@@ -160,17 +160,17 @@ $(OBJDIR)/test.o: src/test.c
160
160
# #############################################
161
161
162
162
$(OBJDIR)/test.o: src/test.c
163
- @echo $(notdir $<)
163
+ @echo " $(notdir $<)"
164
164
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
165
165
166
166
ifeq ($(config),debug)
167
167
$(OBJDIR)/hello.o: src/hello.c
168
- @echo $(notdir $<)
168
+ @echo " $(notdir $<)"
169
169
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
170
170
171
171
else ifeq ($(config),release)
172
172
$(OBJDIR)/hello.o: src/hello.c
173
- @echo $(notdir $<)
173
+ @echo " $(notdir $<)"
174
174
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
175
175
176
176
endif
@@ -198,20 +198,52 @@ endif
198
198
199
199
ifeq ($(config),debug)
200
200
obj/Debug/hello.obj: hello.x
201
- @echo Compiling hello.x
201
+ @echo " Compiling hello.x"
202
202
$(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo"
203
203
$(SILENT) c2o -c "obj/Debug/hello.xo" -o "obj/Debug/hello.obj"
204
204
205
205
else ifeq ($(config),release)
206
206
obj/Release/hello.obj: hello.x
207
- @echo Compiling hello.x
207
+ @echo " Compiling hello.x"
208
208
$(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo"
209
209
$(SILENT) c2o -c "obj/Release/hello.xo" -o "obj/Release/hello.obj"
210
210
211
211
endif
212
212
]]
213
213
end
214
214
215
+ --
216
+ -- If a custom build rule is supplied, it should be used.
217
+ --
218
+
219
+ function suite .customBuildRuleWithEscaping ()
220
+ files { " hello.x" }
221
+ filter " files:**.x"
222
+ buildmessage ' "Compiling %{file.name}"'
223
+ buildcommands {
224
+ ' cxc -c "%{file.path}" -o "%{cfg.objdir}/%{file.basename}.xo"' ,
225
+ }
226
+ buildoutputs { " %{cfg.objdir}/%{file.basename}.obj" }
227
+ prepare ()
228
+ test .capture [[
229
+ # File Rules
230
+ # #############################################
231
+
232
+ ifeq ($(config),debug)
233
+ obj/Debug/hello.obj: hello.x
234
+ @echo "\"Compiling hello.x\""
235
+ $(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo"
236
+
237
+ else ifeq ($(config),release)
238
+ obj/Release/hello.obj: hello.x
239
+ @echo "\"Compiling hello.x\""
240
+ $(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo"
241
+
242
+ endif
243
+ ]]
244
+ end
245
+
246
+
215
247
function suite .customBuildRuleWithAdditionalInputs ()
216
248
files { " hello.x" }
217
249
filter " files:**.x"
@@ -229,13 +261,13 @@ endif
229
261
230
262
ifeq ($(config),debug)
231
263
obj/Debug/hello.obj: hello.x hello.x.inc hello.x.inc2
232
- @echo Compiling hello.x
264
+ @echo " Compiling hello.x"
233
265
$(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo"
234
266
$(SILENT) c2o -c "obj/Debug/hello.xo" -o "obj/Debug/hello.obj"
235
267
236
268
else ifeq ($(config),release)
237
269
obj/Release/hello.obj: hello.x hello.x.inc hello.x.inc2
238
- @echo Compiling hello.x
270
+ @echo " Compiling hello.x"
239
271
$(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo"
240
272
$(SILENT) c2o -c "obj/Release/hello.xo" -o "obj/Release/hello.obj"
241
273
@@ -259,14 +291,14 @@ endif
259
291
260
292
ifeq ($(config),debug)
261
293
obj/Debug/hello.obj: hello.x
262
- @echo Compiling hello.x
294
+ @echo " Compiling hello.x"
263
295
$(SILENT) cxc -c "hello.x" -o "obj/Debug/hello.xo"
264
296
$(SILENT) c2o -c "obj/Debug/hello.xo" -o "obj/Debug/hello.obj"
265
297
obj/Debug/hello.other obj/Debug/hello.another: obj/Debug/hello.obj
266
298
267
299
else ifeq ($(config),release)
268
300
obj/Release/hello.obj: hello.x
269
- @echo Compiling hello.x
301
+ @echo " Compiling hello.x"
270
302
$(SILENT) cxc -c "hello.x" -o "obj/Release/hello.xo"
271
303
$(SILENT) c2o -c "obj/Release/hello.xo" -o "obj/Release/hello.obj"
272
304
obj/Release/hello.other obj/Release/hello.another: obj/Release/hello.obj
@@ -296,10 +328,10 @@ endif
296
328
# #############################################
297
329
298
330
test.obj: test.rule
299
- @echo Rule-ing test.rule
331
+ @echo " Rule-ing test.rule"
300
332
$(SILENT) dorule -p "test.rule"
301
333
test2.obj: test2.rule
302
- @echo Rule-ing test2.rule
334
+ @echo " Rule-ing test2.rule"
303
335
$(SILENT) dorule -p -p2 "test2.rule"
304
336
]]
305
337
end
@@ -335,16 +367,16 @@ test2.obj: test2.rule
335
367
# #############################################
336
368
337
369
test.obj: test.rule
338
- @echo Rule-ing test.rule
370
+ @echo " Rule-ing test.rule"
339
371
$(SILENT) dorule testValue1\ testValue2 "test.rule"
340
372
test2.obj: test2.rule
341
- @echo Rule-ing test2.rule
373
+ @echo " Rule-ing test2.rule"
342
374
$(SILENT) dorule -StestValue1\ -StestValue2 "test2.rule"
343
375
test3.obj: test3.rule
344
- @echo Rule-ing test3.rule
376
+ @echo " Rule-ing test3.rule"
345
377
$(SILENT) dorule testValue1,testValue2 "test3.rule"
346
378
test4.obj: test4.rule
347
- @echo Rule-ing test4.rule
379
+ @echo " Rule-ing test4.rule"
348
380
$(SILENT) dorule -OtestValue1,testValue2 "test4.rule"
349
381
]]
350
382
end
@@ -370,10 +402,10 @@ test4.obj: test4.rule
370
402
# #############################################
371
403
372
404
test.obj: test.rule
373
- @echo Rule-ing test.rule
405
+ @echo " Rule-ing test.rule"
374
406
$(SILENT) dorule S0 "test.rule"
375
407
test2.obj: test2.rule
376
- @echo Rule-ing test2.rule
408
+ @echo " Rule-ing test2.rule"
377
409
$(SILENT) dorule S1 "test2.rule"
378
410
]]
379
411
end
0 commit comments