<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Distribution.Make</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Distribution-Make.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">Cabal-1.14.0: A framework for packaging Haskell software</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Maintainer</th><td>cabal-devel@haskell.org</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Distribution.Make</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This is an alternative build system that delegates everything to the <code>make</code> program. All the commands just end up calling <code>make</code> 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. </p><p>Uses the parsed command-line from <a href="Distribution-Simple-Setup.html">Distribution.Simple.Setup</a> in order to build Haskell tools using a backend 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: </p><dl><dt>ConfigCmd</dt><dd> We assume the configure script accepts <code>--with-hc</code>, <code>--with-hc-pkg</code>, <code>--prefix</code>, <code>--bindir</code>, <code>--libdir</code>, <code>--libexecdir</code>, <code>--datadir</code>. </dd><dt>BuildCmd</dt><dd> We assume that the default Makefile target will build everything. </dd><dt>InstallCmd</dt><dd> We assume there is an <code>install</code> target. Note that we assume that this does *not* register the package! </dd><dt>CopyCmd</dt><dd> We assume there is a <code>copy</code> target, and a variable <code>$(destdir)</code>. The <code>copy</code> target should probably just invoke <code>make install</code> recursively (e.g. <code>$(MAKE) install prefix=$(destdir)/$(prefix) bindir=$(destdir)/$(bindir)</code>. The reason we can't invoke <code>make install</code> directly here is that we don't know the value of <code>$(prefix)</code>. </dd><dt>SDistCmd</dt><dd> We assume there is a <code>dist</code> target. </dd><dt>RegisterCmd</dt><dd> We assume there is a <code>register</code> target and a variable <code>$(user)</code>. </dd><dt>UnregisterCmd</dt><dd> We assume there is an <code>unregister</code> target. </dd><dt>HaddockCmd</dt><dd> We assume there is a <code>docs</code> or <code>doc</code> target. </dd></dl></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short">module <a href="Distribution-Package.html">Distribution.Package</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:License">License</a> <ul class="subs"><li>= <a href="#v:GPL">GPL</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-Make.html#t:Version">Version</a>) </li><li>| <a href="#v:LGPL">LGPL</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-Make.html#t:Version">Version</a>) </li><li>| <a href="#v:BSD3">BSD3</a> </li><li>| <a href="#v:BSD4">BSD4</a> </li><li>| <a href="#v:MIT">MIT</a> </li><li>| <a href="#v:PublicDomain">PublicDomain</a> </li><li>| <a href="#v:AllRightsReserved">AllRightsReserved</a> </li><li>| <a href="#v:OtherLicense">OtherLicense</a> </li><li>| <a href="#v:UnknownLicense">UnknownLicense</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Version">Version</a> = <a href="#v:Version">Version</a> {<ul class="subs"><li><a href="#v:versionBranch">versionBranch</a> :: [<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>]</li><li><a href="#v:versionTags">versionTags</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</li></ul>}</li><li class="src short"><a href="#v:defaultMain">defaultMain</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:defaultMainArgs">defaultMainArgs</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>] -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:defaultMainNoRead">defaultMainNoRead</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src">module <a href="Distribution-Package.html">Distribution.Package</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:License" class="def">License</a> </p><div class="doc"><p>This datatype indicates the license under which your package is released. It is also wise to add your license to each source file using the license-file field. The <code><a href="Distribution-Make.html#v:AllRightsReserved">AllRightsReserved</a></code> constructor is not actually a license, but states that you are not giving anyone else a license to use or distribute your work. The comments below are general guidelines. Please read the licenses themselves and consult a lawyer if you are unsure of your rights to release the software. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:GPL" class="def">GPL</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-Make.html#t:Version">Version</a>)</td><td class="doc"><p>GNU Public License. Source code must accompany alterations. </p></td></tr><tr><td class="src"><a name="v:LGPL" class="def">LGPL</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-Make.html#t:Version">Version</a>)</td><td class="doc"><p>Lesser GPL, Less restrictive than GPL, useful for libraries. </p></td></tr><tr><td class="src"><a name="v:BSD3" class="def">BSD3</a></td><td class="doc"><p>3-clause BSD license, newer, no advertising clause. Very free license. </p></td></tr><tr><td class="src"><a name="v:BSD4" class="def">BSD4</a></td><td class="doc"><p>4-clause BSD license, older, with advertising clause. You almost certainly want to use the BSD3 license instead. </p></td></tr><tr><td class="src"><a name="v:MIT" class="def">MIT</a></td><td class="doc"><p>The MIT license, similar to the BSD3. Very free license. </p></td></tr><tr><td class="src"><a name="v:PublicDomain" class="def">PublicDomain</a></td><td class="doc"><p>Holder makes no claim to ownership, least restrictive license. </p></td></tr><tr><td class="src"><a name="v:AllRightsReserved" class="def">AllRightsReserved</a></td><td class="doc"><p>No rights are granted to others. Undistributable. Most restrictive. </p></td></tr><tr><td class="src"><a name="v:OtherLicense" class="def">OtherLicense</a></td><td class="doc"><p>Some other license. </p></td></tr><tr><td class="src"><a name="v:UnknownLicense" class="def">UnknownLicense</a> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></td><td class="doc"><p>Not a recognised license. Allows us to deal with future extensions more gracefully. </p></td></tr></table></div><div class="subs instances"><p id="control.i:License" class="caption collapser" onclick="toggleSection('i:License')">Instances</p><div id="section.i:License" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Make.html#t:License">License</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Make.html#t:License">License</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Make.html#t:License">License</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Distribution-Text.html#t:Text">Text</a> <a href="Distribution-Make.html#t:License">License</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Version" class="def">Version</a> <a href="../base-4.5.1.0/src/Data-Version.html#Version" class="link">Source</a></p><div class="doc"><p>A <code><a href="Distribution-Make.html#t:Version">Version</a></code> represents the version of a software entity. </p><p>An instance of <code><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a></code> is provided, which implements exact equality modulo reordering of the tags in the <code><a href="Distribution-Make.html#v:versionTags">versionTags</a></code> field. </p><p>An instance of <code><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a></code> is also provided, which gives lexicographic ordering on the <code><a href="Distribution-Make.html#v:versionBranch">versionBranch</a></code> fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases which have tags <code>"pre1"</code>, <code>"pre2"</code>, and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for <code>date</code> tags in the <code><a href="Distribution-Make.html#v:versionTags">versionTags</a></code> field and compare those. The bottom line is, don't always assume that <code><a href="../base-4.5.1.0/Data-Ord.html#v:compare">compare</a></code> and other <code><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a></code> operations are the right thing for every <code><a href="Distribution-Make.html#t:Version">Version</a></code>. </p><p>Similarly, concrete representations of versions may differ. One possible concrete representation is provided (see <code><a href="../base-4.5.1.0/Data-Version.html#v:showVersion">showVersion</a></code> and <code><a href="../base-4.5.1.0/Data-Version.html#v:parseVersion">parseVersion</a></code>), but depending on the application a different concrete representation may be more appropriate. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Version" class="def">Version</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:versionBranch" class="def">versionBranch</a> :: [<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>]</dt><dd class="doc"><p>The numeric branch for this version. This reflects the fact that most software versions are tree-structured; there is a main trunk which is tagged with versions at various points (1,2,3...), and the first branch off the trunk after version 3 is 3.1, the second branch off the trunk after version 3 is 3.2, and so on. The tree can be branched arbitrarily, just by adding more digits. </p><p>We represent the branch as a list of <code><a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></code>, so version 3.2.1 becomes [3,2,1]. Lexicographic ordering (i.e. the default instance of <code><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a></code> for <code>[Int]</code>) gives the natural ordering of branches. </p></dd><dt class="src"><a name="v:versionTags" class="def">versionTags</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>]</dt><dd class="doc"><p>A version can be tagged with an arbitrary list of strings. The interpretation of the list of tags is entirely dependent on the entity that this version applies to. </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Version" class="caption collapser" onclick="toggleSection('i:Version')">Instances</p><div id="section.i:Version" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Make.html#t:Version">Version</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Distribution-Make.html#t:Version">Version</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Make.html#t:Version">Version</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Make.html#t:Version">Version</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Distribution-Make.html#t:Version">Version</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Distribution-Text.html#t:Text">Text</a> <a href="Distribution-Make.html#t:Version">Version</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:defaultMain" class="def">defaultMain</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:defaultMainArgs" class="def">defaultMainArgs</a> :: [<a href="../base-4.5.1.0/Data-String.html#t:String">String</a>] -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:defaultMainNoRead" class="def">defaultMainNoRead</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><div class="warning"><p>Deprecated: it ignores its PackageDescription arg</p></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>