mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-28 05:31:21 +03:00
There needs to be an easy way to validate that the examples provided in the man pages compile without errors. This PR provides a new executable examples-code-check that can be run against the .txt.in files that are in the man directory. It abstracts the code for each example and then runs the compiler against that stub code reporting errors and warnings as appropriate for subsequent fixing in the man page. .gitignore: Ignore the new executable and the files it generates. Makefile.am: configure.ac: Remove MAN_DIR and hard code in the man directory so that examples-code-check is always built. autogen.sh: Make sure that all the temporary stub code files are cleaned up. man/Makefile.am: Support building and clean-up of the new examples-code-check. man/examples-code-check.c: (new) The code that parses the man pages, looking for examples and the gets the examples compiled, testing for errors. The function definitions in the SYNOPSIS section are also included in the compilation of the examples. scripts/build.sh: If WITH_TESTS is set, check that the man page examples compile. man/coap_encryption.txt.in: man/coap_io.txt.in: man/coap_observe.txt.in: man/coap_pdu_setup.txt.in: man/coap_resource.txt.in: man/coap_session.txt.in: Correct the SYNOPSIS function definitions.