]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/blobdiff - makefile
Add an 'install' makefile target.
[dead/lwn-epub.git] / makefile
index ec658b07233d557c7bc4e2297927025376f6c5c0..a848bcc9e227bed5f264de15f287829d98eda6bc 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.
 
 # 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
        runghc Setup.hs clean
        runghc Setup.hs configure --user --flags=${FLAGS}
        runghc Setup.hs build
@@ -16,6 +17,8 @@ clean:
        rm -f *.prof
        rm -rf .hpc
 
        rm -f *.prof
        rm -rf .hpc
 
+install: $(BIN)
+       runghc Setup.hs install
 
 # Neither 'haddock' nor 'hscolour' seem to work properly.
 doc: src_html
 
 # Neither 'haddock' nor 'hscolour' seem to work properly.
 doc: src_html