Clarify a few names in Grammar.Fixity.
[haskell/symantic.git] / GNUmakefile
index 36d2a3382e902d64d80abba96501e879d1694818..ead4bfdaecee9424a38e8b193b4d952bc3da78dc 100644 (file)
@@ -8,10 +8,14 @@ build: $(PKGS:=/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)