mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-12 14:37:50 +00:00
146 lines
3.9 KiB
Makefile
146 lines
3.9 KiB
Makefile
# -*- 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/.
|
|
|
|
DEPTH = @DEPTH@
|
|
topsrcdir = @top_srcdir@
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
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-export-targets = $(dir-ts)/export-targets-mk.ts
|
|
check-XinY = $(dir-ts)/check_XinY_mk.ts
|
|
check-xpidl = $(dir-ts)/xpidl-mk.ts
|
|
check-tests =\
|
|
$(check-arglist) \
|
|
$(check-autotargets) \
|
|
$(check-export-targets) \
|
|
$(check-XinY) \
|
|
$(check-xpidl) \
|
|
$(NULL)
|
|
|
|
|
|
##------------------_##
|
|
##---] TARGETS [---##
|
|
##------------------_##
|
|
all::
|
|
|
|
clean:
|
|
$(RM) $(check-tests)
|
|
@$(MAKE) --no-print-directory -f $(srcdir)/check-xpidl.mk clean-xpidl topsrcdir=$(topsrcdir)
|
|
|
|
###########################################################################
|
|
## 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>
|
|
|
|
|
|
###########################################################################
|
|
# <CHECK: export-targets.mk>
|
|
check-export-targets-preqs=\
|
|
$(call mkdir_deps,$(dir-ts)) \
|
|
$(topsrcdir)/config/makefiles/makeutils.mk \
|
|
$(topsrcdir)/config/makefiles/target_export.mk \
|
|
$(srcdir)/check-export-targets.mk \
|
|
checkup \
|
|
$(NULL)
|
|
|
|
# include then test
|
|
checkup: $(eval include $(srcdir)/check-export-targets.mk)
|
|
|
|
$(check-export-targets): $(check-export-targets-preqs)
|
|
@$(TOUCH) $@
|
|
# </CHECK: export-targets.mk>
|
|
|
|
###########################################################################
|
|
##{ <CHECK: xpidl.mk>
|
|
check-xpidl-preqs=\
|
|
$(call mkdir_deps,$(dir-ts)) \
|
|
$(topsrcdir)/config/makefiles/makeutils.mk \
|
|
$(topsrcdir)/config/makefiles/xpidl.mk \
|
|
$(srcdir)/check-xpidl.mk \
|
|
$(NULL)
|
|
|
|
check-xpidl-args =\
|
|
"topsrcdir=$(topsrcdir)" \
|
|
"srcdir=$(srcdir)" \
|
|
$(NULL)
|
|
$(check-xpidl): $(check-xpidl-preqs)
|
|
$(MAKE) -f $(srcdir)/check-xpidl.mk check-xpidl $(check-xpidl-args)
|
|
@$(TOUCH) $@
|
|
#} </check-xpidl.mk>
|
|
|
|
endif #} findstring MAKECMDGOAL
|