GNUmakefile: add flog/flay targets
[ruby-mogilefs-client.git] / GNUmakefile
blob64a762d86cea6db2ca86cac87798e06e7b87b9dc
1 # use GNU Make to run tests in parallel, and without depending on Rubygems
2 all:: test
4 T := $(wildcard test/test*.rb)
5 TO := $(subst .rb,.log,$(T))
7 test: $(T)
8 @cat $(TO) | ruby test/aggregate.rb
9 @$(RM) $(TO)
10 clean:
11 $(RM) $(TO) $(addsuffix +,$(TO))
13 t = $(basename $(notdir $@))
14 t_log = $(subst .rb,.log,$@)
16 $(T):
17 @echo $(t); ruby -I lib $@ $(TEST_OPTS) > $(t_log)+ 2>&1
18 @mv $(t_log)+ $(t_log)
20 # using make instead of rake since Rakefile takes too long to load
21 Manifest.txt:
22 git ls-files > $@+
23 mv $@+ $@
25 libs := $(wildcard lib/*.rb lib/*/*.rb)
26 flay_flags =
27 flog_flags =
28 flay: $(libs)
29 flay $(flay_flags) $^
30 flog: $(libs)
31 flog $(flog_flags) $^
32 .PHONY: $(T) Manifest.txt