Use 'find' to locate all source files in the makefile.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 28 Jun 2012 21:13:14 +0000 (17:13 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 28 Jun 2012 21:13:14 +0000 (17:13 -0400)
makefile

index ec658b07233d557c7bc4e2297927025376f6c5c0..3ae65f2b7d4f7973445e7cf2d80ecc3f631354b2 100644 (file)
--- a/makefile
+++ b/makefile
@@ -2,10 +2,11 @@
 
 # There's onlt one '$' in the awk script, but we have to double-money
 # it for make.
-PN  := $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
-BIN := dist/build/$(PN)/$(PN)
+PN   = $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
+BIN  = dist/build/$(PN)/$(PN)
+SRCS = $(shell find src/ -name '*.hs')
 
-$(BIN): src/*.hs
+$(BIN): $(SRCS)
        runghc Setup.hs clean
        runghc Setup.hs configure --user --flags=${FLAGS}
        runghc Setup.hs build