Compiling, portability, dependencies, and testing

To build: just run make in the c/ subdirectory of the repo. This builds the mlr executable as well as running all unit and regression tests.

This default make target is also appropriate to run before a commit. (This is self-service manual CI. https://github.com/johnkerl/miller/issues/15 will automate this.)

To install, run make install after editing the install target in the makefile to configure the destination. (See https://github.com/johnkerl/miller/issues/9 which will allow for a configure --install-dir=... option.)

If you are doing development of Miller, you can optionally run make dev in the c/ subdirectory. This runs all the same regression tests, but with the addition of two niceties: it also updates the tags file (requires ctags), and runs the unit tests with valgrind which can help illuminate memory issues.

Prebuilt executables: This is a yet-to-do project; for the interim please see https://github.com/sammcj/miller/releases/tag/v0.1 where sammcj has left a build for OSX 10.11 BETA 6 (thanks!!!). This contains features up to mid-August 2015, and new features for the time being will be mainly around build automation and packaging (e.g. homebrew and .deb), so this artifact will remain feature-current for a while.

C compiler: I normally use gcc:

gcc -std=gnu99 -Wall -Werror -O3 ...

(see the makefile for details) and I’ve done so successfully on Ubuntu 12.04 LTS, SELinux, and Darwin (MacOS Yosemite). I also use valgrind for detection of memory leaks and runtime memory-access errors.

I’ve also used clang on MacOS Yosemite. To use clang, I simply did

make -C c -e CCOMP=clang

Alternatively, one may edit c/Makefile and change CCOMP=gcc to CCOMP=clang. (If you encounter issues I haven’t, please open an issue at https://github.com/johnkerl/miller.)

Required external dependencies: These are necessary to produce the mlr executable.

  • gcc (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)
  • The standard C library
  • flex

Optional external dependencies:

  • This documentation pageset is built using Poki: docs here, source code here. 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 make devall in the Miller base directory (which builds the code, then updates the docs), then run git diff to see if docs were affected by the code mod. (If so, commit and push them.)
  • The optional make dev target in the c/ subdirectory uses ctags and valgrind.

Internal dependencies: These are included within the Miller source tree and do not need to be separately installed (and in fact any separate installation will not be picked up in the Miller build):

Testing: Miller uses MinUnit unit-test for key classes including lrec_t. 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.

License: Two-clause BSD license https://github.com/johnkerl/miller/blob/master/LICENSE.txt.