miller/doc/content-for-build.html

89 lines
4.9 KiB
HTML

<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. (This
is self-service manual CI. <a
href="https://github.com/johnkerl/miller/issues/15">https://github.com/johnkerl/miller/issues/15</a>
will automate this.)
<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>Prebuilt executables</boldmaroon>: Please see <a
href="https://github.com/johnkerl/miller/releases">
https://github.com/johnkerl/miller/releases</a> where there are builds for OSX
Yosemite, Linux i686 (statically linked), and Linux x86-64 (dynamically
linked).
<p/><boldmaroon>C compiler</boldmaroon>: I normally use <b>gcc</b>:
POKI_CARDIFY(gcc -std=gnu99 -Wall -Werror -O3 ...)HERE
(see the <a
href="https://github.com/johnkerl/miller/blob/master/c/Makefile">makefile</a>
for details) and I&rsquo;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&rsquo;ve also used <b>clang</b> on MacOS Yosemite. To use <tt>clang</tt>,
one may edit <tt>c/Makefile</tt> as well as <tt>c/dsls/Makefile</tt> and change
<tt>CC=gcc</tt> to <tt>CC=clang</tt> &mdash; or, <tt>export CC=clang</tt> ane
<tt>make -e</tt>. (If you encounter issues I haven&rsquo;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&rsquo;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>.