Commits

Bryan O'Sullivan committed 6e57a75

Build profiling versions of benchmarks

  • Participants
  • Parent commits 53461be

Comments (0)

Files changed (2)

 ^dist$
-^benchmarks/(?:AesonParse|EncodeFile|JsonParse|json-data)$
+^benchmarks/(?:AesonParse|EncodeFile|JsonParse|json-data|.*_p)$
 .*\.(?:h[ip]|o|orig|out|pdf|prof|ps|rej)$
 
 syntax: glob

benchmarks/Makefile

 
 binaries := AesonParse EncodeFile JsonParse
 
-all: json-data/example.json $(binaries)
+all: json-data/example.json $(binaries) $(binaries:%=%_p)
 
-AesonParse: AesonParse.hs
-	$(ghc) $(ghcflags) --make -o $@ $^
+%_p: %.hs
+	$(ghc) $(ghcflags) -prof -auto-all --make -o $@ $^
 
-EncodeFile: EncodeFile.hs
-	$(ghc) $(ghcflags) --make -o $@ $^
-
-JsonParse: JsonParse.hs
+%: %.hs
 	$(ghc) $(ghcflags) --make -o $@ $^
 
 json-data/example.json: json-data.tar.bz2
 	bzip2 -dc < $^ | tar -m -xf -
 
 clean:
-	-rm -f *.o *.hi $(binaries)
+	-rm -f *.o *.hi $(binaries) $(binaries:%=%_p)