From f5cb46ee29a99e524625d6ba1ad65b324b772d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Wed, 22 May 2024 12:09:58 +0200 Subject: [PATCH] Add doc-install to Makefile --- CHANGELOG.md | 4 ++++ Makefile | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 016627c..585439a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - A2DE & SPnDE tests. - Add tests to reach 99% of coverage. - Add tests to check the correct version of the mdlp, folding and json libraries. +- Library documentation generated with Doxygen. +- Link to documentation in the README.md. ### Internal @@ -27,6 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Refactor Coverage Report generation. - Add devcontainer to work on apple silicon. - Change build cmake folder names to Debug & Release. +- Add a Makefile target (doc) to generate the documentation. +- Add a Makefile target (doc-install) to install the documentation. ## [1.0.5] 2024-04-20 diff --git a/Makefile b/Makefile index aab1cc5..6d8a7aa 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash .DEFAULT_GOAL := help -.PHONY: viewcoverage coverage setup help install uninstall diagrams buildr buildd test clean debug release sample updatebadge doc +.PHONY: viewcoverage coverage setup help install uninstall diagrams buildr buildd test clean debug release sample updatebadge doc doc-install f_release = build_Release f_debug = build_Debug @@ -13,6 +13,9 @@ lcov = lcov genhtml = genhtml dot = dot n_procs = -j 16 +docsrcdir = docs/manual +mansrcdir = docs/man3 +mandestdir = /usr/local/share/man define ClearTests @for t in $(test_targets); do \ @@ -150,6 +153,20 @@ doc: ## Generate documentation @cmake --build $(f_release) -t doxygen @echo ">>> Done"; +docdir = "" +doc-install: ## Install documentation + @echo ">>> Installing documentation..." + @if [ "$(docdir)" = "" ]; then \ + echo "docdir parameter has to be set when calling doc-install"; \ + exit 1; \ + fi + @if [ ! -d $(docdir) ]; then \ + @$(MAKE) doc; \ + fi + @cp -rp $(docsrcdir)/* $(docdir) + @sudo cp -rp $(mansrcdir) $(mandestdir) + @echo ">>> Done"; + help: ## Show help message @IFS=$$'\n' ; \ help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \