michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: OUTPARAMS_WARNING_TESTCASES = \ michael@0: e1.cpp \ michael@0: e4.cpp \ michael@0: e6.cpp \ michael@0: e7.cpp \ michael@0: e8.cpp \ michael@0: e9.cpp \ michael@0: e10.cpp \ michael@0: e11.cpp \ michael@0: e12.cpp \ michael@0: e13.cpp \ michael@0: $(NULL) michael@0: michael@0: OUTPARAMS_NS_FAILED_TESTCASES = \ michael@0: e2.cpp \ michael@0: e5.cpp \ michael@0: $(NULL) michael@0: michael@0: OUTPARAMS_PASS_TESTCASES = \ michael@0: o1.cpp \ michael@0: o2.cpp \ michael@0: o3.cpp \ michael@0: o4.cpp \ michael@0: o5.cpp \ michael@0: o6.cpp \ michael@0: o7.cpp \ michael@0: o8.cpp \ michael@0: o9.cpp \ michael@0: o10.cpp \ michael@0: o11.cpp \ michael@0: o12.cpp \ michael@0: o13.cpp \ michael@0: o14.cpp \ michael@0: o15.cpp \ michael@0: o16.cpp \ michael@0: onull.cpp \ michael@0: onull2.cpp \ michael@0: opmember.cpp \ michael@0: $(NULL) michael@0: michael@0: FLOW_PASS_TESTCASES = \ michael@0: flow_through_pass.cpp michael@0: michael@0: FLOW_FAILURE_TESTCASES = \ michael@0: flow_through_fail.cpp michael@0: michael@0: MUST_OVERRIDE_PASS_TESTCASES = \ michael@0: OverrideOK1.cpp \ michael@0: OverrideOK2.cpp \ michael@0: OverrideOK3-NamespaceTypedef.cpp \ michael@0: $(NULL) michael@0: michael@0: MUST_OVERRIDE_FAILURE_TESTCASES = \ michael@0: OverrideFail1.cpp \ michael@0: OverrideFail2.cpp \ michael@0: OverrideFail3.cpp \ michael@0: OverrideFail4.cpp \ michael@0: $(NULL) michael@0: michael@0: OVERRIDE_PASS_TESTCASES = \ michael@0: override-pass.cpp \ michael@0: override-namespace-typedef.cpp \ michael@0: $(NULL) michael@0: michael@0: OVERRIDE_FAILURE_TESTCASES = \ michael@0: override-global.cpp \ michael@0: override-signature.cpp \ michael@0: override-static.cpp \ michael@0: override-virtual.cpp \ michael@0: $(NULL) michael@0: michael@0: STATIC_INIT_PASS_TESTCASES = \ michael@0: TestStaticInitStructOK.cpp \ michael@0: $(NULL) michael@0: michael@0: STATIC_INIT_WARNING_TESTCASES = \ michael@0: TestStaticInitAttr.cpp \ michael@0: TestStaticInitConstructor.cpp \ michael@0: TestStaticInitGlobal.cpp \ michael@0: TestStaticInitGlobalConst.cpp \ michael@0: $(NULL) michael@0: michael@0: STATIC_FAILURE_TESTCASES = \ michael@0: $(FLOW_FAILURE_TESTCASES) \ michael@0: $(MUST_OVERRIDE_FAILURE_TESTCASES) \ michael@0: $(OVERRIDE_FAILURE_TESTCASES) \ michael@0: $(NULL) michael@0: michael@0: STATIC_WARNING_TESTCASES = \ michael@0: $(OUTPARAMS_WARNING_TESTCASES) \ michael@0: $(STATIC_INIT_WARNING_TESTCASES) \ michael@0: $(NULL) michael@0: michael@0: STATIC_PASS_TESTCASES = \ michael@0: $(OUTPARAMS_NS_FAILED_TESTCASES) \ michael@0: $(OUTPARAMS_PASS_TESTCASES) \ michael@0: $(FLOW_PASS_TESTCASES) \ michael@0: $(MUST_OVERRIDE_PASS_TESTCASES) \ michael@0: $(OVERRIDE_PASS_TESTCASES) \ michael@0: $(STATIC_INIT_PASS_TESTCASES) \ michael@0: $(NULL) michael@0: michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: # We want to compile each file and invert the result to ensure that michael@0: # compilation failed. michael@0: check:: \ michael@0: $(STATIC_FAILURE_TESTCASES:.cpp=.s-fail) \ michael@0: $(STATIC_WARNING_TESTCASES:.cpp=.s-warn) \ michael@0: $(STATIC_PASS_TESTCASES:.cpp=.s-pass) michael@0: michael@0: %.s-fail: %.cpp $(GLOBAL_DEPS) $(DEHYDRA_SCRIPTS) $(call mkdir_deps,$(MDDEPDIR)) michael@0: @printf 'Compiling $($(*F).errlog 2>&1; then \ michael@0: printf 'fail:\nerror: compilation of $($(*F).errlog 2>&1; then \ michael@0: printf 'fail:\nerror: compilation of $($(*F).werrlog 2>&1; then \ michael@0: printf 'ok.\n'; \ michael@0: else \ michael@0: printf 'fail:\nerror: compilation of $($(*F).errlog 2>&1; then \ michael@0: printf 'ok.\n'; \ michael@0: else \ michael@0: printf 'fail:\nerror: compilation of $(