82 lines
No EOL
10 KiB
HTML
82 lines
No EOL
10 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
<title>CLiki: asdf binary locations</title>
|
||
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
|
||
href="https://www.cliki.net/site/feed/article.atom?title=asdf%20binary%20locations">
|
||
<link rel="stylesheet" href="static/css/style.css">
|
||
<link rel="stylesheet" href="static/css/colorize.css">
|
||
</head>
|
||
|
||
<body>
|
||
<span class="hidden">CLiki - asdf binary locations</span>
|
||
<div id="content"><div id="content-area"><div id="article-title">asdf binary locations</div><div id="article">This <a href="ASDF-Extension.html" class="category">ASDF-Extension</a> below shows one good way to specify the binary locations used ASDF systems.<p>FWIW, <a href="Gary King.html" class="internal">Gary King</a> has packaged up what's below with some extra loving and SLIME code goodness to make the <a href="ASDF-Binary-locations.html" class="internal">ASDF-Binary-locations</a> package.<p>ASDF doesn't specify the output directories for binaries (FASL) files because the system definition isn't the right place to do this. However, specifying the output location is a common question. Here's an answer.<p>Note that the original contents of this page can be found at <a href="http://groups.google.com/group/comp.lang.lisp/msg/bd5ea9d2008ab9fd">here</a>.<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_in-package.html" class="symbol">in-package</a> <span class="keyword">:asdf</span></span>)</span>
|
||
|
||
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_pushnew.html" class="symbol">pushnew</a> <span class="string">"/home/compbio/d95-bli/share/common-lisp/system/"</span> <span class="special">*central-registry*</span></span>)</span>
|
||
|
||
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_defparametercm_defvar.html" class="symbol"><i><span class="symbol">defvar</span></i></a> <span class="special">*system-configuration-paths*</span>
|
||
'<span class="paren2">(<span class="nonparen"><span class="paren3">(<span class="nonparen"><span class="string">"/nfs/home/compbio/d95-bli/share/common-lisp/src/"</span>
|
||
<span class="string">"/nfs/home/compbio/d95-bli/lib/common-lisp/cmucl/"</span></span>)</span></span>)</span></span>)</span>
|
||
|
||
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_defun.html" class="symbol"><i><span class="symbol">defun</span></i></a> pathname-prefix-p <span class="paren2">(<span class="nonparen">prefix <a href="https://www.cliki.net/site/HyperSpec/Body/any_pathname.html" class="symbol">pathname</a></span>)</span>
|
||
<span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/any_not.html" class="symbol">not</a> <span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_equal.html" class="symbol">equal</a> <span class="paren4">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_namestrin_h-namestring.html" class="symbol">enough-namestring</a> <a href="https://www.cliki.net/site/HyperSpec/Body/any_pathname.html" class="symbol">pathname</a> prefix</span>)</span> <span class="paren4">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_namestrin_h-namestring.html" class="symbol">namestring</a> <a href="https://www.cliki.net/site/HyperSpec/Body/any_pathname.html" class="symbol">pathname</a></span>)</span></span>)</span></span>)</span></span>)</span>
|
||
|
||
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_defmethod.html" class="symbol"><i><span class="symbol">defmethod</span></i></a> output-files <span class="keyword">:around</span> <span class="paren2">(<span class="nonparen"><span class="paren3">(<span class="nonparen">operation compile-op</span>)</span> <span class="paren3">(<span class="nonparen">c source-file</span>)</span></span>)</span>
|
||
<span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/speope_letcm_letst.html" class="symbol"><i><span class="symbol">let</span></i></a> <span class="paren3">(<span class="nonparen"><span class="paren4">(<span class="nonparen">source <span class="paren5">(<span class="nonparen">component-pathname c</span>)</span></span>)</span>
|
||
<span class="paren4">(<span class="nonparen">paths <span class="paren5">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/locfun_call-next-method.html" class="symbol">call-next-method</a></span>)</span></span>)</span></span>)</span>
|
||
<span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_mapccm_ma_istcm_mapcon.html" class="symbol">mapcar</a> #'<span class="paren4">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/any_lambda.html" class="symbol"><i><span class="symbol">lambda</span></i></a> <span class="paren5">(<span class="nonparen">path</span>)</span>
|
||
<span class="paren5">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_loop.html" class="symbol"><i><span class="symbol">loop</span></i></a> for <span class="paren6">(<span class="nonparen">from to</span>)</span> in <span class="special">*system-configuration-paths*</span>
|
||
<a href="https://www.cliki.net/site/HyperSpec/Body/mac_whencm_unless.html" class="symbol">when</a> <span class="paren6">(<span class="nonparen">pathname-prefix-p from source</span>)</span>
|
||
<a href="https://www.cliki.net/site/HyperSpec/Body/mac_docm_dost.html" class="symbol">do</a> <span class="paren6">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_return.html" class="symbol">return</a>
|
||
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_merge-pathnames.html" class="symbol">merge-pathnames</a>
|
||
<span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_make-pathname.html" class="symbol">make-pathname</a> <span class="keyword">:type</span> <span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_pathname-_name-version.html" class="symbol">pathname-type</a> path</span>)</span></span>)</span>
|
||
<span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_merge-pathnames.html" class="symbol">merge-pathnames</a> <span class="paren3">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/fun_namestrin_h-namestring.html" class="symbol">enough-namestring</a> source from</span>)</span>
|
||
to</span>)</span></span>)</span></span>)</span>
|
||
<span class="comment">;; Kommer bara hit om ingen sökväg matchade
|
||
</span> finally <span class="paren6">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_return.html" class="symbol">return</a> path</span>)</span></span>)</span></span>)</span>
|
||
paths</span>)</span></span>)</span></span>)</span></span></div><p>It works well, and it is extensible so that you can add other
|
||
source-fasl locations to the global variable. My clisp and sbcl init
|
||
files contain the same thing but with different fasl directories. <p>The only thing regarding this method that is sometimes problematic is
|
||
for packages which come with data files. The way ASDF works, it will
|
||
look for those data files in the fasl directory instead of the source
|
||
directory, and you will get a sometimes cryptic compilation error. The
|
||
way I solve this in the few cases where it happens is by manually
|
||
copying the files to the fasl directory.</div></div>
|
||
<div id="footer" class="buttonbar"><ul><li><a href="asdf binary locations.html">Current version</a></li>
|
||
<li><a href="https://www.cliki.net/site/history?article=asdf%20binary%20locations">History</a></li>
|
||
<li><a href="https://www.cliki.net/site/backlinks?article=asdf%20binary%20locations">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=asdf%20binary%20locations&from-revision=3771252981">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
|
||
</div>
|
||
<div id="header-buttons" class="buttonbar">
|
||
<ul>
|
||
<li><a href="https://www.cliki.net/">Home</a></li>
|
||
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
|
||
<li><a href="CLiki.html">About</a></li>
|
||
<li><a href="Text Formatting.html">Text Formatting</a></li>
|
||
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
|
||
</ul>
|
||
<div id="search">
|
||
<form action="https://www.cliki.net/site/search">
|
||
<label for="search_query" class="hidden">Search CLiki</label>
|
||
<input type="text" name="query" id="search_query" value="" />
|
||
<input type="submit" value="search" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<div id="pageheader">
|
||
<div id="header">
|
||
<span id="logo">CLiki</span>
|
||
<span id="slogan">the common lisp wiki</span>
|
||
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
|
||
<label for="login_name" class="hidden">Account name</label>
|
||
<input type="text" name="name" id="login_name" class="login_input" />
|
||
<label for= "login_password" class="hidden">Password</label>
|
||
<input type="password" name="password" id="login_password" class="login_input" />
|
||
<input type="submit" name="login" value="login" id="login_submit" /><br />
|
||
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
|
||
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</body></html> |