From f2a5be530c33ba187bac4ce26ad3ec5e2c088b56 Mon Sep 17 00:00:00 2001 From: Duncan Coutts <duncan@haskell.org> Date: Thu, 31 Jan 2008 11:59:53 +0000 Subject: [PATCH] Use Setup.hs like everyone else does and note the issue about custom vs simple build-type for Cabal itself. --- DefaultSetup.hs | 1 - Makefile | 2 +- Setup.hs | 10 ++++++++++ Setup.lhs | 8 -------- 4 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 Setup.hs delete mode 100644 Setup.lhs diff --git a/DefaultSetup.hs b/DefaultSetup.hs index e8efd11bdd..9a994af677 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 a4e93509a0..5afc2cf581 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 0000000000..48c49ca840 --- /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 4440e8cc47..0000000000 --- a/Setup.lhs +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/runhaskell - -> module Main (main) where -> -> import Distribution.Simple -> -> main :: IO () -> main = defaultMain -- GitLab