DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: Vipin Varghese <vipin.varghese@amd.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: [PATCH v2 1/3] doc: simplify CSS customization for Doxygen
Date: Wed,  6 Apr 2022 20:10:10 +0300	[thread overview]
Message-ID: <20220406171012.87759-2-dmitry.kozliuk@gmail.com> (raw)
In-Reply-To: <20220406171012.87759-1-dmitry.kozliuk@gmail.com>

CSS for API documentation was customized by a shell script
modifying the file that Doxygen produces.
This way CSS code is kept in a script and an extra build step is added.
Move custom style to a plain CSS file.
Use Doxygen capability to attach this extra stylesheet.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 doc/api/custom.css          | 6 ++++++
 doc/api/doxy-api.conf.in    | 1 +
 doc/api/doxy-html-custom.sh | 8 --------
 doc/api/generate_doxygen.sh | 3 ---
 doc/api/meson.build         | 3 +--
 5 files changed, 8 insertions(+), 13 deletions(-)
 create mode 100644 doc/api/custom.css
 delete mode 100755 doc/api/doxy-html-custom.sh

diff --git a/doc/api/custom.css b/doc/api/custom.css
new file mode 100644
index 0000000000..66360f9b48
--- /dev/null
+++ b/doc/api/custom.css
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2013 6WIND S.A.
+ */
+
+/* space between item and its comment */
+dd td:first-child { padding-right: 2em; }
diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
index db2ca9b6ed..8e961cbc8c 100644
--- a/doc/api/doxy-api.conf.in
+++ b/doc/api/doxy-api.conf.in
@@ -102,6 +102,7 @@ ALPHABETICAL_INDEX      = NO
 
 HTML_TIMESTAMP          = NO
 HTML_DYNAMIC_SECTIONS   = YES
+HTML_EXTRA_STYLESHEET   = @TOPDIR@/doc/api/custom.css
 SEARCHENGINE            = YES
 SORT_MEMBER_DOCS        = NO
 SOURCE_BROWSER          = YES
diff --git a/doc/api/doxy-html-custom.sh b/doc/api/doxy-html-custom.sh
deleted file mode 100755
index 3802007c8c..0000000000
--- a/doc/api/doxy-html-custom.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright 2013 6WIND S.A.
-
-CSS=$1
-
-# space between item and its comment
-echo 'dd td:first-child {padding-right: 2em;}' >> $CSS
diff --git a/doc/api/generate_doxygen.sh b/doc/api/generate_doxygen.sh
index 1350e50491..1940ea46e2 100755
--- a/doc/api/generate_doxygen.sh
+++ b/doc/api/generate_doxygen.sh
@@ -4,12 +4,9 @@
 
 DOXYCONF=$1
 OUTDIR=$2
-SCRIPTCSS=$3
 
 OUT_FILE=$(dirname $OUTDIR)/doxygen.out
 
 # run doxygen, capturing all the header files it processed
 doxygen "${DOXYCONF}" > $OUT_FILE
 echo "$OUTDIR: $(awk '/Preprocessing/ {printf("%s ", substr($2, 1, length($2) - 3))}' $OUT_FILE)" > $OUTDIR.d
-
-"${SCRIPTCSS}" "${OUTDIR}"/doxygen.css
diff --git a/doc/api/meson.build b/doc/api/meson.build
index 5c25b92092..53338a02d6 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -13,7 +13,6 @@ endif
 # script to run the CSS modification afterwards
 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(get_option('datadir'), 'doc', 'dpdk')
 
@@ -52,7 +51,7 @@ doxy_build = custom_target('doxygen',
         input: doxy_conf,
         output: 'html',
         depfile: 'html.d',
-        command: [generate_doxygen, '@INPUT@', '@OUTPUT@', generate_css],
+        command: [generate_doxygen, '@INPUT@', '@OUTPUT@'],
         install: get_option('enable_docs'),
         install_dir: htmldir,
         build_by_default: get_option('enable_docs'))
-- 
2.29.3


  reply	other threads:[~2022-04-06 17:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 21:28 [PATCH 0/3] doc: build on Windows Dmitry Kozlyuk
2022-03-31 21:28 ` [PATCH 1/3] doc: simplify CSS customization for Doxygen Dmitry Kozlyuk
2022-03-31 21:28 ` [PATCH 2/3] doc: fix API index Markdown syntax Dmitry Kozlyuk
2022-03-31 21:28 ` [PATCH 3/3] doc: rewrite shell scripts in Python Dmitry Kozlyuk
2022-04-01 16:31   ` Bruce Richardson
2022-04-01 21:47     ` Dmitry Kozlyuk
2022-04-06 17:10 ` [PATCH v2 0/3] doc: build on Windows Dmitry Kozlyuk
2022-04-06 17:10   ` Dmitry Kozlyuk [this message]
2022-04-06 17:10   ` [PATCH v2 2/3] doc: fix API index Markdown syntax Dmitry Kozlyuk
2022-04-06 17:10   ` [PATCH v2 3/3] doc: rewrite shell scripts in Python Dmitry Kozlyuk
2022-05-11  9:34   ` [PATCH v2 0/3] doc: build on Windows Varghese, Vipin
2022-05-11 10:56     ` Dmitry Kozlyuk
2022-06-01 10:47   ` 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=20220406171012.87759-2-dmitry.kozliuk@gmail.com \
    --to=dmitry.kozliuk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=vipin.varghese@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).