This file is indexed.

/usr/share/doc/racket/make/setup-extension.html is in racket-doc 6.7-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>3&nbsp;Building Native-Code Extensions</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Make:<span class="mywbr"> &nbsp;</span> Dependency Manager</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="overview.html" class="tocviewlink" data-pltdoc="x">Overview</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="make.html" class="tocviewlink" data-pltdoc="x">Make from Dependencies</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Building Native-<wbr></wbr>Code Extensions</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="collection.html" class="tocviewlink" data-pltdoc="x">Making Collections</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._make%2Fsetup-extension..rkt%29._pre-install%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym">pre-<wbr></wbr>install</span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="make.html" title="backward to &quot;2 Make from Dependencies&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Make: Dependency Manager&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="collection.html" title="forward to &quot;4 Making Collections&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3 x-source-module="(lib &quot;make/make.scrbl&quot;)" x-source-pkg="make" x-part-tag="&quot;setup-extension&quot;">3<tt>&nbsp;</tt><a name="(part._setup-extension)"></a><a name="(mod-path._make/setup-extension)"></a>Building Native-Code Extensions</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">make/setup-extension</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">make</span></span></td></tr></table></p><p>The <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">make/setup-extension</span></a> library helps compile C code
via Setup PLT&rsquo;s &ldquo;pre-install&rdquo; phase (triggered by a
<span class="RktSym">pre-install-collection</span> item in <span class="stt">"info.rkt"</span>; see
also <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=raco&amp;rel=setup-info.html&amp;version=6.7" class="Sq" data-pltdoc="x">Controlling <span class="stt">raco setup</span> with <span class="stt">"info.rkt"</span> Files</a>).</p><p>The <span class="RktSym">pre-install</span> function takes a number of arguments that
describe how the C code is compiled&#8212;<wbr></wbr>mainly the libraries that it
depends on. It then drives a C compiler via the
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=dynext&amp;rel=Compilation.html&amp;version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">dynext/compile</span></a> and <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=dynext&amp;rel=Linking.html&amp;version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">dynext/link</span></a>
functions.</p><p>Many issues can complicate C compilation, and the <span class="RktSym">pre-install</span>
function helps with a few:</p><ul><li><p>finding non-standard libraries and header files,</p></li><li><p>taming to some degree the differing conventions of Unix and
Windows, </p></li><li><p>setting up suitable dependencies on Racket headers, and</p></li><li><p>using a pre-compiled binary when a <span class="stt">"precompiled"</span>
directory is present.</p></li></ul><p>Many extension installers will have to sort out addition platform
issues manually, however. For example, an old <span class="stt">"readline"</span>
installer used to pick whether to link to <span class="stt">"libcurses"</span> or
<span class="stt">"libncurses"</span> heuristically by inspecting
<span class="stt">"/usr/lib"</span>. More generally, the &ldquo;last chance&rdquo; argument to
<span class="RktSym">pre-install</span> allows an installer to patch compiler and linker
options (see <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=dynext&amp;rel=Compilation.html&amp;version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">dynext/compile</span></a> and
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=dynext&amp;rel=Linking.html&amp;version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">dynext/link</span></a>) before the C code is compiled or linked.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._make/setup-extension..rkt)._pre-install))"></a><span title="Provided from: make/setup-extension | Package: make"><span class="RktSym"><span class="RktSymDef RktSym">pre-install</span></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">plthome-dir</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">collection-dir</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">c-file</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">default-lib-dir</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">include-subdirs</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">find-unix-libs</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">find-windows-libs</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">unix-libs</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">windows-libs</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">extra-depends</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">last-chance-k</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">3m-too?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">plthome-dir</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">collection-dir</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">c-file</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">default-lib-dir</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">include-subdirs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">find-unix-libs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">find-windows-libs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">unix-libs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">windows-libs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">extra-depends</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">last-chance-k</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">3m-too?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">The arguments are as follows:</div></p><ul><li><p><span class="RktVar">plthome-dir</span> &#8212;<wbr></wbr> the directory provided to a &lsquo;pre-installer&rsquo;
function.</p></li><li><p><span class="RktVar">collection-dir</span> &#8212;<wbr></wbr> a directory to use as the current directory
while building.</p></li><li><p><span class="RktVar">c-file</span> &#8212;<wbr></wbr> the name of the source file (relative to
<span class="RktVar">collection-dir</span>). The output file will be the same, except
with a <span class="stt">".c"</span> suffix replaced with <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=runtime.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._system-type%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">system-type</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">so-suffix</span><span class="RktPn">)</span>, and the path changed to <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._build-path%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">build-path</a></span><span class="stt"> </span><span class="RktVal">"compiled"</span><span class="stt"> </span><span class="RktVal">"native"</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=runtime.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._system-library-subpath%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">system-library-subpath</a></span><span class="RktPn">)</span><span class="RktPn">)</span>.</p><p>If <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._build-path%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">build-path</a></span><span class="stt"> </span><span class="RktVal">"precompiled"</span><span class="stt"> </span><span class="RktVal">"native"</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=runtime.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._system-library-subpath%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">system-library-subpath</a></span><span class="RktPn">)</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-replace-suffix%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-replace-suffix</a></span><span class="stt"> </span><span class="RktVar">c-file</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=runtime.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._system-type%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">system-type</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">so-suffix</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span> exists, then <span class="RktVar">c-file</span> is not used at all,
and the file in the <span class="stt">"precompiled"</span> directory is simply
copied.</p></li><li><p><span class="RktVar">default-lib-dir</span> &#8212;<wbr></wbr> a default directory for finding
supporting libraries, often a subdirectory of
<span class="stt">"collection-dir"</span>. The user can supplement this path by
setting the <a name="(idx._(gentag._0._(lib._make/make..scrbl)))"></a><span class="stt">PLT_EXTENSION_LIB_PATHS</span> environment
variable, which applies to all extensions manged by
<span class="RktSym">pre-install</span>.</p></li><li><p><span class="RktVar">include-subdirs</span> &#8212;<wbr></wbr> a list of relative paths in which
<span class="stt">#include</span> files will be found; the path will be determined
through a search, in case it&rsquo;s not in a standard place like
<span class="stt">"/usr/include"</span>.</p><p>For example, the list used to be <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">"openssl"</span><span class="RktVal">)</span> for the
<span class="stt">"openssl"</span> collection, because the source uses
<span class="stt">#include &lt;openssl/ssl.h&gt;</span> and <span class="stt">#include &lt;openssl/err.h&gt;</span>.</p></li><li><p><span class="RktVar">find-unix-libs</span> &#8212;<wbr></wbr> like <span class="RktVar">include-subdirs</span>, but
a list of library bases. Leave off the <span class="stt">"lib"</span> prefix and
any suffix (such as <span class="stt">".a"</span> or <span class="stt">".so"</span>). For
<span class="stt">"openssl"</span>, the list used to be <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">"ssl"</span><span class="stt"> </span><span class="RktVal">"crypto"</span><span class="RktVal">)</span>. Each name will essentially get a <span class="stt">-l</span> prefix for
the linker command line.</p></li><li><p><span class="RktVar">find-windows-libs</span> &#8212;<wbr></wbr> like <span class="RktVar">find-unix-libs</span>,
but for Windows.  The library name will be suffixed with
<span class="stt">".lib"</span> and supplied directly to the linker.</p></li><li><p><span class="RktVar">unix-libs</span> &#8212;<wbr></wbr> like <span class="RktVar">find-unix-libs</span>, except
that the installer makes no attempt to find the libraries in a
non-standard place. For example, the <span class="stt">"readline"</span> installer
used to supply <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">"curses"</span><span class="RktVal">)</span>.</p></li><li><p><span class="RktVar">windows-libs</span> &#8212;<wbr></wbr> like <span class="RktVar">unix-libs</span>, but for
Windows. For example, the <span class="stt">"openssl"</span> installer used to
supply <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">"wsock32"</span><span class="RktVal">)</span>.</p></li><li><p><span class="RktVar">extra-depends</span> &#8212;<wbr></wbr> a list of relative paths to treat as
dependencies for compiling <span class="stt">"file.c"</span>. Often this list will
include <span class="stt">"file.c"</span> with the <span class="stt">".c"</span> suffix replaced by
<span class="stt">".rkt"</span>.  For example, the "openssl" installer supplies
<span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">"mzssl.rkt"</span><span class="RktVal">)</span> to ensure that the stub module
<span class="stt">"mzssl.rkt"</span> is never used when the true extension can be
built.</p></li><li><p><span class="RktVar">last-chance-k</span> &#8212;<wbr></wbr> a procedure of one argument, which
is a thunk.  This procedure should invoke the thunk to make the
file, but it may add parameterizations before the final build. For
example, the <span class="stt">"readline"</span> installer used to add an
AIX-specific compile flag in this step when compiling on AIX.</p></li><li><p><span class="RktVar">3m-too?</span>&#8212;<wbr></wbr> a boolean. If true, when the 3m variant is
installed, use the equivalent to <span class="stt">raco ctool --xform</span> to transform
the source file and then compile and link for 3m. Otherwise, the
extension is built only for CGC when the CGC variant is installed.</p></li></ul><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="make.html" title="backward to &quot;2 Make from Dependencies&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Make: Dependency Manager&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="collection.html" title="forward to &quot;4 Making Collections&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>