3
# This Source Code Form is subject to the terms of the Mozilla Public
4
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
5
# You can obtain one at http://mozilla.org/MPL/2.0/.
8
topsrcdir = @top_srcdir@
12
include $(DEPTH)/config/autoconf.mk
14
USE_AUTOTARGETS_MK = 1
15
MAKEUTILS_UNIT_TEST = 1
16
include $(topsrcdir)/config/makefiles/makeutils.mk
19
check-arglist = $(dir-ts)/arglist.ts
20
check-autotargets = $(dir-ts)/autotargets_mk.ts
21
check-export-targets = $(dir-ts)/export-targets-mk.ts
22
check-XinY = $(dir-ts)/check_XinY_mk.ts
23
check-xpidl = $(dir-ts)/xpidl-mk.ts
26
$(check-autotargets) \
27
$(check-export-targets) \
33
##------------------_##
35
##------------------_##
40
@$(MAKE) --no-print-directory -f $(srcdir)/check-xpidl.mk clean-xpidl topsrcdir=$(topsrcdir)
42
###########################################################################
43
## Logic processed at compile time so be selective about when to test
44
## $(MAKE) check VERBOSE=1
45
ifneq ($(NULL),$(findstring check,$(MAKECMDGOALS))) #
48
$(call mkdir_deps,$(dir-ts)) \
52
check:: $(check-preqs)
56
ifdef VERBOSE #{ gmake check VERBOSE=1
57
$(info ===========================================================================)
58
$(info Running test: $(MAKECMDGOALS): pwd=$(CURDIR))
59
$(info ===========================================================================)
62
ifndef requiredfunction
63
$(error requiredfunction is not defined)
69
$(call mkdir_deps,$(dir-ts)) \
70
$(topsrcdir)/config/makefiles/makeutils.mk \
71
$(srcdir)/check_XinY.mk \
72
$(eval include $(srcdir)/check_XinY.mk) \
75
$(check-XinY): $(check-XinY-preqs)
80
###########################################################################
81
## check-arglist.mk always invoked as a compile time test
82
## maintain real file dependencies for use later on.
84
$(call mkdir_deps,$(dir-ts)) \
85
$(topsrcdir)/config/makefiles/makeutils.mk \
86
$(srcdir)/check-arglist.mk \
87
$(eval include $(srcdir)/check-arglist.mk) \
90
$(check-arglist): $(check-arglist-preqs)
95
###########################################################################
96
# <CHECK: autotargets.mk>
97
check-autotargets-preqs=\
98
$(call mkdir_deps,$(dir-ts)) \
99
$(topsrcdir)/config/makefiles/makeutils.mk \
100
$(topsrcdir)/config/makefiles/autotargets.mk \
101
$(srcdir)/check-autotargets.mk \
102
$(eval include $(srcdir)/check-autotargets.mk) \
105
$(check-autotargets): $(check-autotargets-preqs)
107
# </CHECK: autotargets.mk>
110
###########################################################################
111
# <CHECK: export-targets.mk>
112
check-export-targets-preqs=\
113
$(call mkdir_deps,$(dir-ts)) \
114
$(topsrcdir)/config/makefiles/makeutils.mk \
115
$(topsrcdir)/config/makefiles/target_export.mk \
116
$(srcdir)/check-export-targets.mk \
121
checkup: $(eval include $(srcdir)/check-export-targets.mk)
123
$(check-export-targets): $(check-export-targets-preqs)
125
# </CHECK: export-targets.mk>
127
###########################################################################
128
##{ <CHECK: xpidl.mk>
130
$(call mkdir_deps,$(dir-ts)) \
131
$(topsrcdir)/config/config.mk \
132
$(topsrcdir)/config/makefiles/makeutils.mk \
133
$(topsrcdir)/config/makefiles/xpidl.mk \
134
$(srcdir)/check-xpidl.mk \
138
"topsrcdir=$(topsrcdir)" \
141
$(check-xpidl): $(check-xpidl-preqs)
142
$(MAKE) -f $(srcdir)/check-xpidl.mk check-xpidl $(check-xpidl-args)
146
endif #} findstring MAKECMDGOAL