From: Michael Orlitzky Date: Thu, 28 Jun 2012 21:13:14 +0000 (-0400) Subject: Use 'find' to locate all source files in the makefile. X-Git-Tag: v0.0.1~32 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Flwn-epub.git;a=commitdiff_plain;h=0ee39f7100c4f7184cded8441e27849f0a123dce;ds=sidebyside Use 'find' to locate all source files in the makefile. --- diff --git a/makefile b/makefile index ec658b0..3ae65f2 100644 --- 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