1 This file explains some details about developing the Augeas C library.
3 # Check out the sources
5 The sources are in a git repo; to check it out run
8 git clone git://github.com/hercules-team/augeas
13 Besides the usual build tools (gcc, autoconf, automake etc.) you need the
14 following tools and libraries to build Augeas:
20 * libselinux-devel (optional)
22 Augeas uses gnulib, and you need a checkout of gnulib. The build scripts
23 can create a checkout for you behind the scenes - though if you already
24 have a gnulib checkout, you can pass its location to autogen.sh with the
25 --gnulib-srcdir option.
27 At its simplest, you build Augeas from git by running the following
28 commands in the toplevel directory of your Augeas checkout:
30 ./autogen.sh [--gnulib-srcdir=$GNULIB_CHECKOUT]
33 It is recommended though to turn on a few development features when
34 building; in particular, stricter compiler warnings and some debug
35 logging. You can pass these options either to autogen.sh or to
36 configure. You'd then run autogen like this:
38 ./autogen.sh --enable-compile-warnings=error --enable-debug=yes
42 The script ./src/try can be used to run ./src/augtool against a fresh
43 filesystem root. It copies the files from tests/root/ to build/try/ and
44 starts augtool against that root, using the lenses from lenses/ (and none
45 of the ones that might be installed on your system)
47 The script can be used for the following; OPTS are options that are passed
50 * `./src/try OPTS`: run the commands from `build/augcmds.txt`
51 * `./src/try cli OPTS`: start an interactive session with augtool
52 * `./src/try gdb`: start gdb and set it up from `build/gdbcmds.txt` for
53 debugging augtool with commands in `build/augcmds.txt`
54 * `./src/try valgrind`: run the commands from `build/augcmds.txt` through
55 augtool under valgrind to check for memory leaks
57 # Platform specific notes
61 OSX comes with a crippled reimplementation of readline, `libedit`; while
62 Augeas will build against `libedit`, you can get full readline
63 functionality by installing the `readline` package from
64 [Homebrew](http://brew.sh/) and setting the following:
66 > export CPPFLAGS=-I/usr/local/opt/readline/include
67 > export LDFLAGS=-L/usr/local/opt/readline/lib