diff --git a/Makefile.am b/Makefile.am index 243fd59520..cfc8d02e6f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -292,6 +292,21 @@ CLEANFILES = $(OSX_DMG) $(RAVEN_WIN_INSTALLER) DISTCHECK_CONFIGURE_FLAGS = --enable-man -clean-local: +doc/doxygen/.stamp: doc/Doxyfile FORCE + $(MKDIR_P) $(@D) + $(DOXYGEN) $^ + $(AM_V_at) touch $@ + +if HAVE_DOXYGEN +docs: doc/doxygen/.stamp +else +docs: + @echo "error: doxygen not found" +endif + +clean-docs: + rm -rf doc/doxygen + +clean-local: clean-docs rm -rf coverage_percent.txt test_raven.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP) rm -rf test/functional/__pycache__ diff --git a/configure.ac b/configure.ac index 9d2f1a0be7..fe18a47e95 100644 --- a/configure.ac +++ b/configure.ac @@ -94,6 +94,12 @@ AC_PATH_TOOL(READELF, readelf) AC_PATH_TOOL(CPPFILT, c++filt) AC_PATH_TOOL(OBJCOPY, objcopy) +AC_PATH_PROG(DOXYGEN, doxygen) +if test -z "$DOXYGEN"; then + AC_MSG_WARN([Doxygen not found]) +fi +AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) + AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files) # Enable wallet @@ -1242,7 +1248,7 @@ AC_SUBST(PROTOBUF_LIBS) AC_SUBST(QR_LIBS) AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini]) AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) -AC_CONFIG_FILES([doc/Doxyfile]) +AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])]) AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py]) AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py]) AC_CONFIG_LINKS([test/util/raven-util-test.py:test/util/raven-util-test.py]) diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 4c2ab989e0..7c660b854a 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -129,9 +129,21 @@ Not OK (used plenty in the current source, but not picked up): // ``` -A full list of comment syntaxes picked up by doxygen can be found at http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html, +A full list of comment syntaxes picked up by doxygen can be found at +http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html, but if possible use one of the above styles. +The Ravencoin Doxygen documentation can be generated by running `make docs` from the top-level +directory of the repository. +That creates the documentation in the directory "doc/doxygen" and the it can be accessed by a browser at: + doc/doxygen/html/index.html +The documentation can by deleted by running `make clean-docs`. + +Before running `make docs`, you will need to install dependencies `doxygen` and `dot` (a component +of `graphviz`). For example, + on MacOS via Homebrew: `brew install doxygen --with-graphviz` + on Debian/Ubuntu: `sudo install doxygen graphviz` + Development tips and tricks --------------------------- diff --git a/src/net_processing.h b/src/net_processing.h index 9539bfab69..baf3687795 100644 --- a/src/net_processing.h +++ b/src/net_processing.h @@ -67,7 +67,7 @@ class PeerLogicValidation final: public CValidationInterface, public NetEventsIn void EvictExtraOutboundPeers(int64_t time_in_seconds); private: - int64_t m_stale_tip_check_time; //! Next time to check for stale tip + int64_t m_stale_tip_check_time; //!< Next time to check for stale tip }; struct CNodeStateStats { diff --git a/src/netbase.cpp b/src/netbase.cpp index 2f22a0a41b..a74aa3b946 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -193,10 +193,10 @@ enum SOCKSVersion: uint8_t { /** Values defined for METHOD in RFC1928 */ enum SOCKS5Method: uint8_t { - NOAUTH = 0x00, //! No authentication required - GSSAPI = 0x01, //! GSSAPI - USER_PASS = 0x02, //! Username/password - NO_ACCEPTABLE = 0xff, //! No acceptable methods + NOAUTH = 0x00, //!< No authentication required + GSSAPI = 0x01, //!< GSSAPI + USER_PASS = 0x02, //!< Username/password + NO_ACCEPTABLE = 0xff, //!< No acceptable methods }; /** Values defined for CMD in RFC1928 */ @@ -208,15 +208,15 @@ enum SOCKS5Command: uint8_t { /** Values defined for REP in RFC1928 */ enum SOCKS5Reply: uint8_t { - SUCCEEDED = 0x00, //! Succeeded - GENFAILURE = 0x01, //! General failure - NOTALLOWED = 0x02, //! Connection not allowed by ruleset - NETUNREACHABLE = 0x03, //! Network unreachable - HOSTUNREACHABLE = 0x04, //! Network unreachable - CONNREFUSED = 0x05, //! Connection refused - TTLEXPIRED = 0x06, //! TTL expired - CMDUNSUPPORTED = 0x07, //! Command not supported - ATYPEUNSUPPORTED = 0x08, //! Address type not supported + SUCCEEDED = 0x00, //!< Succeeded + GENFAILURE = 0x01, //!< General failure + NOTALLOWED = 0x02, //!< Connection not allowed by ruleset + NETUNREACHABLE = 0x03, //!< Network unreachable + HOSTUNREACHABLE = 0x04, //!< Network unreachable + CONNREFUSED = 0x05, //!< Connection refused + TTLEXPIRED = 0x06, //!< TTL expired + CMDUNSUPPORTED = 0x07, //!< Command not supported + ATYPEUNSUPPORTED = 0x08, //!< Address type not supported }; /** Values defined for ATYPE in RFC1928 */ diff --git a/src/policy/fees.h b/src/policy/fees.h index f6b3b9dca0..e9f16e2d70 100644 --- a/src/policy/fees.h +++ b/src/policy/fees.h @@ -96,9 +96,9 @@ std::string StringForFeeReason(FeeReason reason); /* Used to determine type of fee estimation requested */ enum class FeeEstimateMode { - UNSET, //! Use default settings based on other criteria - ECONOMICAL, //! Force estimateSmartFee to use non-conservative estimates - CONSERVATIVE, //! Force estimateSmartFee to use conservative estimates + UNSET, //!< Use default settings based on other criteria + ECONOMICAL, //!< Force estimateSmartFee to use non-conservative estimates + CONSERVATIVE, //!< Force estimateSmartFee to use conservative estimates }; bool FeeModeFromString(const std::string& mode_string, FeeEstimateMode& fee_estimate_mode); diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 1fcf86bc6c..d855cf538c 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -70,7 +70,7 @@ class CTxIn COutPoint prevout; CScript scriptSig; uint32_t nSequence; - CScriptWitness scriptWitness; //! Only serialized through CTransaction + CScriptWitness scriptWitness; //!< Only serialized through CTransaction /* Setting nSequence to this value for every input in a transaction * disables nLockTime. */ diff --git a/src/txmempool.h b/src/txmempool.h index f1f71e1c0c..668d7030d7 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -318,13 +318,13 @@ struct TxMempoolInfo * this is passed to the notification signal. */ enum class MemPoolRemovalReason { - UNKNOWN = 0, //! Manually removed or unknown reason - EXPIRY, //! Expired from mempool - SIZELIMIT, //! Removed in size limiting - REORG, //! Removed for reorganization - BLOCK, //! Removed for block - CONFLICT, //! Removed for conflict with in-block transaction - REPLACED //! Removed for replacement + UNKNOWN = 0, //!< Manually removed or unknown reason + EXPIRY, //!< Expired from mempool + SIZELIMIT, //!< Removed in size limiting + REORG, //!< Removed for reorganization + BLOCK, //!< Removed for block + CONFLICT, //!< Removed for conflict with in-block transaction + REPLACED, //!< Removed for replacement }; class SaltedTxidHasher