Cabal-3.10.1.0: A framework for packaging Haskell software

Copyright | Martin Sj&#xF6;gren 2004
License | BSD3
Maintainer | cabal-devel@haskell.org
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Distribution.Make

Description

This is an alternative build system that delegates everything to the `make` program. All the commands just end up calling `make` with appropriate arguments. The intention was to allow preexisting packages that used makefiles to be wrapped into Cabal packages. In practice essentially all such packages were converted over to the "Simple" build system instead. Consequently this module is not used much and it certainly only sees cursory maintenance and no testing. Perhaps at some point we should stop pretending that it works.

Uses the parsed command-line from Distribution.Simple.Setup in order to build Haskell tools using a back-end build system based on make. Obviously we assume that there is a configure script, and that after the ConfigCmd has been run, there is a Makefile. Further assumptions:

ConfigCmd
  We assume the configure script accepts `--with-hc`, `--with-hc-pkg`, `--prefix`, `--bindir`, `--libdir`, `--libexecdir`, `--datadir`.
BuildCmd
  We assume that 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 (e.g. `$(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 a `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.

Synopsis

- module Distribution.Package
- data License
  - = GPL (Maybe Version)
  - | AGPL (Maybe Version)
  - | LGPL (Maybe Version)
  - | BSD2
  - | BSD3
  - | BSD4
  - | MIT
  - | ISC
  - | MPL Version
  - | Apache (Maybe Version)
  - | PublicDomain
  - | AllRightsReserved
  - | UnspecifiedLicense
  - | OtherLicense
  - | UnknownLicense String
- data Version
- defaultMain :: IO ()
- defaultMainArgs :: [String] -> IO ()

# Documentation

module Distribution.Package

data License Source #

Indicates the license under which a package's source code is released. Versions of the licenses not listed here will be rejected by Hackage and cause `cabal check` to issue a warning.

Constructors

GPL (Maybe Version) | GNU General Public License, version 2 or version 3.
AGPL (Maybe Version) | GNU Affero General Public License, version 3.
LGPL (Maybe Version) | GNU Lesser General Public License, version 2.1 or version 3.
BSD2 | 2-clause BSD license.
BSD3 | 3-clause BSD license.
BSD4 | 4-clause BSD license. This license has not been approved by the OSI and is incompatible with the GNU GPL. It is provided for historical reasons and should be avoided.
MIT | MIT license.
ISC | ISC license
MPL Version | Mozilla Public License, version 2.0.
Apache (Maybe Version) | Apache License, version 2.0.
PublicDomain | The author of a package disclaims any copyright to its source code and dedicates it to the public domain. This is not a software license. Please note that it is not possible to dedicate works to the public domain in every jurisdiction, nor is a work that is in the public domain in one jurisdiction necessarily in the public domain elsewhere.
AllRightsReserved | Explicitly 'All Rights Reserved', eg for proprietary software. The package may not be legally modified or redistributed by anyone but the rightsholder.
UnspecifiedLicense | No license specified which legally defaults to 'All Rights Reserved'. The package may not be legally modified or redistributed by anyone but the rightsholder.
OtherLicense | Any other software license.
UnknownLicense String | Indicates an erroneous license name.

#### Instances

Instances details

Parsec License |
Instance details Defined in Distribution.License Methods parsec :: CabalParsing m => m License Source #
Pretty License |
Instance details Defined in Distribution.License Methods pretty :: License -> Doc Source # prettyVersioned :: CabalSpecVersion -> License -> Doc Source #
Structured License |
Instance details Defined in Distribution.License Methods structure :: Proxy License -> Structure Source # structureHash' :: Tagged License MD5
Data License |

Instance details

Defined in Distribution.License

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> License -> c License Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c License Source #

toConstr :: License -> Constr Source #

dataTypeOf :: License -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c License) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c License) Source #

gmapT :: (forall b. Data b => b -> b) -> License -> License Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> License -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> License -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> License -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> License -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> License -> m License Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> License -> m License Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> License -> m License Source #

Generic License |
Instance details Defined in Distribution.License Associated Types type Rep License :: Type -> Type Source # Methods from :: License -> Rep License x Source # to :: Rep License x -> License Source #
Read License |
Instance details Defined in Distribution.License Methods readsPrec :: Int -> ReadS License Source # readList :: ReadS [License] Source # readPrec :: ReadPrec License Source # readListPrec :: ReadPrec [License] Source #
Show License |
Instance details Defined in Distribution.License Methods showsPrec :: Int -> License -> ShowS Source # show :: License -> String Source # showList :: [License] -> ShowS Source #
Binary License |
Instance details Defined in Distribution.License Methods put :: License -> Put # get :: Get License # putList :: [License] -> Put #
NFData License |
Instance details Defined in Distribution.License Methods rnf :: License -> () Source #
Eq License |
Instance details Defined in Distribution.License Methods (==) :: License -> License -> Bool # (/=) :: License -> License -> Bool #
Ord License |
Instance details Defined in Distribution.License Methods compare :: License -> License -> Ordering # (<) :: License -> License -> Bool # (<=) :: License -> License -> Bool # (>) :: License -> License -> Bool # (>=) :: License -> License -> Bool # max :: License -> License -> License # min :: License -> License -> License #
type Rep License |

Instance details

Defined in Distribution.License

type Rep License = D1 ('MetaData "License" "Distribution.License" "Cabal-syntax-3.10.1.0" 'False) (((C1 ('MetaCons "GPL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version))) :+: (C1 ('MetaCons "AGPL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version))) :+: C1 ('MetaCons "LGPL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version))))) :+: ((C1 ('MetaCons "BSD2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BSD3" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BSD4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MIT" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "ISC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MPL" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version))) :+: (C1 ('MetaCons "Apache" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version))) :+: C1 ('MetaCons "PublicDomain" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "AllRightsReserved" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnspecifiedLicense" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OtherLicense" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnknownLicense" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))))

data Version Source #

A `Version` represents the version of a software entity.

Instances of `Eq` and `Ord` are provided, which gives exact equality and lexicographic ordering of the version number components (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.).

This type is opaque and distinct from the `Version` type in Data.Version since `Cabal-2.0`. The difference extends to the `Binary` instance using a different (and more compact) encoding.

Since: Cabal-syntax-2.0.0.2

#### Instances

Instances details

Parsec Version |
Instance details Defined in Distribution.Types.Version Methods parsec :: CabalParsing m => m Version Source #
Pretty Version |
Instance details Defined in Distribution.Types.Version Methods pretty :: Version -> Doc Source # prettyVersioned :: CabalSpecVersion -> Version -> Doc Source #
Structured Version |
Instance details Defined in Distribution.Types.Version Methods structure :: Proxy Version -> Structure Source # structureHash' :: Tagged Version MD5
Data Version |

Instance details

Defined in Distribution.Types.Version

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Version -> c Version Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Version Source #

toConstr :: Version -> Constr Source #

dataTypeOf :: Version -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Version) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Version) Source #

gmapT :: (forall b. Data b => b -> b) -> Version -> Version Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Version -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Version -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Version -> m Version Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version Source #

Generic Version |
Instance details Defined in Distribution.Types.Version Associated Types type Rep Version :: Type -> Type Source # Methods from :: Version -> Rep Version x Source # to :: Rep Version x -> Version Source #
Read Version |
Instance details Defined in Distribution.Types.Version Methods readsPrec :: Int -> ReadS Version Source # readList :: ReadS [Version] Source # readPrec :: ReadPrec Version Source # readListPrec :: ReadPrec [Version] Source #
Show Version |
Instance details Defined in Distribution.Types.Version Methods showsPrec :: Int -> Version -> ShowS Source # show :: Version -> String Source # showList :: [Version] -> ShowS Source #
Binary Version |
Instance details Defined in Distribution.Types.Version Methods put :: Version -> Put # get :: Get Version # putList :: [Version] -> Put #
NFData Version |
Instance details Defined in Distribution.Types.Version Methods rnf :: Version -> () Source #
Eq Version |
Instance details Defined in Distribution.Types.Version Methods (==) :: Version -> Version -> Bool # (/=) :: Version -> Version -> Bool #
Ord Version |
Instance details Defined in Distribution.Types.Version Methods compare :: Version -> Version -> Ordering # (<) :: Version -> Version -> Bool # (<=) :: Version -> Version -> Bool # (>) :: Version -> Version -> Bool # (>=) :: Version -> Version -> Bool # max :: Version -> Version -> Version # min :: Version -> Version -> Version #
type Rep Version |

Instance details

Defined in Distribution.Types.Version

type Rep Version = D1 ('MetaData "Version" "Distribution.Types.Version" "Cabal-syntax-3.10.1.0" 'False) (C1 ('MetaCons "PV0" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)) :+: C1 ('MetaCons "PV1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])))

defaultMain :: IO () Source #

defaultMainArgs :: [String] -> IO () Source #