diff --git a/README.md b/README.md index c321afa..774985c 100644 --- a/README.md +++ b/README.md @@ -90,15 +90,18 @@ for more advanced build management tasks. The Micro BGP Suite uses [Doxygen](https://www.doxygen.org/index.html) to document its API. In order to build `µbgpsuite` documentation you must enable the `build-doc` -configure flag. This flag is enabled automatically if you have `doxygen` -installed in your system when you run `meson` to configure the project for the -first time. +configure flag. + +To do so, run the following command inside an already existing `build` directory: +```sh +$ meson configure -Dbuild-doc=true +``` Once the flag is enabled, you can use: ```sh $ ninja doc ``` -inside build directory to generate Doxygen documentation. +inside the build directory to generate the Doxygen documentation. You can access the documentation by pointing your web browser to `doc/html/index.html` inside the build directory. diff --git a/doc/meson.build b/doc/meson.build index bbd6aa4..6c58707 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -6,6 +6,8 @@ cdata = configuration_data({ 'PROJECT_NAME': meson.project_name(), }) +doxygen = find_program('doxygen') + doxyfile = configure_file(input : 'Doxyfile.in', output : 'Doxyfile', configuration : cdata, diff --git a/meson.build b/meson.build index 9bbe714..a1cd7a5 100644 --- a/meson.build +++ b/meson.build @@ -97,11 +97,8 @@ lonetix_dep = declare_dependency(compile_args : lonetix_args, # TODO # endif -doxygen = find_program('doxygen', required : get_option('build-doc')) -if doxygen.found() +if get_option('build-doc') subdir('doc') -elif get_option('build-doc').auto() - message('Not building documentation as doxygen was not found') endif if get_option('build-bgpgrep') diff --git a/meson_options.txt b/meson_options.txt index 6fa6192..ff8e913 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,7 @@ option('native', type : 'boolean', value : false, description : 'Optimize build for local CPU architecture (ties build artifacts to your local machine!)') -option('build-doc', type : 'boolean', description : 'Build documentation using doxygen') +option('build-doc', type : 'boolean', value : false, description : 'Build documentation using doxygen') # TODO option('build-benchmarks', type : 'boolean', value : false, description : 'Build benchmarks') option('build-tests', type : 'boolean', value : false, description : 'Build tests') option('build-bgpgrep', type : 'boolean', description : 'Build bgpgrep MRT/BGP parsing and filting utility') option('build-peerindex', type : 'boolean', description : 'Build peerindex MRT TABLE_DUMPV2 Peer Index Table inspection tool') -option('bgpscanner-legacy', type : 'boolean', value : false, description : 'Install a legacy wrapper script for backwards compatibility with Isolario bgpscanner') \ No newline at end of file +option('bgpscanner-legacy', type : 'boolean', value : false, description : 'Install a legacy wrapper script for backwards compatibility with Isolario bgpscanner')