mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
194 lines
8.4 KiB
HTML
194 lines
8.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html lang="en">
|
|
|
|
<!-- PAGE GENERATED FROM template.html and content-for-build.html BY poki. -->
|
|
<!-- PLEASE MAKE CHANGES THERE AND THEN RE-RUN poki. -->
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
|
|
<meta name="description" content="Miller documentation"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <!-- mobile-friendly -->
|
|
<meta name="keywords"
|
|
content="John Kerl, Kerl, Miller, miller, mlr, OLAP, data analysis software, regression, correlation, variance, data tools, " />
|
|
|
|
<title> Compiling, portability, dependencies, and testing </title>
|
|
<link rel="stylesheet" type="text/css" href="css/miller.css"/>
|
|
<link rel="stylesheet" type="text/css" href="css/poki-callbacks.css"/>
|
|
</head>
|
|
|
|
<!-- ================================================================ -->
|
|
<script type="text/javascript">
|
|
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
|
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
|
</script>
|
|
<script type="text/javascript">
|
|
try {
|
|
var pageTracker = _gat._getTracker("UA-15651652-1");
|
|
pageTracker._trackPageview();
|
|
} catch(err) {}
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
function toggle(divName) {
|
|
var eleDiv = document.getElementById(divName);
|
|
if (eleDiv != null) {
|
|
if (eleDiv.style.display == "block") {
|
|
eleDiv.style.display = "none";
|
|
} else {
|
|
eleDiv.style.display = "block";
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<!--
|
|
The background image is from a screenshot of a Google search for "data analysis
|
|
tools", lightened and sepia-toned. Over this was placed a Mac Terminal app with
|
|
very light-grey font and translucent background, in which a few statistical
|
|
Miller commands were run with pretty-print-tabular output format.
|
|
-->
|
|
<body background="pix/sepia-overlay.jpg">
|
|
|
|
<!-- ================================================================ -->
|
|
<table width="100%">
|
|
<tr>
|
|
|
|
<!-- navbar -->
|
|
<td width="15%">
|
|
<!--
|
|
<img src="pix/mlr.jpg" />
|
|
<img style="border-width:1px; color:black;" src="pix/mlr.jpg" />
|
|
-->
|
|
|
|
<div class="pokinav">
|
|
<center><titleinbody>Miller</titleinbody></center>
|
|
|
|
<!-- PAGE LIST GENERATED FROM template.html BY poki -->
|
|
<br/>User info:
|
|
<br/>• <a href="index.html">About</a>
|
|
<br/>• <a href="file-formats.html">File formats</a>
|
|
<br/>• <a href="feature-comparison.html">Miller features in the context of the Unix toolkit</a>
|
|
<br/>• <a href="record-heterogeneity.html">Record-heterogeneity</a>
|
|
<br/>• <a href="performance.html">Performance</a>
|
|
<br/>• <a href="etymology.html">Why call it Miller?</a>
|
|
<br/>• <a href="originality.html">How original is Miller?</a>
|
|
<br/>• <a href="reference.html">Reference</a>
|
|
<br/>• <a href="data-examples.html">Data examples</a>
|
|
<br/>• <a href="to-do.html">Things to do</a>
|
|
<br/>Developer info:
|
|
<br/>• <a href="build.html"><b>Compiling, portability, dependencies, and testing</b></a>
|
|
<br/>• <a href="whyc.html">Why C?</a>
|
|
<br/>• <a href="contact.html">Contact information</a>
|
|
<br/>• <a href="https://github.com/johnkerl/miller">GitHub repo</a>
|
|
<br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>
|
|
<br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>
|
|
<br/> <br/> <br/> <br/> <br/> <br/>
|
|
</div>
|
|
</td>
|
|
|
|
<!-- page body -->
|
|
<td>
|
|
<div style="overflow-y:scroll;height:1500px">
|
|
<center> <titleinbody> Compiling, portability, dependencies, and testing </titleinbody> </center>
|
|
<p/>
|
|
|
|
<!-- BODY COPIED FROM content-for-build.html BY poki -->
|
|
<p/><boldmaroon>To build</boldmaroon>: just run <tt>make</tt> in the <tt>c/</tt> subdirectory of <a
|
|
href="https://github.com/johnkerl/miller">the repo</a>. This builds the <tt>mlr</tt> executable as well as running
|
|
all unit and regression tests.
|
|
|
|
<p/>This default make target is also appropriate to run before a commit.
|
|
|
|
<p/>To install, run <tt>make install</tt> after editing the <tt>install</tt>
|
|
target in the makefile to configure the destination. (See <a
|
|
href="https://github.com/johnkerl/miller/issues/9">https://github.com/johnkerl/miller/issues/9</a>
|
|
which will allow for a <tt>configure --install-dir=...</tt> option.)
|
|
|
|
<p/>If you are doing development of Miller, you can optionally run <tt>make
|
|
dev</tt> in the <tt>c/</tt> subdirectory. This runs all the same regression
|
|
tests, but with the addition of two niceties: it also updates the <tt>tags</tt>
|
|
file (requires <tt>ctags</tt>), and runs the unit tests with <tt>valgrind</tt>
|
|
which can help illuminate memory issues.
|
|
|
|
<p/><boldmaroon>C compiler</boldmaroon>: I normally use <b>gcc</b>:
|
|
|
|
<p/>
|
|
<div class="pokipanel">
|
|
<pre>
|
|
gcc -std=gnu99 -Wall -Werror -O3 ...
|
|
</pre>
|
|
</div>
|
|
<p/>
|
|
|
|
(see the <a
|
|
href="https://github.com/johnkerl/miller/blob/master/c/Makefile">makefile</a>
|
|
for details) and I’ve done so successfully on Ubuntu 12.04 LTS, SELinux,
|
|
and Darwin (MacOS Yosemite). I also use <a
|
|
href="http://valgrind.org/">valgrind</a> for detection of memory leaks and
|
|
runtime memory-access errors.
|
|
|
|
<p/>I’ve also used <b>clang</b> on MacOS Yosemite. To use <tt>clang</tt>, I simply did
|
|
|
|
<p/>
|
|
<div class="pokipanel">
|
|
<pre>
|
|
make -C c -e CCOMP=clang
|
|
</pre>
|
|
</div>
|
|
<p/>
|
|
|
|
Alternatively, one may edit <tt>c/Makefile</tt> and change <tt>CCOMP=gcc</tt>
|
|
to <tt>CCOMP=clang</tt>. (If you encounter issues I haven’t, please open an issue
|
|
at <a href="https://github.com/johnkerl/miller">https://github.com/johnkerl/miller</a>.)
|
|
|
|
<p/><boldmaroon>Required external dependencies</boldmaroon>: These are necessary to produce the <tt>mlr</tt>
|
|
executable.
|
|
<ul>
|
|
<li/> <tt>gcc</tt> (or presumably other compilers; please open an issue or send me a pull request if you have information for me
|
|
about other 21st-century compilers)
|
|
<li/> The standard C library
|
|
<li/> <tt>flex</tt>
|
|
</ul>
|
|
|
|
<p/><boldmaroon>Optional external dependencies</boldmaroon>:
|
|
<ul>
|
|
<li/>
|
|
This documentation pageset is built using <b>Poki</b>:
|
|
<a href="http://johnkerl.org/poki/doc">docs here</a>,
|
|
<a href="https://github.com/johnkerl/poki">source code here</a>.
|
|
You’ll need this if you modify documents, or if you modify the code in a way that affects the documents
|
|
(there are auto-run snippets inserted into the doc).
|
|
The best way to discover this is to run <tt>make devall</tt> in the Miller base directory (which builds the code,
|
|
then updates the docs), then run <tt>git diff</tt> to see if docs were affected by the code mod.
|
|
(If so, commit and push them.)
|
|
<li/> The optional <tt>make dev</tt> target in the <tt>c/</tt> subdirectory uses <b>ctags</b> and <b>valgrind</b>.
|
|
</ul>
|
|
|
|
<p/><boldmaroon>Internal dependencies</boldmaroon>:
|
|
These are included within the <a href="https://github.com/johnkerl/miller">Miller source tree</a> and do not
|
|
need to be separately installed (and in fact any separate installation will not be picked up in the Miller build):
|
|
<ul>
|
|
<li/><a href="http://en.wikipedia.org/wiki/Mersenne_Twister">Mersenne Twister</a> for pseudorandom-number
|
|
generation: <a href="https://github.com/johnkerl/miller/blob/master/c/lib/mtrand.c">C implementation by Nishimura and Matsumoto</a> with license terms respected.
|
|
<li/> <a href="http://www.jera.com/techinfo/jtns/jtn002.html">MinUnit</a> for unit-testing,
|
|
with as-is-no-warranty license <a href="http://www.jera.com/techinfo/jtns/jtn002.html#License">http://www.jera.com/techinfo/jtns/jtn002.html#License</a>,
|
|
<a href="https://github.com/johnkerl/miller/blob/master/c/lib/minunit.h">
|
|
https://github.com/johnkerl/miller/blob/master/c/lib/minunit.h</a>.
|
|
<li/> The <a href="http://www.hwaci.com/sw/lemon/">Lemon parser-generator</a>, the author of which
|
|
<a href="https://github.com/johnkerl/miller/blob/master/c/dsls/lemon.c">explicitly disclaims
|
|
copyright</a>.
|
|
</ul>
|
|
|
|
<p/><boldmaroon>Testing</boldmaroon>: Miller uses MinUnit unit-test for key
|
|
classes including <tt>lrec_t</tt>. The remaining coverage (which aims to be
|
|
exhaustive, although this is a work in progress) is regression coverage of
|
|
Miller using all data-transform options and all I/O-format pairs.
|
|
|
|
<p/><boldmaroon>License</boldmaroon>: Two-clause BSD license
|
|
<a href="https://github.com/johnkerl/miller/blob/master/LICENSE.txt">
|
|
https://github.com/johnkerl/miller/blob/master/LICENSE.txt</a>.
|
|
</div>
|
|
</td>
|
|
|
|
</table>
|
|
</body>
|
|
</html>
|