From 0ee39f7100c4f7184cded8441e27849f0a123dce Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 28 Jun 2012 17:13:14 -0400 Subject: [PATCH] Use 'find' to locate all source files in the makefile. --- makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.44.2