Improve complexity of fromMap.
[haskell/treemap.git] / GNUmakefile
index 756a23c082a1110558eb00f3023d0c05b6668b58..3ef6636ae65b4d668deadef0c51b95aef6597d30 100644 (file)
@@ -1,11 +1,11 @@
-CABAL := $(shell find . -name '*.cabal' -print -quit)
-HS := $(shell find . -name '*.hs')
+CABAL := $(shell find . -maxdepth 1 -name '*.cabal' -print -quit)
 
 all: build
 
 build:
        stack $(STACK_FLAGS) build $(STACK_BUILD_FLAGS)
 
+.PHONY: test
 test:
        ! grep -q '^Test-Suite\>' $(CABAL) || \
        { stack $(STACK_FLAGS) test $(STACK_TEST_FLAGS); }
@@ -28,13 +28,13 @@ doc:
 %.html/view: %.html
        sensible-browser $*.html
 
-HLint.hs: $(HS)
+HLint.hs: $(shell find . -name '*.hs')
        sed -i -e '/^-- BEGIN: generated hints/,/^-- END: Generated by hlint/d' HLint.hs
        echo '-- BEGIN: generated hints' >> HLint.hs
        hlint --find . | grep '^'infix | sort -u >> HLint.hs
        echo '-- END: generated hints' >> HLint.hs
 
-lint: HLint.hs $(HS)
+lint: HLint.hs
        if hlint --quiet --report=hlint.html -XNoCPP \
         $(shell cabal-cargs --format=ghc --only=default_extensions --sourcefile=$(CABAL)) $(HLINT_FLAGS) .; \
        then rm -f hlint.html; \
@@ -46,9 +46,10 @@ tag:
        git tag --merged | grep -Fqx "$$name-$$version" || \
        git tag -f -s -m "$$name v$$version" $$name-$$version
 
+tar:
+       stack $(STACK_FLAGS) sdist $(STACK_SDIST_FLAGS)
 upload:
-       LANG=C stack $(STACK_FLAGS) sdist --sign
-       LANG=C stack $(STACK_FLAGS) upload .
+       LANG=C stack $(STACK_FLAGS) upload $(STACK_UPLOAD_FLAGS) .
 
 .PHONY: stats
 stats: