From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 42B03A04FF;
	Thu, 31 Mar 2022 23:29:01 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 40BF84290A;
	Thu, 31 Mar 2022 23:28:56 +0200 (CEST)
Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com
 [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id 4D0F94014F
 for <dev@dpdk.org>; Thu, 31 Mar 2022 23:28:54 +0200 (CEST)
Received: by mail-lf1-f41.google.com with SMTP id d5so1417318lfj.9
 for <dev@dpdk.org>; Thu, 31 Mar 2022 14:28:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=o36aRFEl77hR+F6pvDZpVJ5cRqKfmPSpnhDyp1iyr44=;
 b=W+5LjinVcLDidc+t4xHhcdf2aW0mYsLC6Mw2KkN7yzmFmDuY17LnVSU0CYOpziyZhR
 wio2sIox8S3Pdw7HDLFYGc2gVqW7IgqvSzeximzGYoMWi6WbstWc+tperTLORh3HqDj5
 yDciiXJoPsSd0wsu2MoOYubM+oZnKHjlr1PteXJpkBn7SRITNJHxKS7tCklZHlZwS+TD
 BatMo1seQwI3QSd1aUSWEDVjGbmJlkakfAdPvACR6oMbh2WnNfjlu47PkgvnCd6aHZXz
 jptXe2uYft7rra2uBZJ73glet07k2N6mH1UzMmXvNE0j4c+A/OzZG3tcKhhqzjI45bV2
 5TmA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=o36aRFEl77hR+F6pvDZpVJ5cRqKfmPSpnhDyp1iyr44=;
 b=ay9vNYld3eaX0jzvxfV9s1c7EAiDPPoT5whPbiRDYsk6u+xcAgvm6FeuWlmOWHTy3E
 VsO+fIIlmyJeXl8YF+q20UcFsnIuLGEx4HNIUGyoOR3yYo2yb9pb5F5N/tKy7OudkkJy
 C2IOxTg+TIBfeXZQ/h279kGSyosnhfE+ngnKOB+3PGdGfcueq9J+ii2JIw2qw326/jhY
 mnJY6G9qj+scDuSrQrk7+IAC0+XNsJea6XxKnN6oRZXa0Y6TH7qkmSCleLevH3dWwqKL
 268G12N0Cq5yY5iTI2HYtBJP5opmsqVwUcWoNSWaHCT89uT+Gs0QbN/IHO3Tv44qcr7f
 Dk9Q==
X-Gm-Message-State: AOAM5321OF6eiddtzxQ7uMJn5U7axicQh3GHtnKxIKkwZffsJqeagZaJ
 /v/JEc2zaQIrUOpAxG5zeslF+y2ZgSE=
X-Google-Smtp-Source: ABdhPJwKna0EPIjfh6S2nOXqIUE/+NFVxZ44GBAWxAHGWzZUHMk3ToGqhyInTkn0+PNmKQxDzVgqvQ==
X-Received: by 2002:a05:6512:1301:b0:439:73a2:7ca3 with SMTP id
 x1-20020a056512130100b0043973a27ca3mr11566379lfu.685.1648762133601; 
 Thu, 31 Mar 2022 14:28:53 -0700 (PDT)
Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru.
 [37.110.65.23]) by smtp.gmail.com with ESMTPSA id
 o7-20020ac24c47000000b0044a15c4e0aesm47567lfk.272.2022.03.31.14.28.52
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 31 Mar 2022 14:28:53 -0700 (PDT)
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 1/3] doc: simplify CSS customization for Doxygen
Date: Fri,  1 Apr 2022 00:28:28 +0300
Message-Id: <20220331212830.708912-2-dmitry.kozliuk@gmail.com>
X-Mailer: git-send-email 2.29.3
In-Reply-To: <20220331212830.708912-1-dmitry.kozliuk@gmail.com>
References: <20220331212830.708912-1-dmitry.kozliuk@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

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