1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/build/unix/test/Makefile.in Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 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 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +include $(topsrcdir)/config/rules.mk 1.11 + 1.12 +################################################## 1.13 +## Gather a list of tests, generate timestamp deps 1.14 +################################################## 1.15 +TS=.ts 1.16 +ifneq (,$(findstring check,$(MAKECMDGOALS))) 1.17 + allsrc = $(wildcard $(srcdir)/*) 1.18 + tests2run = $(notdir $(filter %.tpl,$(allsrc))) 1.19 + check_targets += $(addprefix $(TS)/,$(tests2run)) 1.20 +endif 1.21 + 1.22 +check:: $(TS) $(check_targets) 1.23 + 1.24 +############################################# 1.25 +# Only invoke tests when sources have changed 1.26 +############################################# 1.27 +$(TS)/%: $(srcdir)/% 1.28 + $(PERL) $(srcdir)/runtest $< 1.29 + @touch $@ 1.30 + 1.31 +##################################################### 1.32 +## Extra dep needed to synchronize parallel execution 1.33 +##################################################### 1.34 +$(TS): $(TS)/.done 1.35 +$(TS)/.done: 1.36 + $(MKDIR) -p $(dir $@) 1.37 + touch $@ 1.38 + 1.39 +GARBAGE_DIRS += $(TS) 1.40 + 1.41 +# EOF