-PKGS := symantic-grammar symantic-document symantic symantic-lib
+PKGS := symantic-grammar symantic-document symantic symantic-lib symantic-cli
HS := $(shell find $(PKGS) -name '*.hs' -not -name 'HLint.hs')
all: build
cd $*; stack $(STACK_FLAGS) build $(STACK_BUILD_FLAGS)
.PHONY: $(PKGS) $(foreach p,$(PKGS),$(eval $p: $p/build))
+.PHONY: $(PKGS:=/test)
test: $(PKGS:=/test)
-%/test:
- ! grep -q '^Test-Suite\>' $*/$*.cabal || \
- { cd $*; stack $(STACK_FLAGS) test $(STACK_TEST_FLAGS); }
+define test
+$p/test:
+ ! grep -q '^Test-Suite\>' $p/$p.cabal || \
+ { cd $p; stack $$(STACK_FLAGS) test $$(STACK_TEST_FLAGS); }
+endef
+$(foreach p,$(PKGS),$(eval $(call test)))
clean: $(PKGS:=/clean)
cleaner: $(PKGS:=/cleaner)