summaryrefslogtreecommitdiffstats
path: root/config/makefiles/test/Makefile.in
blob: 6c66d820e90069478f7e604028cd9709a4e7b006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# -*- makefile -*-
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

STANDALONE_MAKEFILE := 1
USE_AUTOTARGETS_MK  = 1
MAKEUTILS_UNIT_TEST = 1
include $(topsrcdir)/config/makefiles/makeutils.mk

dir-ts = .deps/test
check-arglist        = $(dir-ts)/arglist.ts
check-autotargets    = $(dir-ts)/autotargets_mk.ts
check-XinY           = $(dir-ts)/check_XinY_mk.ts
check-tests =\
  $(check-arglist) \
  $(check-autotargets) \
  $(check-XinY) \
  $(NULL)


##------------------_##
##---]  TARGETS  [---##
##------------------_##
all::

clean:
	$(RM) $(check-tests)

###########################################################################
## Logic processed at compile time so be selective about when to test
## $(MAKE) check VERBOSE=1
ifneq ($(NULL),$(findstring check,$(MAKECMDGOALS))) #

check-preqs =\
  $(call mkdir_deps,$(dir-ts)) \
  $(check-tests) \
  $(NULL)

check:: $(check-preqs)
	@true


ifdef VERBOSE #{ gmake check VERBOSE=1
  $(info ===========================================================================)
  $(info Running test: $(MAKECMDGOALS): pwd=$(CURDIR))
  $(info ===========================================================================)
endif #}

ifndef requiredfunction
  $(error requiredfunction is not defined)
endif


##################
check-XinY-preqs=\
  $(call mkdir_deps,$(dir-ts)) \
  $(topsrcdir)/config/makefiles/makeutils.mk \
  $(srcdir)/check_XinY.mk \
  $(eval include $(srcdir)/check_XinY.mk) \
  $(NULL)

$(check-XinY): $(check-XinY-preqs)
	@$(TOUCH) $@
# </check-XinY.mk>


###########################################################################
## check-arglist.mk always invoked as a compile time test
## maintain real file dependencies for use later on.
check-arglist-preqs=\
  $(call mkdir_deps,$(dir-ts)) \
  $(topsrcdir)/config/makefiles/makeutils.mk \
  $(srcdir)/check-arglist.mk \
  $(eval include $(srcdir)/check-arglist.mk) \
  $(NULL)

$(check-arglist): $(check-arglist-preqs)
	@$(TOUCH) $@
# </check-arglist.mk>


###########################################################################
# <CHECK: autotargets.mk>
check-autotargets-preqs=\
  $(call mkdir_deps,$(dir-ts)) \
  $(topsrcdir)/config/makefiles/makeutils.mk \
  $(topsrcdir)/config/makefiles/autotargets.mk \
  $(srcdir)/check-autotargets.mk \
  $(eval include $(srcdir)/check-autotargets.mk) \
  $(NULL)

$(check-autotargets): $(check-autotargets-preqs)
	@$(TOUCH) $@
# </CHECK: autotargets.mk>

endif #} findstring MAKECMDGOAL