Big Split into separate fixed and time packages
authorAshley Yakeley <ashley@semantic.org>
Mon, 6 Feb 2006 05:42:30 +0000 (21:42 -0800)
committerAshley Yakeley <ashley@semantic.org>
Mon, 6 Feb 2006 05:42:30 +0000 (21:42 -0800)
darcs-hash:20060206054230-ac6dd-a970e95db4cf6337537aaf779596636f8b92f5fe

65 files changed:
Makefile
TimeLib.xcodeproj/project.pbxproj
fixed/Data/Fixed.hs [moved from Data/Fixed.hs with 100% similarity]
fixed/LICENSE [new file with mode: 0644]
fixed/Makefile [new file with mode: 0644]
fixed/Setup.hs [moved from Setup.hs with 100% similarity]
fixed/fixed.cabal [new file with mode: 0644]
fixed/test/Makefile [new file with mode: 0644]
fixed/test/TestFixed.hs [moved from test/TestFixed.hs with 100% similarity]
fixed/test/TestFixed.ref [moved from test/TestFixed.ref with 100% similarity]
test/Makefile [deleted file]
time/Data/Time.hs [moved from Data/Time.hs with 100% similarity]
time/Data/Time/Calendar.hs [moved from Data/Time/Calendar.hs with 100% similarity]
time/Data/Time/Calendar/Days.hs [moved from Data/Time/Calendar/Days.hs with 100% similarity]
time/Data/Time/Calendar/Easter.hs [moved from Data/Time/Calendar/Easter.hs with 100% similarity]
time/Data/Time/Calendar/Gregorian.hs [moved from Data/Time/Calendar/Gregorian.hs with 100% similarity]
time/Data/Time/Calendar/Julian.hs [moved from Data/Time/Calendar/Julian.hs with 100% similarity]
time/Data/Time/Calendar/JulianYearDay.hs [moved from Data/Time/Calendar/JulianYearDay.hs with 100% similarity]
time/Data/Time/Calendar/MonthDay.hs [moved from Data/Time/Calendar/MonthDay.hs with 100% similarity]
time/Data/Time/Calendar/OrdinalDate.hs [moved from Data/Time/Calendar/OrdinalDate.hs with 100% similarity]
time/Data/Time/Calendar/Private.hs [moved from Data/Time/Calendar/Private.hs with 100% similarity]
time/Data/Time/Calendar/WeekDate.hs [moved from Data/Time/Calendar/WeekDate.hs with 100% similarity]
time/Data/Time/Clock.hs [moved from Data/Time/Clock.hs with 100% similarity]
time/Data/Time/Clock/CTimeval.hs [moved from Data/Time/Clock/CTimeval.hs with 100% similarity]
time/Data/Time/Clock/POSIX.hs [moved from Data/Time/Clock/POSIX.hs with 100% similarity]
time/Data/Time/Clock/Scale.hs [moved from Data/Time/Clock/Scale.hs with 100% similarity]
time/Data/Time/Clock/TAI.hs [moved from Data/Time/Clock/TAI.hs with 100% similarity]
time/Data/Time/Clock/UTC.hs [moved from Data/Time/Clock/UTC.hs with 100% similarity]
time/Data/Time/LocalTime.hs [moved from Data/Time/LocalTime.hs with 100% similarity]
time/Data/Time/LocalTime/Format.hs [moved from Data/Time/LocalTime/Format.hs with 100% similarity]
time/Data/Time/LocalTime/LocalTime.hs [moved from Data/Time/LocalTime/LocalTime.hs with 100% similarity]
time/Data/Time/LocalTime/TimeOfDay.hs [moved from Data/Time/LocalTime/TimeOfDay.hs with 100% similarity]
time/Data/Time/LocalTime/TimeZone.hs [moved from Data/Time/LocalTime/TimeZone.hs with 100% similarity]
time/LICENSE [new file with mode: 0644]
time/Makefile [new file with mode: 0644]
time/Setup.hs [new file with mode: 0644]
time/test/AddDays.hs [moved from test/AddDays.hs with 100% similarity]
time/test/AddDays.ref [moved from test/AddDays.ref with 100% similarity]
time/test/ClipDates.hs [moved from test/ClipDates.hs with 100% similarity]
time/test/ClipDates.ref [moved from test/ClipDates.ref with 100% similarity]
time/test/ConvertBack.hs [moved from test/ConvertBack.hs with 100% similarity]
time/test/CurrentTime.hs [moved from test/CurrentTime.hs with 100% similarity]
time/test/LongWeekYears.hs [moved from test/LongWeekYears.hs with 100% similarity]
time/test/LongWeekYears.ref [moved from test/LongWeekYears.ref with 100% similarity]
time/test/Makefile [new file with mode: 0644]
time/test/ShowDST.hs [moved from test/ShowDST.hs with 100% similarity]
time/test/TestCalendars.hs [moved from test/TestCalendars.hs with 100% similarity]
time/test/TestCalendars.ref [moved from test/TestCalendars.ref with 100% similarity]
time/test/TestEaster.hs [moved from test/TestEaster.hs with 100% similarity]
time/test/TestEaster.ref [moved from test/TestEaster.ref with 100% similarity]
time/test/TestFormat.hs [moved from test/TestFormat.hs with 100% similarity]
time/test/TestFormatStuff.c [moved from test/TestFormatStuff.c with 100% similarity]
time/test/TestFormatStuff.h [moved from test/TestFormatStuff.h with 100% similarity]
time/test/TestMonthDay.hs [moved from test/TestMonthDay.hs with 100% similarity]
time/test/TestMonthDay.ref [moved from test/TestMonthDay.ref with 100% similarity]
time/test/TestParseDAT.hs [moved from test/TestParseDAT.hs with 100% similarity]
time/test/TestParseDAT.ref [moved from test/TestParseDAT.ref with 100% similarity]
time/test/TestTime.hs [moved from test/TestTime.hs with 100% similarity]
time/test/TestTime.ref [moved from test/TestTime.ref with 100% similarity]
time/test/TimeZone.hs [moved from test/TimeZone.hs with 100% similarity]
time/test/UseCases.lhs [moved from test/UseCases.lhs with 100% similarity]
time/test/tai-utc.dat [moved from test/tai-utc.dat with 100% similarity]
time/time.cabal [moved from TimeLib.cabal with 96% similarity]
time/timestuff.c [moved from timestuff.c with 100% similarity]
time/timestuff.h [moved from timestuff.h with 100% similarity]

index 2ea987c..571d69a 100644 (file)
--- a/Makefile
+++ b/Makefile
-default: build test doc
+default: time-build
 
-build: $(patsubst %.hs,%.hi,$(SRCS)) libTimeLib.a
+fixed-%:
+       cd fixed && make $*
 
-test: build
-       cd test && make
+time-%: fixed-cabal-install
+       cd time && make $*
 
-cleantest:
-       cd test && make clean
+sources: fixed/Makefile time/Makefile Makefile
+       cd fixed && make sources
+       cd time && make sources
+       echo > sources
+       for f in `cat fixed/sources`; do echo fixed/$$f >> $@; done
+       for f in `cat time/sources`; do echo time/$$f >> $@; done
 
-SRCS = Data/Fixed.hs \
-       Data/Time/Calendar/Private.hs \
-       Data/Time/Calendar/Days.hs \
-       Data/Time/Calendar/OrdinalDate.hs \
-       Data/Time/Calendar/MonthDay.hs \
-       Data/Time/Calendar/Gregorian.hs \
-       Data/Time/Calendar/WeekDate.hs \
-       Data/Time/Calendar/JulianYearDay.hs \
-       Data/Time/Calendar/Julian.hs \
-       Data/Time/Calendar/Easter.hs \
-       Data/Time/Calendar.hs \
-       Data/Time/Clock/Scale.hs \
-       Data/Time/Clock/UTC.hs \
-       Data/Time/Clock/CTimeval.hs \
-       Data/Time/Clock/POSIX.hs \
-       Data/Time/Clock/UTCDiff.hs \
-       Data/Time/Clock/TAI.hs \
-       Data/Time/Clock.hs \
-       Data/Time/LocalTime/TimeZone.hs \
-       Data/Time/LocalTime/TimeOfDay.hs \
-       Data/Time/LocalTime/LocalTime.hs \
-       Data/Time/LocalTime/Format.hs \
-       Data/Time/LocalTime.hs \
-       Data/Time.hs
-
-timestuff.o: timestuff.c timestuff.h
-       gcc -o $@ -c $<
-
-libTimeLib.a: $(patsubst %.hs,%.o,$(SRCS)) timestuff.o
-       rm -f $@
-       ar cru $@ $^
-       ranlib $@
-
-cleanbuild:
-       rm -rf *.a *.o *.hi $(patsubst %.hs,%.o,$(SRCS)) $(patsubst %.hs,%.hi,$(SRCS)) Makefile.bak
-
-cleandoc:
-       rm -rf doc haddock
-
-clean: cleandoc cleantest cleanbuild
-
-doc: haddock/index.html
-
-haddock/index.html: $(SRCS)
+# unified Haddock
+doc: sources
        mkdir -p haddock
-       haddock -h -o haddock $^
-
-%.diff: %.ref %.out
-       diff -u $^
-
-%.out: %
-       ./$< > $@
-
-%.run: %
-       ./$<
-
-%.hi: %.o
-       @:
-
-%.o: %.hs
-       ghc -c $< -o $@
-
-FORCE:
-
-.SECONDARY:
-
-.PHONY: default build test doc clean
-
-depend: $(SRCS)
-       ghc -M $^
-
-# TestTime.o TestFormat.o CurrentTime.o ShowDST.o TimeZone.o: $(patsubst %.hs,%.hi,$(SRCS))
-
-TestFixed.o: Data/Fixed.hi
+       haddock -h -o haddock `cat sources`
 
-# DO NOT DELETE: Beginning of Haskell dependencies
-Data/Time/Clock/CTimeval.o : Data/Time/Clock/CTimeval.hs
-Data/Time/Calendar/Days.o : Data/Time/Calendar/Days.hs
-Data/Fixed.o : Data/Fixed.hs
-Data/Time/Calendar/Private.o : Data/Time/Calendar/Private.hs
-Data/Time/Calendar/Private.o : Data/Fixed.hi
-Data/Time/Calendar/OrdinalDate.o : Data/Time/Calendar/OrdinalDate.hs
-Data/Time/Calendar/OrdinalDate.o : Data/Time/Calendar/Private.hi
-Data/Time/Calendar/OrdinalDate.o : Data/Time/Calendar/Days.hi
-Data/Time/Calendar/MonthDay.o : Data/Time/Calendar/MonthDay.hs
-Data/Time/Calendar/MonthDay.o : Data/Time/Calendar/Private.hi
-Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/Gregorian.hs
-Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/Private.hi
-Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/Days.hi
-Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/OrdinalDate.hi
-Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/MonthDay.hi
-Data/Time/Calendar.o : Data/Time/Calendar.hs
-Data/Time/Calendar.o : Data/Time/Calendar/Gregorian.hi
-Data/Time/Calendar.o : Data/Time/Calendar/Days.hi
-Data/Time/Calendar/WeekDate.o : Data/Time/Calendar/WeekDate.hs
-Data/Time/Calendar/WeekDate.o : Data/Time/Calendar/Private.hi
-Data/Time/Calendar/WeekDate.o : Data/Time/Calendar/Days.hi
-Data/Time/Calendar/WeekDate.o : Data/Time/Calendar/OrdinalDate.hi
-Data/Time/Calendar/JulianYearDay.o : Data/Time/Calendar/JulianYearDay.hs
-Data/Time/Calendar/JulianYearDay.o : Data/Time/Calendar/Private.hi
-Data/Time/Calendar/JulianYearDay.o : Data/Time/Calendar/Days.hi
-Data/Time/Calendar/Julian.o : Data/Time/Calendar/Julian.hs
-Data/Time/Calendar/Julian.o : Data/Time/Calendar/Private.hi
-Data/Time/Calendar/Julian.o : Data/Time/Calendar/Days.hi
-Data/Time/Calendar/Julian.o : Data/Time/Calendar/JulianYearDay.hi
-Data/Time/Calendar/Julian.o : Data/Time/Calendar/MonthDay.hi
-Data/Time/Calendar/Easter.o : Data/Time/Calendar/Easter.hs
-Data/Time/Calendar/Easter.o : Data/Time/Calendar/Julian.hi
-Data/Time/Calendar/Easter.o : Data/Time/Calendar.hi
-Data/Time/Clock/Scale.o : Data/Time/Clock/Scale.hs
-Data/Time/Clock/Scale.o : Data/Fixed.hi
-Data/Time/Clock/UTC.o : Data/Time/Clock/UTC.hs
-Data/Time/Clock/UTC.o : Data/Fixed.hi
-Data/Time/Clock/UTC.o : Data/Time/Clock/Scale.hi
-Data/Time/Clock/UTC.o : Data/Time/Calendar/Days.hi
-Data/Time/Clock/POSIX.o : Data/Time/Clock/POSIX.hs
-Data/Time/Clock/POSIX.o : Data/Fixed.hi
-Data/Time/Clock/POSIX.o : Data/Time/Calendar/Days.hi
-Data/Time/Clock/POSIX.o : Data/Time/Clock/UTC.hi
-Data/Time/Clock/POSIX.o : Data/Time/Clock/CTimeval.hi
-Data/Time/Clock/UTCDiff.o : Data/Time/Clock/UTCDiff.hs
-Data/Time/Clock/UTCDiff.o : Data/Time/Clock/UTC.hi
-Data/Time/Clock/UTCDiff.o : Data/Time/Clock/POSIX.hi
-Data/Time/Clock.o : Data/Time/Clock.hs
-Data/Time/Clock.o : Data/Time/Clock/POSIX.hi
-Data/Time/Clock.o : Data/Time/Clock/UTC.hi
-Data/Time/Clock.o : Data/Time/Clock/UTCDiff.hi
-Data/Time/Clock.o : Data/Time/Clock/Scale.hi
-Data/Time/LocalTime/TimeZone.o : Data/Time/LocalTime/TimeZone.hs
-Data/Time/LocalTime/TimeZone.o : Data/Time/Clock/POSIX.hi
-Data/Time/LocalTime/TimeZone.o : Data/Time/Clock.hi
-Data/Time/LocalTime/TimeZone.o : Data/Time/Calendar/Private.hi
-Data/Time/LocalTime/TimeOfDay.o : Data/Time/LocalTime/TimeOfDay.hs
-Data/Time/LocalTime/TimeOfDay.o : Data/Fixed.hi
-Data/Time/LocalTime/TimeOfDay.o : Data/Time/Clock.hi
-Data/Time/LocalTime/TimeOfDay.o : Data/Time/Calendar/Private.hi
-Data/Time/LocalTime/TimeOfDay.o : Data/Time/LocalTime/TimeZone.hi
-Data/Time/LocalTime/LocalTime.o : Data/Time/LocalTime/LocalTime.hs
-Data/Time/LocalTime/LocalTime.o : Data/Time/Clock.hi
-Data/Time/LocalTime/LocalTime.o : Data/Time/Calendar.hi
-Data/Time/LocalTime/LocalTime.o : Data/Time/LocalTime/TimeZone.hi
-Data/Time/LocalTime/LocalTime.o : Data/Time/LocalTime/TimeOfDay.hi
-Data/Time/LocalTime/Format.o : Data/Time/LocalTime/Format.hs
-Data/Time/LocalTime/Format.o : Data/Time/Clock/POSIX.hi
-Data/Time/LocalTime/Format.o : Data/Time/Clock.hi
-Data/Time/LocalTime/Format.o : Data/Time/Calendar/Private.hi
-Data/Time/LocalTime/Format.o : Data/Time/Calendar.hi
-Data/Time/LocalTime/Format.o : Data/Time/Calendar/OrdinalDate.hi
-Data/Time/LocalTime/Format.o : Data/Time/Calendar/WeekDate.hi
-Data/Time/LocalTime/Format.o : Data/Time/LocalTime/TimeZone.hi
-Data/Time/LocalTime/Format.o : Data/Time/LocalTime/TimeOfDay.hi
-Data/Time/LocalTime/Format.o : Data/Time/LocalTime/LocalTime.hi
-Data/Time/LocalTime.o : Data/Time/LocalTime.hs
-Data/Time/LocalTime.o : Data/Time/LocalTime/Format.hi
-Data/Time/LocalTime.o : Data/Time/LocalTime/LocalTime.hi
-Data/Time/LocalTime.o : Data/Time/LocalTime/TimeOfDay.hi
-Data/Time/LocalTime.o : Data/Time/LocalTime/TimeZone.hi
-Data/Time/Clock/TAI.o : Data/Time/Clock/TAI.hs
-Data/Time/Clock/TAI.o : Data/Fixed.hi
-Data/Time/Clock/TAI.o : Data/Time/Clock.hi
-Data/Time/Clock/TAI.o : Data/Time/Calendar/Days.hi
-Data/Time/Clock/TAI.o : Data/Time/LocalTime.hi
-Data/Time.o : Data/Time.hs
-Data/Time.o : Data/Time/LocalTime.hi
-Data/Time.o : Data/Time/Clock.hi
-Data/Time.o : Data/Time/Calendar.hi
-# DO NOT DELETE: End of Haskell dependencies
+clean:
+       rm -f sources
+       cd time && make clean
+       cd fixed && make clean
index 0760642..02addc1 100644 (file)
@@ -86,7 +86,7 @@
 /* Begin PBXFileReference section */
                AB01DCF508374807003C9EF7 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
                AB01DCF608374808003C9EF7 /* Setup.hs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.haskell; path = Setup.hs; sourceTree = "<group>"; };
-               AB01DCF708374808003C9EF7 /* TimeLib.cabal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TimeLib.cabal; sourceTree = "<group>"; };
+               AB01DCF708374808003C9EF7 /* time.cabal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = time.cabal; sourceTree = "<group>"; };
                AB01DCF808374808003C9EF7 /* timestuff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = timestuff.c; sourceTree = "<group>"; };
                AB01DCF908374808003C9EF7 /* timestuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timestuff.h; sourceTree = "<group>"; };
                AB01DCFC08374838003C9EF7 /* Calendar.hs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.haskell; path = Calendar.hs; sourceTree = "<group>"; };
                AB26682108A5FF0D0059DEC0 /* AddDays.ref */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AddDays.ref; sourceTree = "<group>"; };
                AB26689F08A6D7290059DEC0 /* UseCases.lhs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.haskell.literate; path = UseCases.lhs; sourceTree = "<group>"; };
                AB7FC7490954C86800796113 /* UTCDiff.hs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.haskell; path = UTCDiff.hs; sourceTree = "<group>"; };
+               AB7FC7A00954D54C00796113 /* fixed.cabal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fixed.cabal; sourceTree = "<group>"; };
+               AB7FC8340954E15700796113 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
+               AB7FC8350954E15700796113 /* Setup.hs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.haskell; path = Setup.hs; sourceTree = "<group>"; };
+               AB7FC8360954E17000796113 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
+               AB7FC8370954E1A500796113 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
+               AB7FC8540954F4E200796113 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
+               AB7FC8710954F5C200796113 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
                ABC0F98D090C7A6000DEF265 /* tai-utc.dat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "tai-utc.dat"; sourceTree = "<group>"; };
                ABC0F98E090C7A6000DEF265 /* TestParseDAT.hs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.haskell; path = TestParseDAT.hs; sourceTree = "<group>"; };
                ABC0F9910913518A00DEF265 /* TestParseDAT.ref */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestParseDAT.ref; sourceTree = "<group>"; };
                AB01DCEA083747B1003C9EF7 = {
                        isa = PBXGroup;
                        children = (
-                               AB01DCF508374807003C9EF7 /* Makefile */,
+                               AB7FC8710954F5C200796113 /* Makefile */,
+                               AB7FC81F0954E01C00796113 /* fixed */,
+                               AB7FC82B0954E09800796113 /* time */,
                                AB35747F08386FCD00B5F897 /* Cabal */,
-                               AB01DCF908374808003C9EF7 /* timestuff.h */,
-                               AB01DCF808374808003C9EF7 /* timestuff.c */,
-                               ABFA25DC0839F8C90096540C /* Data */,
-                               ABFA25EC0839F9FD0096540C /* Test */,
                                ABFA264B083C8AA40096540C /* Target Doc */,
                        );
                        sourceTree = "<group>";
                AB35747F08386FCD00B5F897 /* Cabal */ = {
                        isa = PBXGroup;
                        children = (
-                               AB01DCF708374808003C9EF7 /* TimeLib.cabal */,
-                               AB01DCF608374808003C9EF7 /* Setup.hs */,
                        );
                        name = Cabal;
                        sourceTree = "<group>";
                };
+               AB7FC81F0954E01C00796113 /* fixed */ = {
+                       isa = PBXGroup;
+                       children = (
+                               AB7FC8350954E15700796113 /* Setup.hs */,
+                               AB7FC7A00954D54C00796113 /* fixed.cabal */,
+                               AB7FC8340954E15700796113 /* LICENSE */,
+                               AB7FC8370954E1A500796113 /* Makefile */,
+                               AB7FC8200954E03C00796113 /* Data */,
+                               AB7FC84D0954F4A700796113 /* test */,
+                       );
+                       path = fixed;
+                       sourceTree = "<group>";
+               };
+               AB7FC8200954E03C00796113 /* Data */ = {
+                       isa = PBXGroup;
+                       children = (
+                               ABFA25DF0839F8F70096540C /* Fixed.hs */,
+                       );
+                       path = Data;
+                       sourceTree = "<group>";
+               };
+               AB7FC82B0954E09800796113 /* time */ = {
+                       isa = PBXGroup;
+                       children = (
+                               AB01DCF608374808003C9EF7 /* Setup.hs */,
+                               AB01DCF708374808003C9EF7 /* time.cabal */,
+                               AB7FC8360954E17000796113 /* LICENSE */,
+                               AB01DCF508374807003C9EF7 /* Makefile */,
+                               ABFA25DC0839F8C90096540C /* Data */,
+                               AB01DCF908374808003C9EF7 /* timestuff.h */,
+                               AB01DCF808374808003C9EF7 /* timestuff.c */,
+                               ABFA25EC0839F9FD0096540C /* Test */,
+                       );
+                       path = time;
+                       sourceTree = "<group>";
+               };
+               AB7FC84D0954F4A700796113 /* test */ = {
+                       isa = PBXGroup;
+                       children = (
+                               AB7FC8540954F4E200796113 /* Makefile */,
+                               ABFA2627083B28C00096540C /* TestFixed.hs */,
+                               ABFA2628083B28C00096540C /* TestFixed.ref */,
+                       );
+                       path = test;
+                       sourceTree = "<group>";
+               };
                ABD6783C0841677900CF37C0 /* Clock */ = {
                        isa = PBXGroup;
                        children = (
                ABFA25DC0839F8C90096540C /* Data */ = {
                        isa = PBXGroup;
                        children = (
-                               ABFA25DF0839F8F70096540C /* Fixed.hs */,
                                AB01DD0008374848003C9EF7 /* Time */,
                                AB2666F108A572520059DEC0 /* Time.hs */,
                        );
                        isa = PBXGroup;
                        children = (
                                ABFA2625083B28C00096540C /* Makefile */,
-                               ABFA2627083B28C00096540C /* TestFixed.hs */,
-                               ABFA2628083B28C00096540C /* TestFixed.ref */,
                                AB20A93E09274282001A7C3C /* TestMonthDay.hs */,
                                AB20A93F09274299001A7C3C /* TestMonthDay.ref */,
                                ABFA2624083B28C00096540C /* CurrentTime.hs */,
similarity index 100%
rename from Data/Fixed.hs
rename to fixed/Data/Fixed.hs
diff --git a/fixed/LICENSE b/fixed/LICENSE
new file mode 100644 (file)
index 0000000..dd6f4e0
--- /dev/null
@@ -0,0 +1,10 @@
+Package "fixed" is Copyright (c) Ashley Yakeley, 2004-2005.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+- Neither name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/fixed/Makefile b/fixed/Makefile
new file mode 100644 (file)
index 0000000..5708268
--- /dev/null
@@ -0,0 +1,61 @@
+default: build test
+
+cabal-configure:
+       runghc Setup.hs configure
+
+cabal-build: cabal-configure
+       runghc Setup.hs build
+
+cabal-install: cabal-build
+       sudo runghc Setup.hs install
+
+PACKAGENAME = fixed
+LIBFILE = libHS$(PACKAGENAME).a
+
+build: $(patsubst %.hs,%.hi,$(SRCS)) $(LIBFILE)
+
+test: build
+       cd test && make
+
+cleantest:
+       cd test && make clean
+
+SRCS = Data/Fixed.hs
+
+$(LIBFILE): $(patsubst %.hs,%.o,$(SRCS))
+       rm -f $@
+       ar cru $@ $^
+       ranlib $@
+
+cleanbuild:
+       rm -rf *.a *.o *.hi $(patsubst %.hs,%.o,$(SRCS)) $(patsubst %.hs,%.hi,$(SRCS)) Makefile.bak
+
+clean: cleantest cleanbuild
+
+sources:
+       echo $(SRCS) > $@
+
+%.out: %
+       ./$< > $@
+
+%.run: %
+       ./$<
+
+%.hi: %.o
+       @:
+
+%.o: %.hs
+       ghc -c $< -o $@
+
+FORCE:
+
+.SECONDARY:
+
+.PHONY: default build test clean
+
+depend: $(SRCS)
+       ghc -M $^
+
+# DO NOT DELETE: Beginning of Haskell dependencies
+Data/Fixed.o : Data/Fixed.hs
+# DO NOT DELETE: End of Haskell dependencies
similarity index 100%
rename from Setup.hs
rename to fixed/Setup.hs
diff --git a/fixed/fixed.cabal b/fixed/fixed.cabal
new file mode 100644 (file)
index 0000000..6ac9345
--- /dev/null
@@ -0,0 +1,13 @@
+Name:          fixed
+Version:       0.3
+Stability:     Beta
+License:       BSD3
+License-File:  LICENSE
+Author:                Ashley Yakeley
+Maintainer:    <ashley@semantic.org>
+Homepage:      http://semantic.org/TimeLib/
+Category:
+Build-Depends: base
+Synopsis:      fixed-point arithmetic
+Exposed-modules:
+       Data.Fixed
diff --git a/fixed/test/Makefile b/fixed/test/Makefile
new file mode 100644 (file)
index 0000000..36e0d39
--- /dev/null
@@ -0,0 +1,39 @@
+default: test
+
+TestFixed: TestFixed.o ../Data/Fixed.o
+       ghc $^ -o $@
+
+test:  \
+       TestFixed.diff
+
+clean:
+       rm -rf TestFixed *.out *.o *.hi Makefile.bak
+
+%.diff: %.ref %.out
+       diff -u $^
+
+%.diff0: %.out
+       echo -n | diff -u - $^
+
+%.out: %
+       ./$< > $@
+
+%.run: %
+       ./$<
+
+%.hi: %.o
+       @:
+
+%.o: %.hs
+       ghc -i.. -c $< -o $@
+
+%.o: %.lhs
+       ghc -i.. -c $< -o $@
+
+FORCE:
+
+.SECONDARY:
+
+# TestTime.o TestFormat.o CurrentTime.o ShowDST.o TimeZone.o: $(patsubst %.hs,%.hi,$(SRCS))
+
+TestFixed.o: ../Data/Fixed.hi
similarity index 100%
rename from test/TestFixed.hs
rename to fixed/test/TestFixed.hs
similarity index 100%
rename from test/TestFixed.ref
rename to fixed/test/TestFixed.ref
diff --git a/test/Makefile b/test/Makefile
deleted file mode 100644 (file)
index 5889ae0..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-default: CurrentTime.run ShowDST.run test
-
-TestFixed: TestFixed.o ../Data/Fixed.o
-       ghc $^ -o $@
-
-TestMonthDay: TestMonthDay.o ../libTimeLib.a
-       ghc $^ -o $@
-
-ConvertBack: ConvertBack.o ../libTimeLib.a
-       ghc $^ -o $@
-
-TestCalendars: TestCalendars.o ../libTimeLib.a
-       ghc $^ -o $@
-
-TestTime: TestTime.o ../libTimeLib.a
-       ghc $^ -o $@
-
-LongWeekYears: LongWeekYears.o ../libTimeLib.a
-       ghc $^ -o $@
-
-ClipDates: ClipDates.o ../libTimeLib.a
-       ghc $^ -o $@
-
-AddDays: AddDays.o ../libTimeLib.a
-       ghc $^ -o $@
-
-TestFormat: TestFormat.o TestFormatStuff.o ../libTimeLib.a
-       ghc $^ -o $@
-
-TestFormatStuff.o: TestFormatStuff.c TestFormatStuff.h
-       gcc -o $@ -c $<
-
-TestParseDAT: TestParseDAT.o ../libTimeLib.a
-       ghc $^ -o $@
-
-TestEaster: TestEaster.o ../libTimeLib.a
-       ghc $^ -o $@
-
-CurrentTime: CurrentTime.o ../libTimeLib.a
-       ghc $^ -o $@
-
-ShowDST: ShowDST.o ../libTimeLib.a
-       ghc $^ -o $@
-
-TimeZone: TimeZone.o ../libTimeLib.a
-       ghc $^ -o $@
-
-TimeZone.ref: FORCE
-       date +%z > $@
-
-test:  \
-       TestFixed.diff  \
-       TestMonthDay.diff       \
-       ConvertBack.diff0       \
-       TestCalendars.diff      \
-       TestTime.diff   \
-       LongWeekYears.diff      \
-       ClipDates.diff  \
-       AddDays.diff    \
-       TimeZone.diff   \
-       TestFormat.diff0        \
-       TestParseDAT.diff       \
-       TestEaster.diff \
-       UseCases.o
-
-clean:
-       rm -rf TestFixed TestMonthDay ConvertBack TestCalendars TestTime LongWeekYears ClipDates        \
-       AddDays TestFormat TestParseDAT TestEaster CurrentTime ShowDST TimeZone TimeZone.ref *.out *.o *.hi Makefile.bak
-
-%.diff: %.ref %.out
-       diff -u $^
-
-%.diff0: %.out
-       echo -n | diff -u - $^
-
-%.out: %
-       ./$< > $@
-
-%.run: %
-       ./$<
-
-%.hi: %.o
-       @:
-
-%.o: %.hs
-       ghc -i.. -c $< -o $@
-
-%.o: %.lhs
-       ghc -i.. -c $< -o $@
-
-FORCE:
-
-.SECONDARY:
-
-# TestTime.o TestFormat.o CurrentTime.o ShowDST.o TimeZone.o: $(patsubst %.hs,%.hi,$(SRCS))
-
-TestFixed.o: ../Data/Fixed.hi
similarity index 100%
rename from Data/Time.hs
rename to time/Data/Time.hs
similarity index 100%
rename from Data/Time/Clock.hs
rename to time/Data/Time/Clock.hs
diff --git a/time/LICENSE b/time/LICENSE
new file mode 100644 (file)
index 0000000..17f1f27
--- /dev/null
@@ -0,0 +1,10 @@
+TimeLib is Copyright (c) Ashley Yakeley, 2004-2005.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+- Neither name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/time/Makefile b/time/Makefile
new file mode 100644 (file)
index 0000000..9ca9a17
--- /dev/null
@@ -0,0 +1,181 @@
+default: build test doc
+
+cabal-configure:
+       runghc Setup.hs configure
+
+cabal-build: cabal-configure
+       runghc Setup.hs build
+
+cabal-install: cabal-build
+       sudo runghc Setup.hs install
+
+PACKAGENAME = time
+LIBFILE = libHS$(PACKAGENAME).a
+
+build: $(patsubst %.hs,%.hi,$(SRCS)) $(LIBFILE)
+
+test: build
+       cd test && make
+
+cleantest:
+       cd test && make clean
+
+SRCS = \
+       Data/Time/Calendar/Private.hs \
+       Data/Time/Calendar/Days.hs \
+       Data/Time/Calendar/OrdinalDate.hs \
+       Data/Time/Calendar/MonthDay.hs \
+       Data/Time/Calendar/Gregorian.hs \
+       Data/Time/Calendar/WeekDate.hs \
+       Data/Time/Calendar/JulianYearDay.hs \
+       Data/Time/Calendar/Julian.hs \
+       Data/Time/Calendar/Easter.hs \
+       Data/Time/Calendar.hs \
+       Data/Time/Clock/Scale.hs \
+       Data/Time/Clock/UTC.hs \
+       Data/Time/Clock/CTimeval.hs \
+       Data/Time/Clock/POSIX.hs \
+       Data/Time/Clock/UTCDiff.hs \
+       Data/Time/Clock/TAI.hs \
+       Data/Time/Clock.hs \
+       Data/Time/LocalTime/TimeZone.hs \
+       Data/Time/LocalTime/TimeOfDay.hs \
+       Data/Time/LocalTime/LocalTime.hs \
+       Data/Time/LocalTime/Format.hs \
+       Data/Time/LocalTime.hs \
+       Data/Time.hs
+
+timestuff.o: timestuff.c timestuff.h
+       gcc -o $@ -c $<
+
+$(LIBFILE): $(patsubst %.hs,%.o,$(SRCS)) timestuff.o
+       rm -f $@
+       ar cru $@ $^
+       ranlib $@
+
+cleanbuild:
+       rm -rf *.a *.o *.hi $(patsubst %.hs,%.o,$(SRCS)) $(patsubst %.hs,%.hi,$(SRCS)) Makefile.bak
+
+cleandoc:
+       rm -rf doc haddock
+
+clean: cleandoc cleantest cleanbuild
+
+doc: haddock/index.html
+
+haddock/index.html: $(SRCS)
+       mkdir -p haddock
+       haddock -h -o haddock $^
+
+sources:
+       echo $(SRCS) > $@
+
+%.diff: %.ref %.out
+       diff -u $^
+
+%.out: %
+       ./$< > $@
+
+%.run: %
+       ./$<
+
+%.hi: %.o
+       @:
+
+%.o: %.hs
+       ghc -c $< -o $@
+
+FORCE:
+
+.SECONDARY:
+
+.PHONY: default build test doc clean
+
+depend: $(SRCS)
+       ghc -M $^
+
+# DO NOT DELETE: Beginning of Haskell dependencies
+Data/Time/Clock/CTimeval.o : Data/Time/Clock/CTimeval.hs
+Data/Time/Clock/Scale.o : Data/Time/Clock/Scale.hs
+Data/Time/Calendar/Private.o : Data/Time/Calendar/Private.hs
+Data/Time/Calendar/MonthDay.o : Data/Time/Calendar/MonthDay.hs
+Data/Time/Calendar/MonthDay.o : Data/Time/Calendar/Private.hi
+Data/Time/Calendar/Days.o : Data/Time/Calendar/Days.hs
+Data/Time/Calendar/OrdinalDate.o : Data/Time/Calendar/OrdinalDate.hs
+Data/Time/Calendar/OrdinalDate.o : Data/Time/Calendar/Private.hi
+Data/Time/Calendar/OrdinalDate.o : Data/Time/Calendar/Days.hi
+Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/Gregorian.hs
+Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/Private.hi
+Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/Days.hi
+Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/OrdinalDate.hi
+Data/Time/Calendar/Gregorian.o : Data/Time/Calendar/MonthDay.hi
+Data/Time/Calendar/WeekDate.o : Data/Time/Calendar/WeekDate.hs
+Data/Time/Calendar/WeekDate.o : Data/Time/Calendar/Private.hi
+Data/Time/Calendar/WeekDate.o : Data/Time/Calendar/Days.hi
+Data/Time/Calendar/WeekDate.o : Data/Time/Calendar/OrdinalDate.hi
+Data/Time/Calendar/JulianYearDay.o : Data/Time/Calendar/JulianYearDay.hs
+Data/Time/Calendar/JulianYearDay.o : Data/Time/Calendar/Private.hi
+Data/Time/Calendar/JulianYearDay.o : Data/Time/Calendar/Days.hi
+Data/Time/Calendar/Julian.o : Data/Time/Calendar/Julian.hs
+Data/Time/Calendar/Julian.o : Data/Time/Calendar/Private.hi
+Data/Time/Calendar/Julian.o : Data/Time/Calendar/Days.hi
+Data/Time/Calendar/Julian.o : Data/Time/Calendar/JulianYearDay.hi
+Data/Time/Calendar/Julian.o : Data/Time/Calendar/MonthDay.hi
+Data/Time/Calendar.o : Data/Time/Calendar.hs
+Data/Time/Calendar.o : Data/Time/Calendar/Gregorian.hi
+Data/Time/Calendar.o : Data/Time/Calendar/Days.hi
+Data/Time/Calendar/Easter.o : Data/Time/Calendar/Easter.hs
+Data/Time/Calendar/Easter.o : Data/Time/Calendar/Julian.hi
+Data/Time/Calendar/Easter.o : Data/Time/Calendar.hi
+Data/Time/Clock/UTC.o : Data/Time/Clock/UTC.hs
+Data/Time/Clock/UTC.o : Data/Time/Clock/Scale.hi
+Data/Time/Clock/UTC.o : Data/Time/Calendar/Days.hi
+Data/Time/Clock/POSIX.o : Data/Time/Clock/POSIX.hs
+Data/Time/Clock/POSIX.o : Data/Time/Calendar/Days.hi
+Data/Time/Clock/POSIX.o : Data/Time/Clock/UTC.hi
+Data/Time/Clock/POSIX.o : Data/Time/Clock/CTimeval.hi
+Data/Time/Clock/UTCDiff.o : Data/Time/Clock/UTCDiff.hs
+Data/Time/Clock/UTCDiff.o : Data/Time/Clock/UTC.hi
+Data/Time/Clock/UTCDiff.o : Data/Time/Clock/POSIX.hi
+Data/Time/Clock.o : Data/Time/Clock.hs
+Data/Time/Clock.o : Data/Time/Clock/POSIX.hi
+Data/Time/Clock.o : Data/Time/Clock/UTC.hi
+Data/Time/Clock.o : Data/Time/Clock/UTCDiff.hi
+Data/Time/Clock.o : Data/Time/Clock/Scale.hi
+Data/Time/LocalTime/TimeZone.o : Data/Time/LocalTime/TimeZone.hs
+Data/Time/LocalTime/TimeZone.o : Data/Time/Clock/POSIX.hi
+Data/Time/LocalTime/TimeZone.o : Data/Time/Clock.hi
+Data/Time/LocalTime/TimeZone.o : Data/Time/Calendar/Private.hi
+Data/Time/LocalTime/TimeOfDay.o : Data/Time/LocalTime/TimeOfDay.hs
+Data/Time/LocalTime/TimeOfDay.o : Data/Time/Clock.hi
+Data/Time/LocalTime/TimeOfDay.o : Data/Time/Calendar/Private.hi
+Data/Time/LocalTime/TimeOfDay.o : Data/Time/LocalTime/TimeZone.hi
+Data/Time/LocalTime/LocalTime.o : Data/Time/LocalTime/LocalTime.hs
+Data/Time/LocalTime/LocalTime.o : Data/Time/Clock.hi
+Data/Time/LocalTime/LocalTime.o : Data/Time/Calendar.hi
+Data/Time/LocalTime/LocalTime.o : Data/Time/LocalTime/TimeZone.hi
+Data/Time/LocalTime/LocalTime.o : Data/Time/LocalTime/TimeOfDay.hi
+Data/Time/LocalTime/Format.o : Data/Time/LocalTime/Format.hs
+Data/Time/LocalTime/Format.o : Data/Time/Clock/POSIX.hi
+Data/Time/LocalTime/Format.o : Data/Time/Clock.hi
+Data/Time/LocalTime/Format.o : Data/Time/Calendar/Private.hi
+Data/Time/LocalTime/Format.o : Data/Time/Calendar.hi
+Data/Time/LocalTime/Format.o : Data/Time/Calendar/OrdinalDate.hi
+Data/Time/LocalTime/Format.o : Data/Time/Calendar/WeekDate.hi
+Data/Time/LocalTime/Format.o : Data/Time/LocalTime/TimeZone.hi
+Data/Time/LocalTime/Format.o : Data/Time/LocalTime/TimeOfDay.hi
+Data/Time/LocalTime/Format.o : Data/Time/LocalTime/LocalTime.hi
+Data/Time/LocalTime.o : Data/Time/LocalTime.hs
+Data/Time/LocalTime.o : Data/Time/LocalTime/Format.hi
+Data/Time/LocalTime.o : Data/Time/LocalTime/LocalTime.hi
+Data/Time/LocalTime.o : Data/Time/LocalTime/TimeOfDay.hi
+Data/Time/LocalTime.o : Data/Time/LocalTime/TimeZone.hi
+Data/Time.o : Data/Time.hs
+Data/Time.o : Data/Time/LocalTime.hi
+Data/Time.o : Data/Time/Clock.hi
+Data/Time.o : Data/Time/Calendar.hi
+Data/Time/Clock/TAI.o : Data/Time/Clock/TAI.hs
+Data/Time/Clock/TAI.o : Data/Time/Clock.hi
+Data/Time/Clock/TAI.o : Data/Time/Calendar/Days.hi
+Data/Time/Clock/TAI.o : Data/Time/LocalTime.hi
+# DO NOT DELETE: End of Haskell dependencies
diff --git a/time/Setup.hs b/time/Setup.hs
new file mode 100644 (file)
index 0000000..9a994af
--- /dev/null
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
similarity index 100%
rename from test/AddDays.hs
rename to time/test/AddDays.hs
similarity index 100%
rename from test/AddDays.ref
rename to time/test/AddDays.ref
similarity index 100%
rename from test/ClipDates.hs
rename to time/test/ClipDates.hs
similarity index 100%
rename from test/ClipDates.ref
rename to time/test/ClipDates.ref
similarity index 100%
rename from test/ConvertBack.hs
rename to time/test/ConvertBack.hs
similarity index 100%
rename from test/CurrentTime.hs
rename to time/test/CurrentTime.hs
diff --git a/time/test/Makefile b/time/test/Makefile
new file mode 100644 (file)
index 0000000..b221739
--- /dev/null
@@ -0,0 +1,93 @@
+default: CurrentTime.run ShowDST.run test
+
+TestMonthDay: TestMonthDay.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+ConvertBack: ConvertBack.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+TestCalendars: TestCalendars.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+TestTime: TestTime.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+LongWeekYears: LongWeekYears.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+ClipDates: ClipDates.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+AddDays: AddDays.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+TestFormat: TestFormat.o TestFormatStuff.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+TestFormatStuff.o: TestFormatStuff.c TestFormatStuff.h
+       gcc -o $@ -c $<
+
+TestParseDAT: TestParseDAT.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+TestEaster: TestEaster.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+CurrentTime: CurrentTime.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+ShowDST: ShowDST.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+TimeZone: TimeZone.o ../libHStime.a
+       ghc -package fixed $^ -o $@
+
+TimeZone.ref: FORCE
+       date +%z > $@
+
+test:  \
+       TestMonthDay.diff       \
+       ConvertBack.diff0       \
+       TestCalendars.diff      \
+       TestTime.diff   \
+       LongWeekYears.diff      \
+       ClipDates.diff  \
+       AddDays.diff    \
+       TimeZone.diff   \
+       TestFormat.diff0        \
+       TestParseDAT.diff       \
+       TestEaster.diff \
+       UseCases.o
+
+clean:
+       rm -rf TestMonthDay ConvertBack TestCalendars TestTime LongWeekYears ClipDates  \
+       AddDays TestFormat TestParseDAT TestEaster CurrentTime ShowDST TimeZone TimeZone.ref *.out *.o *.hi Makefile.bak
+
+%.diff: %.ref %.out
+       diff -u $^
+
+%.diff0: %.out
+       echo -n | diff -u - $^
+
+%.out: %
+       ./$< > $@
+
+%.run: %
+       ./$<
+
+%.hi: %.o
+       @:
+
+%.o: %.hs
+       ghc -i.. -c $< -o $@
+
+%.o: %.lhs
+       ghc -i.. -c $< -o $@
+
+FORCE:
+
+.SECONDARY:
+
+# TestTime.o TestFormat.o CurrentTime.o ShowDST.o TimeZone.o: $(patsubst %.hs,%.hi,$(SRCS))
+
+TestFixed.o: ../Data/Fixed.hi
similarity index 100%
rename from test/ShowDST.hs
rename to time/test/ShowDST.hs
similarity index 100%
rename from test/TestEaster.hs
rename to time/test/TestEaster.hs
similarity index 100%
rename from test/TestEaster.ref
rename to time/test/TestEaster.ref
similarity index 100%
rename from test/TestFormat.hs
rename to time/test/TestFormat.hs
similarity index 100%
rename from test/TestTime.hs
rename to time/test/TestTime.hs
similarity index 100%
rename from test/TestTime.ref
rename to time/test/TestTime.ref
similarity index 100%
rename from test/TimeZone.hs
rename to time/test/TimeZone.hs
similarity index 100%
rename from test/UseCases.lhs
rename to time/test/UseCases.lhs
similarity index 100%
rename from test/tai-utc.dat
rename to time/test/tai-utc.dat
similarity index 96%
rename from TimeLib.cabal
rename to time/time.cabal
index 5830f30..c682d8c 100644 (file)
@@ -7,10 +7,9 @@ Author:                Ashley Yakeley
 Maintainer:    <ashley@semantic.org>
 Homepage:      http://semantic.org/TimeLib/
 Category:
-Build-Depends: base
+Build-Depends: base, fixed
 Synopsis:      a new time library
 Exposed-modules:
-       Data.Fixed,
        Data.Time.Calendar,
        Data.Time.Calendar.MonthDay,
        Data.Time.Calendar.OrdinalDate,
similarity index 100%
rename from timestuff.c
rename to time/timestuff.c
similarity index 100%
rename from timestuff.h
rename to time/timestuff.h