make: fix linting
[haskell/symantic-http.git] / GNUmakefile
index 5898b9f345ed9497a65dcc64347e91e59c1360e5..a4074cdb74bdd5e9409f67cad2572841da89f73e 100644 (file)
@@ -6,7 +6,7 @@ PKGS := \
  symantic-http-pipes \
  symantic-http-test \
  symantic-http-demo
-HS = $(shell find . -name '*.hs' -not -name 'HLint.hs')
+HS = $(shell find $(PKGS) -name '*.hs' -not -name 'HLint.hs')
 cabal := $(shell find . -name '*.cabal' -print -quit)
 QUICKCHECK_TESTS = 1000
 QUICKCHECK_MAXSIZE = 100
@@ -79,7 +79,7 @@ doc: $(PKGS:=/doc)
 HLint.hs: $(HS)
        sed -i -e '/^-- BEGIN: generated hints/,/^-- END: Generated by hlint/d' HLint.hs
        echo '-- BEGIN: generated hints' >> HLint.hs
-       hlint $(foreach p,$(PKGS),--find $p) | grep '^'infix | sort -u >> HLint.hs
+       hlint $(foreach p,$(PKGS),--find $p) | sed -ne 's/^- infix: \(.*\)/\1/p' | sort -u >>HLint.hs
        echo '-- END: generated hints' >> HLint.hs
 
 lint: $(PKGS:=/lint) $(HS)