Bug 462294 - Add "View Video" to context menu for <video> elements. r=gavin, ui...
[wine-gecko.git] / xpcom / tests / static-checker / Makefile.in
blobf5234ca9f5f6bd25df47b3640f96a434ebcaba89
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is Mozilla 2.
16 # The Initial Developer of the Original Code is
17 # the Mozilla Foundation <http://www.mozilla.org>.
19 # Portions created by the Initial Developer are Copyright (C) 2008
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
23 # Benjamin Smedberg <benjamin@smedbergs.us> (Author)
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 DEPTH = ../../..
40 topsrcdir = @top_srcdir@
41 srcdir = @srcdir@
42 VPATH = @srcdir@
44 # MAKE_DIRS: List of directories to build while looping over directories.
45 MAKE_DIRS += $(MDDEPDIR)
46 GARBAGE_DIRS += $(MDDEPDIR)
48 include $(DEPTH)/config/autoconf.mk
50 FINAL_FAILURE_TESTCASES = \
51 TestFinal.cpp \
52 TestFinalTemplate.cpp \
53 $(NULL)
55 STACK_FAILURE_TESTCASES = \
56 TestStack.cpp \
57 TestStackTemplate.cpp \
58 StackNoConstructor.cpp \
59 StackVector.cpp \
60 StackConditional.cpp \
61 $(NULL)
63 STACK_PASS_TESTCASES = \
64 StackPlacementNewOK.cpp \
65 $(NULL)
67 OUTPARAMS_WARNING_TESTCASES = \
68 e1.cpp \
69 e2.cpp \
70 e4.cpp \
71 e5.cpp \
72 e6.cpp \
73 e7.cpp \
74 e8.cpp \
75 e9.cpp \
76 e10.cpp \
77 e11.cpp \
78 e12.cpp \
79 e13.cpp \
80 $(NULL)
82 OUTPARAMS_PASS_TESTCASES = \
83 o1.cpp \
84 o2.cpp \
85 o3.cpp \
86 o4.cpp \
87 o5.cpp \
88 o6.cpp \
89 o7.cpp \
90 o8.cpp \
91 o9.cpp \
92 o10.cpp \
93 o11.cpp \
94 o12.cpp \
95 o13.cpp \
96 o14.cpp \
97 o15.cpp \
98 o16.cpp \
99 onull.cpp \
100 onull2.cpp \
101 $(NULL)
103 FLOW_PASS_TESTCASES = \
104 flow_through_pass.cpp
106 FLOW_FAILURE_TESTCASES = \
107 flow_through_fail.cpp
109 STATIC_FAILURE_TESTCASES = \
110 $(FINAL_FAILURE_TESTCASES) \
111 $(STACK_FAILURE_TESTCASES) \
112 $(FLOW_FAILURE_TESTCASES)
113 $(NULL)
115 STATIC_WARNING_TESTCASES = \
116 $(OUTPARAMS_WARNING_TESTCASES) \
117 $(NULL)
119 STATIC_PASS_TESTCASES = \
120 $(OUTPARAMS_PASS_TESTCASES) \
121 $(STACK_PASS_TESTCASES) \
122 $(FLOW_PASS_TESTCASES) \
123 $(NULL)
125 include $(topsrcdir)/config/rules.mk
127 # We want to compile each file and invert the result to ensure that
128 # compilation failed.
129 check:: \
130 $(STATIC_FAILURE_TESTCASES:.cpp=.s-fail) \
131 $(STATIC_WARNING_TESTCASES:.cpp=.s-warn) \
132 $(STATIC_PASS_TESTCASES:.cpp=.s-pass)
134 %.s-fail: %.cpp Makefile Makefile.in $(DEHYDRA_SCRIPTS)
135 @printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
136 @if $(CCC) $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
137 printf "fail:\nerror: compilation of $(<F) succeeded. It shouldn't have!\n"; \
138 exit 1; \
139 else \
140 printf "ok.\n"; \
143 %.s-warn: %.cpp Makefile Makefile.in $(DEHYDRA_SCRIPTS)
144 @printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
145 @if $(CCC) -Werror $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
146 printf "fail:\nerror: compilation of $(<F) succeeded with -Werror. It shouldn't have!\n" \
147 exit 1; \
149 @if $(CCC) $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).werrlog 2>&1; then \
150 printf "ok.\n"; \
151 else \
152 printf "fail:\nerror: compilation of $(<F) without -Werror failed. A warning should have been issued.\n" \
153 exit 1; \
156 %.s-pass: %.cpp Makefile Makefile.in $(DEHYDRA_SCRIPTS)
157 @printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
158 @if $(CCC) -Werror $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
159 printf "ok.\n"; \
160 else \
161 printf "fail:\nerror: compilation of $(<F) failed. It shouldn't have!\n"; \
162 exit 1; \