]> Git — Sourcephile - haskell/symantic.git/blob - GNUmakefile
Cleanup dead-end attempts.
[haskell/symantic.git] / GNUmakefile
1 PKGS := symantic-grammar symantic symantic-lib
2
3 all: build
4
5 build: $(PKGS:=/build)
6 %/build:
7 cd $*; stack $(STACK_FLAGS) build $(STACK_BUILD_FLAGS)
8
9 test: $(PKGS:=/test)
10 %/test:
11 ! grep -q '^Test-Suite\>' $*/$*.cabal || \
12 { cd $*; stack $(STACK_FLAGS) test $(STACK_BUILD_FLAGS); }
13
14 clean: $(PKGS:=/clean)
15 %/clean:
16 cd $*; stack $(STACK_FLAGS) clean --full
17
18 tag: $(PKGS:=/tag)
19 %/tag:
20 cabal=$*/$*.cabal; \
21 name=$$(sed -ne 's/^name: *\(.*\)/\1/p' "$$cabal"); \
22 version=$$(sed -ne 's/^version: *\(.*\)/\1/p' "$$cabal"); \
23 git tag --merged | grep -Fqx "$$name-$$version" || \
24 git tag -f -s -m "$$name v$$version" $$name-$$version
25
26 .PHONY: stats
27 stats:
28 gitstats . $@
29 stats/view: stats
30 sensible-browser stats/index.html