From 55a9897a6fb5bdb4751c4fad72b4602d361f3132 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 31 Aug 2013 06:08:18 +0000 Subject: GNUmakefile: combine with pkg.mk We hardly use GNU make right now. --- GNUmakefile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 5b7cf68..a1b49b2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,7 +1,23 @@ # Copyright (C) 2013, Eric Wong and all contributors # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) all:: -include pkg.mk + +RUBY = ruby +GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE + @./GIT-VERSION-GEN +-include GIT-VERSION-FILE +lib := lib + +all:: test +test_units := $(wildcard test/test_*.rb) +test: test-unit +test-unit: $(test_units) +$(test_units): + $(RUBY) -I $(lib) $@ $(RUBY_TEST_OPTS) + +check-warnings: + @(for i in $$(git ls-files '*.rb'| grep -v '^setup\.rb$$'); \ + do $(RUBY) -d -W2 -c $$i; done) | grep -v '^Syntax OK$$' || : check: test coverage: export COVERAGE=1 @@ -9,3 +25,6 @@ coverage: > coverage.dump $(MAKE) check $(RUBY) ./test/covshow.rb + +.PHONY: all .FORCE-GIT-VERSION-FILE test $(test_units) +.PHONY: check-warnings -- cgit v1.2.3-24-ge0c7