]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blobdiff - makefile
Allow "TBA" laps in TSN.XML.AutoRacingSchedule.
[dead/htsn-import.git] / makefile
index 1a585c0d9b6cf308ca68432d02c434b872b86a14..4a1845b6595ffbebdedaf278448cefdde836a285 100644 (file)
--- a/makefile
+++ b/makefile
@@ -8,18 +8,29 @@ $(BIN): $(PN).cabal $(SRCS)
        runghc Setup.hs configure --user --prefix=/
        runghc Setup.hs build
 
-profile: $(PN).cabal $(SRCS)
+# The $(BIN) dependency means that we should build once normally
+# before attempting the profiling build (this is required for some
+# reason).
+profile: $(PN).cabal $(SRCS) $(BIN)
        runghc Setup.hs configure --user \
                                   --enable-executable-profiling \
                                   --prefix=/
        runghc Setup.hs build
 
-doc: $(PN).cabal $(SRCS)
+dist/doc: $(PN).cabal $(SRCS)
        runghc Setup.hs configure --user --prefix=/
-       runghc Setup.hs hscolour --executables
-       runghc Setup.hs haddock --internal    \
-                               --executables \
-                               --hyperlink-source
+       runghc Setup.hs hscolour --all
+       runghc Setup.hs haddock --all    \
+                               --hyperlink-source \
+                                --haddock-options="--ignore-all-exports"
+
+doc: dist/doc
+
+
+# The MLB schema is identical to the regular one.
+doc/dbschema/MLB_earlylineXML.png: doc/dbschema/earlylineXML.png
+       cp $< $@
+
 
 #
 # Testing.
@@ -38,9 +49,13 @@ test: $(BIN) $(TESTSUITE_BIN)
 #
 # Misc.
 #
-dist:
+
+# Only generate MLB_earlylineXML.png long enough to create
+# the tarball.
+dist: doc/dbschema/MLB_earlylineXML.png
        runghc Setup.hs configure --prefix=/
-       runghc Setup.hs sdist
+       TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
+       rm $<
 
 hlint:
        hlint --ignore="Use camelCase"     \
@@ -52,9 +67,9 @@ clean:
        runghc Setup.hs clean
        rm -f *.log
        rm -f *.xml
-       rm *.prof
        rm -rf tmp
        rm -f schemagen/*.dtd
+       find ./ -name '*.prof' -delete
        find ./ -name '*.o' -delete
        find ./ -name '*.hi' -delete