This document describes various aspects of COPRIS development.
Making release and debug builds is done via the Makefile in the root directory. Running make help
will show most of the available targets.
Build flags, linker settings and object files are set in Makefile-common.mk in the root directory.
README.md and Man pages are generated via files in the release-tools directory. Each chapter gets its own Markdown file.
There are two categories of unit tests. Some are written in Bash and reside in the tests-bash
directory. Others, located in the tests directory are written in C and compiled via their own
Makefile. Running make help there will show the important targets.
-
inih (https://github.com/benhoyt/inih#readme)
Used for parsing encoding and printer feature files.
-
uthash.h (https://troydhanson.github.io/uthash/userguide.html)
Used for storing definitions, provided by encoding and printer feature files.
-
utstring.h (https://troydhanson.github.io/uthash/utstring.html)
Used all over COPRIS for storing and manipulating strings of text.
- cmocka framework (https://api.cmocka.org/)
Useful commands for testing single files:
cd tests
make cmocka-recode && ./$_
make cmocka-parse_value && ./$_ 2>/dev/null
make USERFLAGS=-Wno-unused-function cmocka-parse_vars && ./$_
-
m4 macro processor (https://www.gnu.org/software/m4/manual/html_node/index.html)
Used for generating text for
README.mdand thecopris.1Man page. -
pandoc document converter (https://pandoc.org/MANUAL.html#extension-pandoc_title_block)
Used when generating the Man page from the Markdown sources (with the
pandoc_title_blockextension).