Skip to content
Snippets Groups Projects
Commit 70591573 authored by Isaac Potoczny-Jones's avatar Isaac Potoczny-Jones
Browse files

haddockizing some comments from Make.hs

parent 3b2fb9db
No related merge requests found
......@@ -10,6 +10,45 @@
-- Explanation: Uses the parsed command-line from Distribution.Setup
-- in order to build haskell tools using a backend build system based
-- on Make.
--
-- Basic assumptions
--
-- Obviously we assume that there is a configure script, and that after the
-- ConfigCmd has been run, there is a Makefile.
--
-- ConfigCmd: We assume the configure script accepts:
-- --with-hc
-- --with-hc-pkg
-- --prefix
-- --bindir
-- --libdir
-- --libexecdir
-- --datadir
--
-- BuildCmd: We assume the default Makefile target will build everything
--
-- InstallCmd: We assume there is an install target
-- Note that we assume that this does *not* register the package!
--
-- CopyCmd: We assume there is a copy target, and a variable $(destdir)
-- The 'copy' target should probably just invoke make install recursively, eg.
-- copy :
-- $(MAKE) install prefix=$(destdir)/$(prefix) \
-- bindir=$(destdir)/$(bindir) \
-- ...
-- The reason we can't invoke make install directly here is that we don't
-- know the value of $(prefix).
--
-- SDistCmd: We assume there is an dist target
--
-- RegisterCmd: We assume there is a register target and a variable $(user)
--
-- UnregisterCmd: We assume there is an unregister target
--
-- HaddockCmd: We assume there is a \"docs\" or \"doc\" target
--
-- ProgramaticaCmd: We assume there is a \"programatica\" target
{- All rights reserved.
......@@ -63,46 +102,6 @@ import Data.List ( intersperse )
import System.Cmd
import System.Exit
{-
Basic assumptions
-----------------
Obviously we assume that there is a configure script, and that after the
ConfigCmd has been run, there is a Makefile.
ConfigCmd: We assume the configure script accepts:
--with-hc
--with-hc-pkg
--prefix
--bindir
--libdir
--libexecdir
--datadir
BuildCmd: We assume the default Makefile target will build everything
InstallCmd: We assume there is an install target
Note that we assume that this does *not* register the package!
CopyCmd: We assume there is a copy target, and a variable $(destdir)
The 'copy' target should probably just invoke make install recursively, eg.
copy :
$(MAKE) install prefix=$(destdir)/$(prefix) \
bindir=$(destdir)/$(bindir) \
...
The reason we can't invoke make install directly here is that we don't
know the value of $(prefix).
SDistCmd: We assume there is an dist target
RegisterCmd: We assume there is a register target and a variable $(user)
UnregisterCmd: We assume there is an unregister target
HaddockCmd: We assume there is a "docs" or "doc" target
ProgramaticaCmd: We assume there is a "programatica" target
-}
exec :: String -> IO ExitCode
exec cmd = (putStrLn $ "-=-= Cabal executing: " ++ cmd ++ "=-=-")
>> system cmd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment