Next: Doc Extraction from C Headers, Previous: Doc Snarfing Overview, Up: Doc Maintenance
For C source files, the SCM_DEFINE and related macros used for
init snarfing include a standard place for documentation strings. You
can use the c2doc program to extract them (see guile-tools c2doc).
Following on the c2x init snarfing example (see Init Snarfing), here is a Makefile.am fragment that makes use of c2doc:
snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS)
SUFFIXES = .c .doc
.c.doc:
guile-tools c2doc -o $@ $< -- $(snarfcppopts)
Note the -- (double-hyphen) immediately prior to the C
pre-processor options: it unambiguously separates c2doc options
from C pre-processor options.