From 76c10dada86fd807d36ccafca393e945e381696a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 12 Nov 2016 02:13:42 +0000 Subject: initial --- GNUmakefile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 GNUmakefile (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..49ab677 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,45 @@ +# Copyright (C) 2016 all contributors +# License: GPL-2.0+ +all:: +pkg = msgthr +RUBY = ruby +lib := lib +VERSION := 0.0.0 + +all:: test +test_units := $(wildcard test/test_*.rb) +test: $(test_units) +$(test_units): + $(RUBY) -w -I $(lib) $@ -v + +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 + +pkggem := pkg/$(pkg)-$(VERSION).gem + +fix-perms: + git ls-tree -r HEAD | awk '/^100644 / {print $$NF}' | xargs chmod 644 + +gem: $(pkggem) + +install-gem: $(pkggem) + gem install --local $(CURDIR)/$< + +$(pkggem): .manifest + VERSION=$(VERSION) gem build $(pkg).gemspec + mkdir -p pkg + mv $(@F) $@ + +pkg_extra := + +.manifest: fix-perms + git ls-files | LC_ALL=C sort >$@+ + cmp $@+ $@ || mv $@+ $@; rm -f $@+ + +package: $(pkggem) + +.PHONY: all test $(test_units) +.PHONY: check-warnings fix-perms -- cgit v1.2.3-24-ge0c7