1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/config/makefiles/test/Makefile.in Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,98 @@ 1.4 +# -*- makefile -*- 1.5 +# 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.8 +# You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +STANDALONE_MAKEFILE := 1 1.11 +USE_AUTOTARGETS_MK = 1 1.12 +MAKEUTILS_UNIT_TEST = 1 1.13 +include $(topsrcdir)/config/makefiles/makeutils.mk 1.14 + 1.15 +dir-ts = .deps/test 1.16 +check-arglist = $(dir-ts)/arglist.ts 1.17 +check-autotargets = $(dir-ts)/autotargets_mk.ts 1.18 +check-XinY = $(dir-ts)/check_XinY_mk.ts 1.19 +check-tests =\ 1.20 + $(check-arglist) \ 1.21 + $(check-autotargets) \ 1.22 + $(check-XinY) \ 1.23 + $(NULL) 1.24 + 1.25 + 1.26 +##------------------_## 1.27 +##---] TARGETS [---## 1.28 +##------------------_## 1.29 +all:: 1.30 + 1.31 +clean: 1.32 + $(RM) $(check-tests) 1.33 + 1.34 +########################################################################### 1.35 +## Logic processed at compile time so be selective about when to test 1.36 +## $(MAKE) check VERBOSE=1 1.37 +ifneq ($(NULL),$(findstring check,$(MAKECMDGOALS))) # 1.38 + 1.39 +check-preqs =\ 1.40 + $(call mkdir_deps,$(dir-ts)) \ 1.41 + $(check-tests) \ 1.42 + $(NULL) 1.43 + 1.44 +check:: $(check-preqs) 1.45 + @true 1.46 + 1.47 + 1.48 +ifdef VERBOSE #{ gmake check VERBOSE=1 1.49 + $(info ===========================================================================) 1.50 + $(info Running test: $(MAKECMDGOALS): pwd=$(CURDIR)) 1.51 + $(info ===========================================================================) 1.52 +endif #} 1.53 + 1.54 +ifndef requiredfunction 1.55 + $(error requiredfunction is not defined) 1.56 +endif 1.57 + 1.58 + 1.59 +################## 1.60 +check-XinY-preqs=\ 1.61 + $(call mkdir_deps,$(dir-ts)) \ 1.62 + $(topsrcdir)/config/makefiles/makeutils.mk \ 1.63 + $(srcdir)/check_XinY.mk \ 1.64 + $(eval include $(srcdir)/check_XinY.mk) \ 1.65 + $(NULL) 1.66 + 1.67 +$(check-XinY): $(check-XinY-preqs) 1.68 + @$(TOUCH) $@ 1.69 +# </check-XinY.mk> 1.70 + 1.71 + 1.72 +########################################################################### 1.73 +## check-arglist.mk always invoked as a compile time test 1.74 +## maintain real file dependencies for use later on. 1.75 +check-arglist-preqs=\ 1.76 + $(call mkdir_deps,$(dir-ts)) \ 1.77 + $(topsrcdir)/config/makefiles/makeutils.mk \ 1.78 + $(srcdir)/check-arglist.mk \ 1.79 + $(eval include $(srcdir)/check-arglist.mk) \ 1.80 + $(NULL) 1.81 + 1.82 +$(check-arglist): $(check-arglist-preqs) 1.83 + @$(TOUCH) $@ 1.84 +# </check-arglist.mk> 1.85 + 1.86 + 1.87 +########################################################################### 1.88 +# <CHECK: autotargets.mk> 1.89 +check-autotargets-preqs=\ 1.90 + $(call mkdir_deps,$(dir-ts)) \ 1.91 + $(topsrcdir)/config/makefiles/makeutils.mk \ 1.92 + $(topsrcdir)/config/makefiles/autotargets.mk \ 1.93 + $(srcdir)/check-autotargets.mk \ 1.94 + $(eval include $(srcdir)/check-autotargets.mk) \ 1.95 + $(NULL) 1.96 + 1.97 +$(check-autotargets): $(check-autotargets-preqs) 1.98 + @$(TOUCH) $@ 1.99 +# </CHECK: autotargets.mk> 1.100 + 1.101 +endif #} findstring MAKECMDGOAL