Add copy of .ttf font with .eot extension for testing
[wine-gecko.git] / xpcom / tests / static-checker / Makefile.in
blob475153d1f43fd325da750249007175dcf4980cb7
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 # We will do compilations that create dependency files.
45 NEED_MDDEPDIR = 1
47 include $(DEPTH)/config/autoconf.mk
49 FINAL_FAILURE_TESTCASES = \
50 TestFinal.cpp \
51 TestFinalTemplate.cpp \
52 $(NULL)
54 STACK_FAILURE_TESTCASES = \
55 TestStack.cpp \
56 TestStackTemplate.cpp \
57 StackNoConstructor.cpp \
58 StackVector.cpp \
59 StackConditional.cpp \
60 StackAggrInit.cpp \
61 $(NULL)
63 STACK_PASS_TESTCASES = \
64 StackPlacementNewOK.cpp \
65 $(NULL)
67 OUTPARAMS_WARNING_TESTCASES = \
68 e1.cpp \
69 e4.cpp \
70 e6.cpp \
71 e7.cpp \
72 e8.cpp \
73 e9.cpp \
74 e10.cpp \
75 e11.cpp \
76 e12.cpp \
77 e13.cpp \
78 $(NULL)
80 OUTPARAMS_NS_FAILED_TESTCASES = \
81 e2.cpp \
82 e5.cpp \
83 $(NULL)
85 OUTPARAMS_PASS_TESTCASES = \
86 o1.cpp \
87 o2.cpp \
88 o3.cpp \
89 o4.cpp \
90 o5.cpp \
91 o6.cpp \
92 o7.cpp \
93 o8.cpp \
94 o9.cpp \
95 o10.cpp \
96 o11.cpp \
97 o12.cpp \
98 o13.cpp \
99 o14.cpp \
100 o15.cpp \
101 o16.cpp \
102 onull.cpp \
103 onull2.cpp \
104 $(NULL)
106 FLOW_PASS_TESTCASES = \
107 flow_through_pass.cpp
109 FLOW_FAILURE_TESTCASES = \
110 flow_through_fail.cpp
112 STATIC_FAILURE_TESTCASES = \
113 $(FINAL_FAILURE_TESTCASES) \
114 $(FLOW_FAILURE_TESTCASES)
115 $(NULL)
117 STATIC_WARNING_TESTCASES = \
118 $(OUTPARAMS_WARNING_TESTCASES) \
119 $(STACK_FAILURE_TESTCASES) \
120 $(NULL)
122 STATIC_PASS_TESTCASES = \
123 $(OUTPARAMS_NS_FAILED_TESTCASES) \
124 $(OUTPARAMS_PASS_TESTCASES) \
125 $(STACK_PASS_TESTCASES) \
126 $(FLOW_PASS_TESTCASES) \
127 $(NULL)
129 REQUIRES = xpcom
131 include $(topsrcdir)/config/rules.mk
133 # We want to compile each file and invert the result to ensure that
134 # compilation failed.
135 check:: \
136 $(STATIC_FAILURE_TESTCASES:.cpp=.s-fail) \
137 $(STATIC_WARNING_TESTCASES:.cpp=.s-warn) \
138 $(STATIC_PASS_TESTCASES:.cpp=.s-pass)
140 %.s-fail: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS)
141 @printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
142 @if $(CCC) $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
143 printf "fail:\nerror: compilation of $(<F) succeeded. It shouldn't have!\n"; \
144 exit 1; \
145 else \
146 printf "ok.\n"; \
149 %.s-warn: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS)
150 @printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
151 @if $(CCC) -Werror $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
152 printf "fail:\nerror: compilation of $(<F) succeeded with -Werror. It shouldn't have!\n"; \
153 exit 1; \
155 @if $(CCC) $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).werrlog 2>&1; then \
156 printf "ok.\n"; \
157 else \
158 printf "fail:\nerror: compilation of $(<F) without -Werror failed. A warning should have been issued.\n"; \
159 exit 1; \
162 %.s-pass: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS)
163 @printf "Compiling $(<F) to check that the static-analysis script is checking properly..."
164 @if $(CCC) -Werror $(OUTOPTION)/dev/null -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) >$(*F).errlog 2>&1; then \
165 printf "ok.\n"; \
166 else \
167 printf "fail:\nerror: compilation of $(<F) failed. It shouldn't have!\n"; \
168 exit 1; \