From eb84e2fedf4425333548a7ee477caefb739dfc83 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 10 Sep 2010 01:57:41 +0000 Subject: [PATCH] tools: updated autotest and autoweb rules, better fixperms, install is default rule --- Makefile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5646c30be..ea59ce62c 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ VERSIONSENSITIVEFILES=\ DOWNLOAD.markdown \ $(CABALFILES) \ -default: tag hledger +default: tag install ###################################################################### # BUILDING @@ -98,9 +98,15 @@ allcabal%: all%: for p in $(PACKAGES); do (echo doing $* in $$p; cd $$p; $*); done -# fix permissions (eg after darcs get) -fixperms: - chmod +x $(MAIN) tools/* +# auto-recompile and run (hledger test) whenever a module changes. +# sp is from searchpath.org, you might need the http://joyful.com/repos/searchpath version. +autotest: setversion + sp --no-exts --no-default-map -o bin/hledger ghc --make hledger/hledger.hs -ihledger $(BUILDFLAGS) --run test + +# auto-recompile and run (hledger-web) whenever a module changes. +# sp is from searchpath.org, you might need the http://joyful.com/repos/searchpath version. +autoweb: setversion + sp --no-exts --no-default-map -o bin/hledger-web ghc --make hledger-web/Main.hs -ihledger-web -ihledger $(BUILDFLAGS) --run # build the standalone unit test runner. Requires test-framework, which # may not work on windows. @@ -691,6 +697,10 @@ showreleasechanges: ###################################################################### # MISCELLANEOUS +# fix permissions (eg after darcs get) +fixperms: + chmod +x tools/* $(MAIN) hledger-*/Main.hs + tag: emacstags emacstags: