-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
97 lines (79 loc) · 2.35 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# rb-sisimai/Makefile
# __ __ _ __ _ _
# | \/ | __ _| | _____ / _(_) | ___
# | |\/| |/ _` | |/ / _ \ |_| | |/ _ \
# | | | | (_| | < __/ _| | | __/
# |_| |_|\__,_|_|\_\___|_| |_|_|\___|
# -------------------------------------------------------------------------------------------------
SHELL := /bin/sh
TIME := $(shell date '+%s')
NAME := sisimai
RUBY ?= ruby
JRUBY ?= /usr/local/jr
RAKE ?= rake
MKDIR := mkdir -p
CP := cp
RM := rm -f
DEPENDENCIES = bundle rake minitest
.DEFAULT_GOAL = git-status
REPOS_TARGETS = git-status git-push git-commit-amend git-tag-list git-diff git-reset-soft \
git-rm-cached git-branch
DEVEL_TARGETS = private-sample
BENCH_TARGETS = profile speed-test loc
# -------------------------------------------------------------------------------------------------
.PHONY: clean
depend:
gem install $(DEPENDENCIES)
if [ -d "$(JRUBY)" ]; then \
PATH="$(JRUBY)/bin:$$PATH" $(JRUBY)/bin/gem install $(DEPENDENCIES); \
fi
install-from-rubygems:
gem install $(NAME)
if [ -d "$(JRUBY)" ]; then \
PATH="$(JRUBY)/bin:$$PATH" $(JRUBY)/bin/gem install $(NAME); \
fi
install-from-local:
$(RAKE) install
if [ -d "$(JRUBY)" ]; then \
PATH="$(JRUBY)/bin:$$PATH" $(JRUBY)/bin/rake install; \
fi
build:
$(RAKE) $@
if [ -d "$(JRUBY)" ]; then \
PATH="$(JRUBY)/bin:$$PATH" $(JRUBY)/bin/rake $@; \
fi
release:
$(RAKE) release
if [ -d "$(JRUBY)" ]; then \
PATH="$(JRUBY)/bin:$$PATH" $(JRUBY)/bin/rake release; \
fi
test: user-test author-test
user-test:
# Suppress warning messages until v5.5.0
rake publictest 2> /dev/null
author-test:
# Suppress warning messages until v5.5.0
rake privatetest 2> /dev/null
check:
find lib -type f -exec grep --color -E ' $$' {} /dev/null \;
find lib -type f -exec grep --color -E '[;][ ]*$$' {} /dev/null \;
jruby-test:
if [ -d "$(JRUBY)" ]; then \
PATH="$(JRUBY)/bin:$$PATH" LS_HEAP_SIZE='1024m' $(JRUBY)/bin/rake publictest; \
fi
patrol:
rubocop -fp --display-cop-names --display-style-guide --no-color lib
$(REPOS_TARGETS):
$(MAKE) -f Repository.mk $@
$(DEVEL_TARGETS):
$(MAKE) -f Developers.mk $@
$(BENCH_TARGETS):
$(MAKE) -f Benchmarks.mk $@
diff push branch:
@$(MAKE) git-$@
fix-commit-message: git-commit-amend
cancel-the-latest-commit: git-reset-soft
remove-added-file: git-rm-cached
clean:
$(MAKE) -f Repository.mk clean
$(MAKE) -f Benchmarks.mk clean