Fix HTML5 id.
[doclang.git] / GNUmakefile
index d08cf1b747ab3791f804ae4a28f5ccb5ace6afab..3f90879da9bc7ae2a71f8985e78a4293f03c645e 100644 (file)
@@ -1,5 +1,4 @@
-CABAL := $(shell find . -name '*.cabal' -print -quit)
-HS := $(shell find . -name '*.hs')
+CABAL := $(shell find . -maxdepth 1 -name '*.cabal' -print -quit)
 
 all: build
 
@@ -22,6 +21,11 @@ cleaner:
 %/fast: %
        
 
+%/debug: override STACK_BUILD_FLAGS+=--flag $(CABAL:.cabal=):debug
+%/debug: override STACK_TEST_FLAGS+=--flag $(CABAL:.cabal=):debug
+%/debug: %
+       
+
 doc:
        stack $(STACK_FLAGS) haddock $(STACK_HADDOCK_FLAGS)
 %.html: %.md
@@ -29,17 +33,17 @@ doc:
 %.html/view: %.html
        sensible-browser $*.html
 
-HLint.hs: $(HS)
+HLint.hs: $(shell find . -name '*.hs' -not -name 'HLint.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; \
-       else sensible-browser hlint.html & fi
+       else sensible-browser ./hlint.html & fi
 
 tag:
        name=$$(sed -ne 's/^name: *\(.*\)/\1/p' "$(CABAL)"); \