Skip to content

Commit daa84b3

Browse files
committed
Merge #12029: Build: Add a makefile target for Doxygen documentation
a777244 Build: Add a makefile target for Doxygen documentation (Andrea Comand) Pull request description: You can now build the doxygen documentation with `make docs` and clean it with `make clean-docs`. Fixes: #11949 Tree-SHA512: f2361ec7f771227367dd04bba1a444b44e59f13901463a678a5f2f579a10a56d67db2e29552e754e312a1c472a31593b6af189cbaac5cd351a428c57baf5ace7
2 parents 23481fa + a777244 commit daa84b3

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

Makefile.am

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,22 @@ CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
277277

278278
DISTCHECK_CONFIGURE_FLAGS = --enable-man
279279

280-
clean-local:
280+
doc/doxygen/.stamp: doc/Doxyfile FORCE
281+
$(MKDIR_P) $(@D)
282+
$(DOXYGEN) $^
283+
$(AM_V_at) touch $@
284+
285+
if HAVE_DOXYGEN
286+
docs: doc/doxygen/.stamp
287+
else
288+
docs:
289+
@echo "error: doxygen not found"
290+
endif
291+
292+
clean-docs:
293+
rm -rf doc/doxygen
294+
295+
clean-local: clean-docs
281296
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
282297
rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache
298+

configure.ac

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ AC_PATH_PROG(HEXDUMP,hexdump)
9393
AC_PATH_TOOL(READELF, readelf)
9494
AC_PATH_TOOL(CPPFILT, c++filt)
9595
AC_PATH_TOOL(OBJCOPY, objcopy)
96+
AC_PATH_PROG(DOXYGEN, doxygen)
97+
if test -z "$DOXYGEN"; then
98+
AC_MSG_WARN([Doxygen not found])
99+
fi
100+
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
96101

97102
AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files)
98103

@@ -1260,7 +1265,7 @@ AC_SUBST(PROTOBUF_LIBS)
12601265
AC_SUBST(QR_LIBS)
12611266
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
12621267
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
1263-
AC_CONFIG_FILES([doc/Doxyfile])
1268+
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])])
12641269
AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
12651270
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
12661271
AC_CONFIG_LINKS([test/util/bitcoin-util-test.py:test/util/bitcoin-util-test.py])

doc/developer-notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ Not OK (used plenty in the current source, but not picked up):
132132
A full list of comment syntaxes picked up by doxygen can be found at http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html,
133133
but if possible use one of the above styles.
134134

135+
Documentation can be generated with `make docs` and cleaned up with `make clean-docs`.
136+
135137
Development tips and tricks
136138
---------------------------
137139

0 commit comments

Comments
 (0)