Skip to content

Commit

Permalink
libublksrv: doxygen: add Doxyfile
Browse files Browse the repository at this point in the history
Add doxygen config file, and prepare for documenting libublksrv data
structure and interface.

For addressing issue #49.

doxgen doc can be generated by running 'make doxygen_doc', and the
generated docs are in doc/html.

Todo: integrate doxygen with autoconf more gracefully.

Signed-off-by: Ming Lei <[email protected]>
  • Loading branch information
ming1 committed Mar 15, 2023
1 parent 4ac90fb commit ac95de3
Show file tree
Hide file tree
Showing 5 changed files with 2,743 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ Makefile.in
/tests/tmp/
/ublk
/ublksrv.pc
/doc/html
7 changes: 6 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ublk_user_id_LDADD = lib/libublksrv.la $(LIBURING_LIBS) $(PTHREAD_LIBS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = ublksrv.pc

CLEANFILES = *~ test cscope.* include/*~ *.d qcow2/*~ nbd/*~ utils/*~
CLEANFILES = *~ test cscope.* include/*~ *.d qcow2/*~ nbd/*~ utils/*~ doc/html/*

R = 10
D = tests/tmp/
Expand All @@ -51,6 +51,11 @@ test: $(sbin_PROGRAMS) $(noinst_PROGRAMS)
cscope:
@cscope -b -R

if HAVE_DOXYGEN
doxygen_doc:
doxygen doc/Doxyfile
endif

# Check no files are missing from EXTRA_DIST rules, and that all
# generated files have been included in the tarball. (Note you must
# have done 'make dist')
Expand Down
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ ublksrv, 'ublk add --debug_mask=0x{MASK}' can control which kind of
debug log dumped, see ``UBLK_DBG_*`` defined in include/ublksrv_utils.h
for each kind of debug log.

libublksrv API doc
==================

API is documented in include/ublksrv.h, and doxygen doc can be generated
by running 'make doxygen_doc', the generated html docs are in doc/html.

License
=======

Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ else
AC_MSG_RESULT([no])
fi

AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN"; then
AC_MSG_WARN([Doxygen not found - continue without Doxygen support])
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])

dnl Produce output files.
AC_CONFIG_HEADERS([config.h])

Expand Down
Loading

0 comments on commit ac95de3

Please sign in to comment.