All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH 2/2] doc/api: track header files to rebuild docs on change
Date: Fri, 17 Jan 2020 11:22:36 +0000	[thread overview]
Message-ID: <20200117112236.5225-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20200117112236.5225-1-bruce.richardson@intel.com>

Generate a dependency file for the header files used in the API guide
so that the docs can be rebuilt if a header changes.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/api/generate_doxygen.sh | 5 ++++-
 doc/api/meson.build         | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/api/generate_doxygen.sh b/doc/api/generate_doxygen.sh
index ab5766095..ee509e896 100755
--- a/doc/api/generate_doxygen.sh
+++ b/doc/api/generate_doxygen.sh
@@ -6,5 +6,8 @@ DOXYCONF=$1
 OUTDIR=$2
 SCRIPTCSS=$3
 
-doxygen "${DOXYCONF}"
+# run doxygen, capturing all the header files it processed
+doxygen "${DOXYCONF}" | tee doxygen.out
+echo "$OUTDIR: $(awk '/Preprocessing/ {printf("%s ", substr($2, 1, length($2) - 3))}' doxygen.out)" > $OUTDIR.d
+
 "${SCRIPTCSS}" "${OUTDIR}"/doxygen.css
diff --git a/doc/api/meson.build b/doc/api/meson.build
index 899e930fa..49d5b9a15 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -15,7 +15,7 @@ generate_doxygen = find_program('generate_doxygen.sh')
 generate_examples = find_program('generate_examples.sh')
 generate_css = find_program('doxy-html-custom.sh')
 
-htmldir = join_paths('share', 'doc', 'dpdk')
+htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
 
 # due to the following bug: https://github.com/mesonbuild/meson/issues/4107
 # if install is set to true it will override build_by_default and it will
@@ -46,6 +46,7 @@ doxy_build = custom_target('doxygen',
 	depends: example,
 	input: doxy_conf,
 	output: 'api',
+	depfile: 'api.d',
 	command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css],
 	install: get_option('enable_docs'),
 	install_dir: htmldir,
-- 
2.20.1


  parent reply	other threads:[~2020-01-17 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17 11:22 [dpdk-dev] [PATCH 0/2] Do proper dependency tracking for doxygen Bruce Richardson
2020-01-17 11:22 ` [dpdk-dev] [PATCH 1/2] doc/api: generate dependency file for examples doc Bruce Richardson
2020-01-17 11:51   ` Luca Boccassi
2020-01-17 11:22 ` Bruce Richardson [this message]
2020-01-17 11:51   ` [dpdk-dev] [PATCH 2/2] doc/api: track header files to rebuild docs on change Luca Boccassi
2020-02-15 16:58 ` [dpdk-dev] [PATCH 0/2] Do proper dependency tracking for doxygen Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200117112236.5225-3-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.