[commit: packages/time] format-widths, ghc, improve-leapseconds, master, posix-perf, tasty, wip/travis: clean up Makefile (b1c2cb6)

git at git.haskell.org git at git.haskell.org
Fri Apr 21 16:43:29 UTC 2017


Repository : ssh://git@git.haskell.org/time

On branches: format-widths,ghc,improve-leapseconds,master,posix-perf,tasty,wip/travis
Link       : http://git.haskell.org/packages/time.git/commitdiff/b1c2cb692a509647df3cc13e51aae4876dab9146

>---------------------------------------------------------------

commit b1c2cb692a509647df3cc13e51aae4876dab9146
Author: Ashley Yakeley <ashley at semantic.org>
Date:   Mon Mar 7 15:47:36 2005 -0800

    clean up Makefile
    
    darcs-hash:20050307234736-ac6dd-66591efb772cae81fb9bd808041e77c25388a881


>---------------------------------------------------------------

b1c2cb692a509647df3cc13e51aae4876dab9146
 Makefile | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index e957529..f96ab63 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,26 @@
-default: CurrentTime.run TestTime.diff
+default: CurrentTime.run TestTime.diff doc
 
 SRCS = System/Time/Clock.hs System/Time/TAI.hs System/Time/Calendar.hs
 
-TestTime: TestTime.o $(patsubst %.hs,%.o,$(SRCS))
+TestTime: TestTime.o libTimeLib.a
 	ghc $^ -o $@
 
-CurrentTime: CurrentTime.o $(patsubst %.hs,%.o,$(SRCS))
+CurrentTime: CurrentTime.o libTimeLib.a
 	ghc $^ -o $@
 
+libTimeLib.a: $(patsubst %.hs,%.o,$(SRCS))
+	rm -f $@
+	ar cru $@ $^
+	ranlib $@
 
 clean:
-	rm -f TestTime *.o *.hi $(patsubst %.hs,%.o,$(SRCS)) $(patsubst %.hs,%.hi,$(SRCS)) Makefile.bak
+	rm -rf TestTime doc haddock *.out *.o *.hi $(patsubst %.hs,%.o,$(SRCS)) $(patsubst %.hs,%.hi,$(SRCS)) Makefile.bak
 
+doc: haddock/index.html
 
-doc: $(SRCS)
-	mkdir -p $@
-	haddock -h -o $@ $^
+haddock/index.html: $(SRCS)
+	mkdir -p haddock
+	haddock -h -o haddock $^
 
 %.diff: %.ref %.out
 	diff -u $^



More information about the ghc-commits mailing list