forked from eddysystems/eddy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 1.23 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
GRAM = tarski/src/tarski/eddy.gram
PARSE = tarski/src/tarski/ParseEddy.java
ACTIONS = tarski/src/tarski/ParseEddyActions.scala
AMBIGUITY = out/artifacts/ambiguity_jar/ambiguity.jar
MODIFIED = `git status --short | grep -c ""`
COMMIT = `git log --no-color --oneline --no-abbrev | head -n1 | awk '{ print $$1; }'`
GITMOD = $(strip $(shell git status --porcelain | wc -l | sed 's/\w*\(0\)[^0-9]*//'))
GITLOC = $(strip $(shell git status -b --porcelain | head -n 1 | awk '{ print $$3 }'))
DIRTY = $(if $(GITMOD),-dirty,)
LOCAL = $(if $(GITLOC),-local,)
VERSION = $(strip $(subst release-,,$(shell git describe --tags)))
all: $(PARSE) $(ACTIONS)
jar: eddy.jar
.PHONY: version
version:
@echo $(VERSION)
$(PARSE): $(AMBIGUITY) $(GRAM)
java -jar $(AMBIGUITY) $(GRAM) > $@
$(ACTIONS): $(AMBIGUITY) $(GRAM)
java -jar $(AMBIGUITY) -a $(GRAM) > $@
.PHONY: commit
commit:
@echo $(COMMIT)$(DIRTY)$(LOCAL)
eddy.jar: eddy.zip shrink.pro
proguard @shrink.pro
.PHONY: install
install: eddy.jar
find "${HOME}/Library/Application Support" -name "IdeaIC*" -print0 | xargs -0 -n 1 cp eddy.jar
.PHONY: uninstall
uninstall:
find "${HOME}/Library/Application Support" -path "*/IdeaIC*/eddy.jar" -print0 | xargs -0 rm
.PHONY: clean
clean:
rm -f $(PARSE) $(ACTIONS)