Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / nlfaultinjection / repo / third_party / cstyle / repo / tests / Makefile
1 #
2 #    Copyright (c) 2001-2016 Grant Erickson
3 #
4 #    Description:
5 #      Makefile for 'cstyle' coding style and conventions enforcement
6 #      tool unit tests.
7 #
8
9 .SUFFIXES: .c .cpp .cmp .mm .stamp .test
10
11 CC       ?= gcc
12 CXX      ?= g++
13 OBJC     ?= gcc
14 OBJCXX   ?= g++
15
16 ifeq ($(DEBUG),1)
17 COMPARE      ?= comm -3 --nocheck-order
18 else
19 COMPARE      ?= cmp -s
20 endif
21 PERL     ?= perl
22 CSTYLE   ?= $(PWD)/../cstyle.pl
23 CSTYLE_V := $(CSTYLE) -v
24
25 %.stamp: %.c
26         @echo "  CC      $<"
27         @$(CC) -o /dev/null -c $<
28         @touch $@
29
30 %.stamp: %.cpp
31         @echo "  CXX     $<"
32         @$(CXX) -o /dev/null -c $<
33         @touch $@
34
35 %.stamp: %.m
36         @echo "  OBJC    $<"
37         @$(OBJC) -o /dev/null -c $<
38         @touch $@
39
40 %.stamp: %.mm
41         @echo "  OBJCXX  $<"
42         @$(OBJCXX) -o /dev/null -c $<
43         @touch $@
44
45 SOURCES                                          = \
46     cpp-constant-conditionals.cpp                  \
47     cpp-directive-leading-space.cpp                \
48     file-length.cpp                                \
49     implicit-void-declaration.cpp                  \
50     interpolated-space.cpp                         \
51     line-length.cpp                                \
52     missing-copyright.cpp                          \
53     missing-cpp-conditional-labels.cpp             \
54     missing-newline-at-eof.cpp                     \
55     missing-space-after-comma.cpp                  \
56     missing-space-after-else-if.cpp                \
57     missing-space-after-for.cpp                    \
58     missing-space-after-if.cpp                     \
59     missing-space-after-operator.cpp               \
60     missing-space-after-semicolon.cpp              \
61     missing-space-after-switch.cpp                 \
62     missing-space-after-while.cpp                  \
63     missing-space-around-binary-operators.cpp      \
64     missing-space-around-braces.mm                 \
65     multiple-returns.c                             \
66     multiple-returns.cpp                           \
67     no-missing-copyright.cpp                       \
68     space-around-unary-operators.cpp               \
69     trailing-line.cpp                              \
70     trailing-space.cpp                             \
71     $(NULL)
72
73 STAMPS                                           = \
74     $(addsuffix .stamp,$(basename $(SOURCES)))
75     $(NULL)
76
77 check_TARGETS                                    = \
78     check-blank-trailing-space                     \
79     check-no-blank-trailing-space                  \
80     check-cpp-constant-conditionals                \
81     check-no-cpp-constant-conditionals             \
82     check-cpp-directive-leading-space              \
83     check-no-cpp-directive-leading-space           \
84     check-file-length                              \
85     check-no-file-length                           \
86     check-implicit-void-declaration                \
87     check-no-implicit-void-declaration             \
88     check-interpolated-space                       \
89     check-no-interpolated-space                    \
90     check-line-length                              \
91     check-no-line-length                           \
92     check-missing-copyright                        \
93     check-no-missing-copyright                     \
94     check-missing-cpp-conditional-labels           \
95     check-no-missing-cpp-conditional-labels        \
96     check-missing-newline-at-eof                   \
97     check-no-missing-newline-at-eof                \
98     check-missing-space-after-comma                \
99     check-no-missing-space-after-comma             \
100     check-missing-space-after-else-if              \
101     check-no-missing-space-after-else-if           \
102     check-missing-space-after-for                  \
103     check-no-missing-space-after-for               \
104     check-missing-space-after-if                   \
105     check-no-missing-space-after-if                \
106     check-missing-space-after-operator             \
107     check-no-missing-space-after-operator          \
108     check-missing-space-after-semicolon            \
109     check-no-missing-space-after-semicolon         \
110     check-missing-space-after-switch               \
111     check-no-missing-space-after-switch            \
112     check-missing-space-after-while                \
113     check-no-missing-space-after-while             \
114     check-missing-space-around-binary-operators    \
115     check-no-missing-space-around-binary-operators \
116     check-missing-space-around-braces              \
117     check-no-missing-space-around-braces           \
118     check-space-around-unary-operators             \
119     check-no-space-around-unary-operators          \
120     check-trailing-line                            \
121     check-no-trailing-line                         \
122     check-trailing-space                           \
123     check-no-trailing-space                        \
124     $(NULL)
125
126 all: $(STAMPS)
127
128 .PHONY: $(check_TARGETS)
129 check: $(check_TARGETS)
130
131 define compare-target
132 $(COMPARE) $(basename $(1)).cmp $(1)
133 endef
134
135 # -W[no-]blank-trailing-space
136
137 blank-trailing-space.test: blank-trailing-space.cpp blank-trailing-space.cmp blank-trailing-space.stamp $(CSTYLE)
138         @echo "  CHECK   -Wblank-trailing-space..."
139         @$(PERL) $(CSTYLE_V) -Wblank-trailing-space blank-trailing-space.cpp 2> $(@)
140         @$(call compare-target,$(@))
141
142 check-blank-trailing-space: blank-trailing-space.test
143
144 no-blank-trailing-space.test: blank-trailing-space.cpp no-blank-trailing-space.cmp blank-trailing-space.stamp $(CSTYLE)
145         @echo "  CHECK   -Wno-blank-trailing-space..."
146         @$(PERL) $(CSTYLE_V) -Wno-blank-trailing-space blank-trailing-space.cpp 2> $(@)
147         @$(call compare-target,$(@))
148
149 check-no-blank-trailing-space: no-blank-trailing-space.test
150
151 # -W[no-]missing-cpp-conditional-labels
152
153 missing-cpp-conditional-labels.test: missing-cpp-conditional-labels.cpp missing-cpp-conditional-labels.cmp missing-cpp-conditional-labels.stamp $(CSTYLE)
154         @echo "  CHECK   -Wmissing-cpp-conditional-labels..."
155         @$(PERL) $(CSTYLE_V) --cpp-lines-between-conditionals=1 -Wmissing-cpp-conditional-labels missing-cpp-conditional-labels.cpp 2> $(@)
156         @$(call compare-target,$(@))
157
158 check-missing-cpp-conditional-labels: missing-cpp-conditional-labels.test
159
160 no-missing-cpp-conditional-labels.test: missing-cpp-conditional-labels.cpp no-missing-cpp-conditional-labels.cmp missing-cpp-conditional-labels.stamp $(CSTYLE)
161         @echo "  CHECK   -Wno-missing-cpp-conditional-labels..."
162         @$(PERL) $(CSTYLE_V) --cpp-lines-between-conditionals=1 -Wno-missing-cpp-conditional-labels missing-cpp-conditional-labels.cpp 2> $(@)
163         @$(call compare-target,$(@))
164
165 check-no-missing-cpp-conditional-labels: no-missing-cpp-conditional-labels.test
166
167 # -W[no-]cpp-constant-conditionals
168
169 cpp-constant-conditionals.test: cpp-constant-conditionals.cpp cpp-constant-conditionals.cmp cpp-constant-conditionals.stamp $(CSTYLE)
170         @echo "  CHECK   -Wcpp-constant-conditionals..."
171         @$(PERL) $(CSTYLE_V) -Wcpp-constant-conditionals cpp-constant-conditionals.cpp 2> $(@)
172         @$(call compare-target,$(@))
173
174 check-cpp-constant-conditionals: cpp-constant-conditionals.test
175
176 no-cpp-constant-conditionals.test: cpp-constant-conditionals.cpp no-cpp-constant-conditionals.cmp cpp-constant-conditionals.stamp $(CSTYLE)
177         @echo "  CHECK   -Wno-cpp-constant-conditionals..."
178         @$(PERL) $(CSTYLE_V) -Wno-cpp-constant-conditionals cpp-constant-conditionals.cpp 2> $(@)
179         @$(call compare-target,$(@))
180
181 check-no-cpp-constant-conditionals: no-cpp-constant-conditionals.test
182
183 # -W[no-]cpp-directive-leading-space
184
185 cpp-directive-leading-space.test: cpp-directive-leading-space.cpp cpp-directive-leading-space.cmp cpp-directive-leading-space.stamp $(CSTYLE)
186         @echo "  CHECK   -Wcpp-directive-leading-space..."
187         @$(PERL) $(CSTYLE_V) -Wcpp-directive-leading-space cpp-directive-leading-space.cpp 2> $(@)
188         @$(call compare-target,$(@))
189
190 check-cpp-directive-leading-space: cpp-directive-leading-space.test
191
192 no-cpp-directive-leading-space.test: cpp-directive-leading-space.cpp no-cpp-directive-leading-space.cmp cpp-directive-leading-space.stamp $(CSTYLE)
193         @echo "  CHECK   -Wno-cpp-directive-leading-space..."
194         @$(PERL) $(CSTYLE_V) -Wno-cpp-directive-leading-space cpp-directive-leading-space.cpp 2> $(@)
195         @$(call compare-target,$(@))
196
197 check-no-cpp-directive-leading-space: no-cpp-directive-leading-space.test
198
199 # -W[no-]file-length
200
201 file-length.test: file-length.cpp file-length.cmp file-length.stamp $(CSTYLE)
202         @echo "  CHECK   -Wfile-length..."
203         @$(PERL) $(CSTYLE_V) --file-length=5 -Wfile-length file-length.cpp 2> $(@)
204         @$(call compare-target,$(@))
205
206 check-file-length: file-length.test
207
208 no-file-length.test: file-length.cpp no-file-length.cmp file-length.stamp $(CSTYLE)
209         @echo "  CHECK   -Wno-file-length..."
210         @$(PERL) $(CSTYLE_V) --file-length=5 -Wno-file-length file-length.cpp 2> $(@)
211         @$(call compare-target,$(@))
212
213 check-no-file-length: no-file-length.test
214
215 # -W[no-]implicit-void-declaration
216
217 implicit-void-declaration.test: implicit-void-declaration.cpp implicit-void-declaration.cmp implicit-void-declaration.stamp $(CSTYLE)
218         @echo "  CHECK   -Wimplicit-void-declaration..."
219         @$(PERL) $(CSTYLE_V) -Wimplicit-void-declaration implicit-void-declaration.cpp 2> $(@)
220         @$(call compare-target,$(@))
221
222 check-implicit-void-declaration: implicit-void-declaration.test
223
224 no-implicit-void-declaration.test: implicit-void-declaration.cpp no-implicit-void-declaration.cmp implicit-void-declaration.stamp $(CSTYLE)
225         @echo "  CHECK   -Wno-implicit-void-declaration..."
226         @$(PERL) $(CSTYLE_V) -Wno-implicit-void-declaration implicit-void-declaration.cpp 2> $(@)
227         @$(call compare-target,$(@))
228
229 check-no-implicit-void-declaration: no-implicit-void-declaration.test
230
231 # -W[no-]interpolated-space
232
233 interpolated-space.test: interpolated-space.cpp interpolated-space.cmp interpolated-space.stamp $(CSTYLE)
234         @echo "  CHECK   -Winterpolated-space..."
235         @$(PERL) $(CSTYLE_V) -Winterpolated-space interpolated-space.cpp 2> $(@)
236         @$(call compare-target,$(@))
237
238 check-interpolated-space: interpolated-space.test
239
240 no-interpolated-space.test: interpolated-space.cpp no-interpolated-space.cmp interpolated-space.stamp $(CSTYLE)
241         @echo "  CHECK   -Wno-interpolated-space..."
242         @$(PERL) $(CSTYLE_V) -Wno-interpolated-space interpolated-space.cpp 2> $(@)
243         @$(call compare-target,$(@))
244
245 check-no-interpolated-space: no-interpolated-space.test
246
247 # -W[no-]line-length
248
249 line-length.test: line-length.cpp line-length.cmp line-length.stamp $(CSTYLE)
250         @echo "  CHECK   -Wline-length..."
251         @$(PERL) $(CSTYLE_V) --line-length=80 --tab-size=4 -Wline-length line-length.cpp 2> $(@)
252         @$(call compare-target,$(@))
253
254 check-line-length: line-length.test
255
256 no-line-length.test: line-length.cpp no-line-length.cmp line-length.stamp $(CSTYLE)
257         @echo "  CHECK   -Wno-line-length..."
258         @$(PERL) $(CSTYLE_V) --line-length=80 --tab-size=4 -Wno-line-length line-length.cpp 2> $(@)
259         @$(call compare-target,$(@))
260
261 check-no-line-length: no-line-length.test
262
263 # -W[no-]missing-copyright
264
265 missing-copyright.test: missing-copyright.cpp missing-copyright.cmp missing-copyright.stamp $(CSTYLE)
266         @echo "  CHECK   -Wmissing-copyright..."
267         @$(PERL) $(CSTYLE_V) --copyright='^( \*|\/\*|\/\/)    Copyright (\(c\) )*\d{4,}(-\d{4,})* Nest Labs, Inc\.' -Wmissing-copyright missing-copyright.cpp 2> $(@)
268         @$(call compare-target,$(@))
269
270 check-missing-copyright: missing-copyright.test
271
272 no-missing-copyright.test: no-missing-copyright.cpp no-missing-copyright.cmp no-missing-copyright.stamp $(CSTYLE)
273         @echo "  CHECK   -Wno-missing-copyright..."
274         @$(PERL) $(CSTYLE_V) --copyright='^( \*|\/\*|\/\/)    Copyright (\(c\) )*\d{4,}(-\d{4,})* Nest Labs, Inc\.' -Wno-missing-copyright no-missing-copyright.cpp 2> $(@)
275         @$(call compare-target,$(@))
276
277 check-no-missing-copyright: no-missing-copyright.test
278
279 # -W[no-]missing-newline-at-eof
280
281 missing-newline-at-eof.test: missing-newline-at-eof.cpp missing-newline-at-eof.cmp missing-newline-at-eof.stamp $(CSTYLE)
282         @echo "  CHECK   -Wmissing-newline-at-eof..."
283         @$(PERL) $(CSTYLE_V) -Wmissing-newline-at-eof missing-newline-at-eof.cpp 2> $(@)
284         @$(call compare-target,$(@))
285
286 check-missing-newline-at-eof: missing-newline-at-eof.test
287
288 no-missing-newline-at-eof.test: missing-newline-at-eof.cpp no-missing-newline-at-eof.cmp missing-newline-at-eof.stamp $(CSTYLE)
289         @echo "  CHECK   -Wno-missing-newline-at-eof..."
290         @$(PERL) $(CSTYLE_V) -Wno-missing-newline-at-eof missing-newline-at-eof.cpp 2> $(@)
291         @$(call compare-target,$(@))
292
293 check-no-missing-newline-at-eof: no-missing-newline-at-eof.test
294
295 # -W[no-]missing-space-after-comma
296
297 missing-space-after-comma.test: missing-space-after-comma.cpp missing-space-after-comma.cmp missing-space-after-comma.stamp $(CSTYLE)
298         @echo "  CHECK   -Wmissing-space-after-comma..."
299         @$(PERL) $(CSTYLE_V) -Wmissing-space-after-comma missing-space-after-comma.cpp 2> $(@)
300         @$(call compare-target,$(@))
301
302 check-missing-space-after-comma: missing-space-after-comma.test
303
304 no-missing-space-after-comma.test: missing-space-after-comma.cpp no-missing-space-after-comma.cmp missing-space-after-comma.stamp $(CSTYLE)
305         @echo "  CHECK   -Wno-missing-space-after-comma..."
306         @$(PERL) $(CSTYLE_V) -Wno-missing-space-after-comma missing-space-after-comma.cpp 2> $(@)
307         @$(call compare-target,$(@))
308
309 check-no-missing-space-after-comma: no-missing-space-after-comma.test
310
311 # -W[no-]missing-space-after-else-if
312
313 missing-space-after-else-if.test: missing-space-after-else-if.cpp missing-space-after-else-if.cmp missing-space-after-else-if.stamp $(CSTYLE)
314         @echo "  CHECK   -Wmissing-space-after-else-if..."
315         @$(PERL) $(CSTYLE_V) -Wmissing-space-after-else-if missing-space-after-else-if.cpp 2> $(@)
316         @$(call compare-target,$(@))
317
318 check-missing-space-after-else-if: missing-space-after-else-if.test
319
320 no-missing-space-after-else-if.test: missing-space-after-else-if.cpp no-missing-space-after-else-if.cmp missing-space-after-else-if.stamp $(CSTYLE)
321         @echo "  CHECK   -Wno-missing-space-after-else-if..."
322         @$(PERL) $(CSTYLE_V) -Wno-missing-space-after-else-if missing-space-after-else-if.cpp 2> $(@)
323         @$(call compare-target,$(@))
324
325 check-no-missing-space-after-else-if: no-missing-space-after-else-if.test
326
327 # -W[no-]missing-space-after-for
328
329 missing-space-after-for.test: missing-space-after-for.cpp missing-space-after-for.cmp missing-space-after-for.stamp $(CSTYLE)
330         @echo "  CHECK   -Wmissing-space-after-for..."
331         @$(PERL) $(CSTYLE_V) -Wmissing-space-after-for missing-space-after-for.cpp 2> $(@)
332         @$(call compare-target,$(@))
333
334 check-missing-space-after-for: missing-space-after-for.test
335
336 no-missing-space-after-for.test: missing-space-after-for.cpp no-missing-space-after-for.cmp missing-space-after-for.stamp $(CSTYLE)
337         @echo "  CHECK   -Wno-missing-space-after-for..."
338         @$(PERL) $(CSTYLE_V) -Wno-missing-space-after-for missing-space-after-for.cpp 2> $(@)
339         @$(call compare-target,$(@))
340
341 check-no-missing-space-after-for: no-missing-space-after-for.test
342
343 # -W[no-]missing-space-after-if
344
345 missing-space-after-if.test: missing-space-after-if.cpp missing-space-after-if.cmp missing-space-after-if.stamp $(CSTYLE)
346         @echo "  CHECK   -Wmissing-space-after-if..."
347         @$(PERL) $(CSTYLE_V) -Wmissing-space-after-if missing-space-after-if.cpp 2> $(@)
348         @$(call compare-target,$(@))
349
350 check-missing-space-after-if: missing-space-after-if.test
351
352 no-missing-space-after-if.test: missing-space-after-if.cpp no-missing-space-after-if.cmp missing-space-after-if.stamp $(CSTYLE)
353         @echo "  CHECK   -Wno-missing-space-after-if..."
354         @$(PERL) $(CSTYLE_V) -Wno-missing-space-after-if missing-space-after-if.cpp 2> $(@)
355         @$(call compare-target,$(@))
356
357 check-no-missing-space-after-if: no-missing-space-after-if.test
358
359 # -W[no-]missing-space-after-operator
360
361 missing-space-after-operator.test: missing-space-after-operator.cpp missing-space-after-operator.cmp missing-space-after-operator.stamp $(CSTYLE)
362         @echo "  CHECK   -Wmissing-space-after-operator..."
363         @$(PERL) $(CSTYLE_V) -Wmissing-space-after-operator missing-space-after-operator.cpp 2> $(@)
364         @$(call compare-target,$(@))
365
366 check-missing-space-after-operator: missing-space-after-operator.test
367
368 no-missing-space-after-operator.test: missing-space-after-operator.cpp no-missing-space-after-operator.cmp missing-space-after-operator.stamp $(CSTYLE)
369         @echo "  CHECK   -Wno-missing-space-after-operator..."
370         @$(PERL) $(CSTYLE_V) -Wno-missing-space-after-operator missing-space-after-operator.cpp 2> $(@)
371         @$(call compare-target,$(@))
372
373 check-no-missing-space-after-operator: no-missing-space-after-operator.test
374
375 # -W[no-]missing-space-after-semicolon
376
377 missing-space-after-semicolon.test: missing-space-after-semicolon.cpp missing-space-after-semicolon.cmp missing-space-after-semicolon.stamp $(CSTYLE)
378         @echo "  CHECK   -Wmissing-space-after-semicolon..."
379         @$(PERL) $(CSTYLE_V) -Wmissing-space-after-semicolon missing-space-after-semicolon.cpp 2> $(@)
380         @$(call compare-target,$(@))
381
382 check-missing-space-after-semicolon: missing-space-after-semicolon.test
383
384 no-missing-space-after-semicolon.test: missing-space-after-semicolon.cpp no-missing-space-after-semicolon.cmp missing-space-after-semicolon.stamp $(CSTYLE)
385         @echo "  CHECK   -Wno-missing-space-after-semicolon..."
386         @$(PERL) $(CSTYLE_V) -Wno-missing-space-after-semicolon missing-space-after-semicolon.cpp 2> $(@)
387         @$(call compare-target,$(@))
388
389 check-no-missing-space-after-semicolon: no-missing-space-after-semicolon.test
390
391 # -W[no-]missing-space-after-switch
392
393 missing-space-after-switch.test: missing-space-after-switch.cpp missing-space-after-switch.cmp missing-space-after-switch.stamp $(CSTYLE)
394         @echo "  CHECK   -Wmissing-space-after-switch..."
395         @$(PERL) $(CSTYLE_V) -Wmissing-space-after-switch missing-space-after-switch.cpp 2> $(@)
396         @$(call compare-target,$(@))
397
398 check-missing-space-after-switch: missing-space-after-switch.test
399
400 no-missing-space-after-switch.test: missing-space-after-switch.cpp no-missing-space-after-switch.cmp missing-space-after-switch.stamp $(CSTYLE)
401         @echo "  CHECK   -Wno-missing-space-after-switch..."
402         @$(PERL) $(CSTYLE_V) -Wno-missing-space-after-switch missing-space-after-switch.cpp 2> $(@)
403         @$(call compare-target,$(@))
404
405 check-no-missing-space-after-switch: no-missing-space-after-switch.test
406
407 # -W[no-]missing-space-after-while
408
409 missing-space-after-while.test: missing-space-after-while.cpp missing-space-after-while.cmp missing-space-after-while.stamp $(CSTYLE)
410         @echo "  CHECK   -Wmissing-space-after-while..."
411         @$(PERL) $(CSTYLE_V) -Wmissing-space-after-while missing-space-after-while.cpp 2> $(@)
412         @$(call compare-target,$(@))
413
414 check-missing-space-after-while: missing-space-after-while.test
415
416 no-missing-space-after-while.test: missing-space-after-while.cpp no-missing-space-after-while.cmp missing-space-after-while.stamp $(CSTYLE)
417         @echo "  CHECK   -Wno-missing-space-after-while..."
418         @$(PERL) $(CSTYLE_V) -Wno-missing-space-after-while missing-space-after-while.cpp 2> $(@)
419         @$(call compare-target,$(@))
420
421 check-no-missing-space-after-while: no-missing-space-after-while.test
422
423 # -W[no-]missing-space-around-binary-operators
424
425 missing-space-around-binary-operators.test: missing-space-around-binary-operators.cpp missing-space-around-binary-operators.cmp missing-space-around-binary-operators.stamp $(CSTYLE)
426         @echo "  CHECK   -Wmissing-space-around-binary-operators..."
427         @$(PERL) $(CSTYLE_V) -Wmissing-space-around-binary-operators missing-space-around-binary-operators.cpp 2> $(@)
428         @$(call compare-target,$(@))
429
430 check-missing-space-around-binary-operators: missing-space-around-binary-operators.test
431
432 no-missing-space-around-binary-operators.test: missing-space-around-binary-operators.cpp no-missing-space-around-binary-operators.cmp missing-space-around-binary-operators.stamp $(CSTYLE)
433         @echo "  CHECK   -Wno-missing-space-around-binary-operators..."
434         @$(PERL) $(CSTYLE_V) -Wno-missing-space-around-binary-operators missing-space-around-binary-operators.cpp 2> $(@)
435         @$(call compare-target,$(@))
436
437 check-no-missing-space-around-binary-operators: no-missing-space-around-binary-operators.test
438
439 # -W[no-]missing-space-around-braces
440
441 missing-space-around-braces.test: missing-space-around-braces.mm missing-space-around-braces.cmp missing-space-around-braces.stamp $(CSTYLE)
442         @echo "  CHECK   -Wmissing-space-around-braces..."
443         @$(PERL) $(CSTYLE_V) -Wmissing-space-around-braces missing-space-around-braces.mm 2> $(@)
444         @$(call compare-target,$(@))
445
446 check-missing-space-around-braces: missing-space-around-braces.test
447
448 no-missing-space-around-braces.test: missing-space-around-braces.mm no-missing-space-around-braces.cmp missing-space-around-braces.stamp $(CSTYLE)
449         @echo "  CHECK   -Wno-missing-space-around-braces..."
450         @$(PERL) $(CSTYLE_V) -Wno-missing-space-around-braces missing-space-around-braces.mm 2> $(@)
451         @$(call compare-target,$(@))
452
453 check-no-missing-space-around-braces: no-missing-space-around-braces.test
454
455 # -W[no-]space-around-unary-operators
456
457 space-around-unary-operators.test: space-around-unary-operators.cpp space-around-unary-operators.cmp space-around-unary-operators.stamp $(CSTYLE)
458         @echo "  CHECK   -Wspace-around-unary-operators..."
459         @$(PERL) $(CSTYLE_V) -Wspace-around-unary-operators space-around-unary-operators.cpp 2> $(@)
460         @$(call compare-target,$(@))
461
462 check-space-around-unary-operators: space-around-unary-operators.test
463
464 no-space-around-unary-operators.test: space-around-unary-operators.cpp no-space-around-unary-operators.cmp space-around-unary-operators.stamp $(CSTYLE)
465         @echo "  CHECK   -Wno-space-around-unary-operators..."
466         @$(PERL) $(CSTYLE_V) -Wno-space-around-unary-operators space-around-unary-operators.cpp 2> $(@)
467         @$(call compare-target,$(@))
468
469 check-no-space-around-unary-operators: no-space-around-unary-operators.test
470
471 # -W[no-]trailing-line
472
473 trailing-line.test: trailing-line.cpp trailing-line.cmp trailing-line.stamp $(CSTYLE)
474         @echo "  CHECK   -Wtrailing-line..."
475         @$(PERL) $(CSTYLE_V) -Wtrailing-line trailing-line.cpp 2> $(@)
476         @$(call compare-target,$(@))
477
478 check-trailing-line: trailing-line.test
479
480 no-trailing-line.test: trailing-line.cpp no-trailing-line.cmp trailing-line.stamp $(CSTYLE)
481         @echo "  CHECK   -Wno-trailing-line..."
482         @$(PERL) $(CSTYLE_V) -Wno-trailing-line trailing-line.cpp 2> $(@)
483         @$(call compare-target,$(@))
484
485 check-no-trailing-line: no-trailing-line.test
486
487 # -W[no-]trailing-space
488
489 trailing-space.test: trailing-space.cpp trailing-space.cmp trailing-space.stamp $(CSTYLE)
490         @echo "  CHECK   -Wtrailing-space..."
491         @$(PERL) $(CSTYLE_V) -Wtrailing-space trailing-space.cpp 2> $(@)
492         @$(call compare-target,$(@))
493
494 check-trailing-space: trailing-space.test
495
496 no-trailing-space.test: trailing-space.cpp no-trailing-space.cmp trailing-space.stamp $(CSTYLE)
497         @echo "  CHECK   -Wno-trailing-space..."
498         @$(PERL) $(CSTYLE_V) -Wno-trailing-space trailing-space.cpp 2> $(@)
499         @$(call compare-target,$(@))
500
501 check-no-trailing-space: no-trailing-space.test
502
503 install:
504         true
505
506 clean:
507         @echo "Cleaning..."
508         @rm -f $(STAMPS) *.test
509         @rm -f *.CKP *.ln *.BAK *.bak core errs ,* *.a *.o .emacs_* \
510         tags TAGS make.log .*make.state MakeOut *~ "#"*