]> Git — Sourcephile - haskell/symantic.git/blob - GNUmakefile
Clarification : Megaparsec integration.
[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 .PHONY: $(PKGS) $(foreach p,$(PKGS),$(eval $p: $p/build))
9
10 test: $(PKGS:=/test)
11 %/test:
12 ! grep -q '^Test-Suite\>' $*/$*.cabal || \
13 { cd $*; stack $(STACK_FLAGS) test $(STACK_BUILD_FLAGS); }
14
15 clean: $(PKGS:=/clean)
16 %/clean:
17 cd $*; stack $(STACK_FLAGS) clean --full
18
19 tag: $(PKGS:=/tag)
20 %/tag:
21 cabal=$*/$*.cabal; \
22 name=$$(sed -ne 's/^name: *\(.*\)/\1/p' "$$cabal"); \
23 version=$$(sed -ne 's/^version: *\(.*\)/\1/p' "$$cabal"); \
24 git tag --merged | grep -Fqx "$$name-$$version" || \
25 git tag -f -s -m "$$name v$$version" $$name-$$version
26
27 .PHONY: stats
28 stats:
29 gitstats . $@
30 stats/view: stats
31 sensible-browser stats/index.html