If you want to build the libyaml-path
library and yamlp
filtering utility follow the these instructions:
$ git clone https://github.com/OpenSCAP/yaml-filter.git
$ cd yaml-filter
To build the library you will also need to install the build dependencies.
The project relies on CMake (cmake
) build system and C99 compiler (for example gcc
).
The only mandatroy dependency of libyaml-path
is the YAML document parser/emitter library libyaml
. You can also use lcov
for coverage reports, but it is optional.
# Ubuntu
$ sudo apt-get install -y libyaml-0-2
# Fedora
$ sudo dnf install -y libyaml lcov
When you have all the build dependencies installed you can build the library.
Run the following commands to build the library and filtering utility:
$ mkdir -p build
$ cd build/
$ cmake ..
$ make
Now you can execute the following command to run library self-checks:
$ ctest
Run the installation procedure by executing the following command:
$ make install
You can also configure CMake to install everything into the $HOME/.local directory:
$ cd build
$ rm -rf *
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
$ make
$ make install
You can use lcov
for code coverage report generation. It is integrated into the project's build configuration:
$ cd build
$ cmake -DENABLE_COVERAGE=yes ..
$ make && ctest -V
$ make gcov