Generating MySQL Doxygen Documentation Content

MySQLMySQLi Database

The source code of MySQL contains a lot of internal documentation, which is written using Doxygen. This Doxygen content is available ata https://dev.mysql.com/doc/index-other.html. This Doxygen content can be generated locally from a MySQl source distribution. This can be done by following the below mentioned steps −

Install Doxygen

The first step is to install Doxygen 1.8.11 or a higher version of it. The distributions are available at http://www.doxygen.nl/.

Once it has been installed, the version number has to be verified. This can be done using the below command −

shell > doxygen −−version
1.8.13

Install PlantUML

Next step is to install PlantUML. When this is installed on Windows 10, it should be run as an administrator atleast once so that the registry keys can be created.

An administrator console can be opened, and the below code needs to be executed −

shell> java −jar path−to−plantuml.jar

The above command would open a GUI window, without any errors on the console.

Once this is done, the PLANTUML_JAR_PATH environment variable has to be set to the location where PlantUML was installed. Let us look at an example −

shell> export PLANTUML_JAR_PATH=path-to-plantuml.jar

Install Graphviz

The next step is to install Graphviz dot command.

Once this has been done, the dot availability needs to be verified. This can be done using the below commands −

shell> which dot
/usr/bin/dot

shell> dot −V
dot − graphviz version 2.28.0 (20130928.0220)

The location of the top-level directory of the MySQL source distribution has to be changed. This can be done using the below command −

shell> cd your-mysql-source-directory
shell> mkdir bld
shell> cd bld
shell> cmake ..

The cmake is executed first.

Generate Doxygen Documentation

The next step is to generate the doxygen documentation. This can be done by executing the below command −

shell> make doxygen

Once this is done, the error log has to be inspected. This is available in the doxyerror file which is present in the top−evel directory. Once the build has been executed properly, the generated output can be viewed on a browser. This can be done using the below command −

shell> firefox doxygen/html/index.html
raja
Published on 08-Mar-2021 12:00:01
Advertisements