2011-06-20 12:38:46 -07:00
|
|
|
# -*- makefile -*-
|
|
|
|
#
|
2012-05-21 04:12:37 -07:00
|
|
|
# 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/.
|
2011-06-20 12:38:46 -07:00
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
##################################################
|
|
|
|
## Gather a list of tests, generate timestamp deps
|
|
|
|
##################################################
|
2011-09-26 08:53:28 -07:00
|
|
|
TS=.ts
|
2011-06-20 12:38:46 -07:00
|
|
|
ifneq (,$(findstring check,$(MAKECMDGOALS)))
|
|
|
|
allsrc = $(wildcard $(srcdir)/*)
|
|
|
|
tests2run = $(notdir $(filter %.tpl,$(allsrc)))
|
|
|
|
check_targets += $(addprefix $(TS)/,$(tests2run))
|
|
|
|
endif
|
|
|
|
|
2011-09-26 08:53:28 -07:00
|
|
|
check:: $(TS) $(check_targets)
|
2011-06-20 12:38:46 -07:00
|
|
|
|
|
|
|
#############################################
|
|
|
|
# Only invoke tests when sources have changed
|
|
|
|
#############################################
|
|
|
|
$(TS)/%: $(srcdir)/%
|
|
|
|
$(PERL) $(srcdir)/runtest $<
|
|
|
|
@touch $@
|
|
|
|
|
2011-09-26 08:53:28 -07:00
|
|
|
#####################################################
|
|
|
|
## Extra dep needed to synchronize parallel execution
|
|
|
|
#####################################################
|
|
|
|
$(TS): $(TS)/.done
|
|
|
|
$(TS)/.done:
|
|
|
|
$(MKDIR) -p $(dir $@)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
GARBAGE_DIRS += $(TS)
|
|
|
|
|
2011-06-20 12:38:46 -07:00
|
|
|
# EOF
|