[commit: packages/time] master: clean up Makefile (cc4d5c2)

git at git.haskell.org git at git.haskell.org
Sun Dec 20 07:45:42 UTC 2015


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

On branch  : master
Link       : http://git.haskell.org/packages/time.git/commitdiff/cc4d5c2ee1bcfc224d98a5f41054b511c5b52cfc

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

commit cc4d5c2ee1bcfc224d98a5f41054b511c5b52cfc
Author: Ashley Yakeley <ashley at semantic.org>
Date:   Wed Feb 23 02:58:07 2005 -0800

    clean up Makefile
    
    darcs-hash:20050223105807-ac6dd-7d333afe8a9804e06faab7a6bebf8e07ee435d9c


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

cc4d5c2ee1bcfc224d98a5f41054b511c5b52cfc
 Makefile    | 18 +++++++++++++-----
 TestTime.hs |  2 +-
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 4a6709f..502873c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,19 @@
 default: TestTime.run
 
-#TestTime: TestTime.o System/Time/Clock.o System/Time/TAI.o System/Time/Calendar.o
-TestTime: TestTime.o System/Time/Clock.o
+# SRCS = System/Time/Clock.hs System/Time/TAI.hs System/Time/Calendar.hs
+SRCS = System/Time/Clock.hs System/Time/TAI.hs
+
+TestTime: TestTime.o $(patsubst %.hs,%.o,$(SRCS))
 	ghc $^ -o $@
 
 
 clean:
-	rm -f TestTime *.o *.hi System/Time/*.o System/Time/*.hi Makefile.bak
+	rm -f TestTime *.o *.hi $(patsubst %.hs,%.o,$(SRCS)) $(patsubst %.hs,%.hi,$(SRCS)) Makefile.bak
+
+
+doc: $(SRCS)
+	mkdir -p $@
+	haddock -h -o $@ $^
 
 
 %.run: %
@@ -18,13 +25,14 @@ clean:
 %.o: %.hs
 	ghc -c $< -o $@
 
-depend: TestTime.hs System/Time/Clock.hs System/Time/TAI.hs System/Time/Calendar.hs
+depend: TestTime.hs $(SRCS)
 	ghc -M $^
+
 # DO NOT DELETE: Beginning of Haskell dependencies
 TestTime.o : TestTime.hs
+TestTime.o : ./System/Time/TAI.hi
 TestTime.o : ./System/Time/Clock.hi
 System/Time/Clock.o : System/Time/Clock.hs
 System/Time/TAI.o : System/Time/TAI.hs
 System/Time/TAI.o : System/Time/Clock.hi
-System/Time/Calendar.o : System/Time/Calendar.hs
 # DO NOT DELETE: End of Haskell dependencies
diff --git a/TestTime.hs b/TestTime.hs
index 77dff58..9f7339b 100644
--- a/TestTime.hs
+++ b/TestTime.hs
@@ -1,7 +1,7 @@
 module Main where
 
 import System.Time.Clock
---import System.Time.TAI
+import System.Time.TAI
 --import System.Time.Calendar
 
 main :: IO ()



More information about the ghc-commits mailing list