diff --git a/DefaultSetup.hs b/DefaultSetup.hs index e8efd11bddbcc587bf8ddd9f5713010b7e5c67a6..9a994af677b0dfd41b4e3b76b3e7e604003d64e1 100644 --- a/DefaultSetup.hs +++ b/DefaultSetup.hs @@ -1,3 +1,2 @@ -module Main where import Distribution.Simple main = defaultMain diff --git a/Makefile b/Makefile index a4e93509a0907d772210f6d1b1a8163c32a61006..5afc2cf581c3cbff859ad4971ecdc389740dcac2 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ all: build setup:: mkdir -p dist/tmp - $(HC) $(GHCFLAGS) -i. -odir dist/tmp -hidir dist/tmp Setup.lhs -o setup + $(HC) $(GHCFLAGS) -i. -odir dist/tmp -hidir dist/tmp Setup.hs -o setup Setup-nhc: hmake -nhc98 -package base -prelude Setup diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000000000000000000000000000000000000..48c49ca840e105deaab0ee5978d22daec7f98add --- /dev/null +++ b/Setup.hs @@ -0,0 +1,10 @@ +import Distribution.Simple +main :: IO () +main = defaultMain + +-- Although this looks like the Simple build type, it is in fact vital that +-- we use this Setup.hs because it'll get compiled against the local copy +-- of the Cabal lib, thus enabling Cabal to bootstrap itself without relying +-- on any previous installation. This also means we can use any new features +-- immediately because we never have to worry about building Cabal with an +-- older version of itself. diff --git a/Setup.lhs b/Setup.lhs deleted file mode 100644 index 4440e8cc47f8dcc36e014a1be756d90260b4256d..0000000000000000000000000000000000000000 --- a/Setup.lhs +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/runhaskell - -> module Main (main) where -> -> import Distribution.Simple -> -> main :: IO () -> main = defaultMain