From patchwork Wed Jan 21 13:31:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 79330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07DF5C44538 for ; Wed, 21 Jan 2026 13:32:02 +0000 (UTC) Received: from smtp-42a8.mail.infomaniak.ch (smtp-42a8.mail.infomaniak.ch [84.16.66.168]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.11827.1769002319123291701 for ; Wed, 21 Jan 2026 05:31:59 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: 0leil.net, ip: 84.16.66.168, mailfrom: foss+yocto@0leil.net) Received: from smtp-3-0000.mail.infomaniak.ch (unknown [IPv6:2001:1600:4:17::246b]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4dx4qK2gCKz4Qv; Wed, 21 Jan 2026 14:31:57 +0100 (CET) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4dx4qJ6H6Gzw3d; Wed, 21 Jan 2026 14:31:56 +0100 (CET) From: Quentin Schulz Date: Wed, 21 Jan 2026 14:31:45 +0100 Subject: [PATCH v2 04/12] sdk-manual: working-projects: properly highlight code code-blocks MIME-Version: 1.0 Message-Id: <20260121-code-block-misc-20260114-v2-4-fdd4bb5c2e68@cherry.de> References: <20260121-code-block-misc-20260114-v2-0-fdd4bb5c2e68@cherry.de> In-Reply-To: <20260121-code-block-misc-20260114-v2-0-fdd4bb5c2e68@cherry.de> To: docs@lists.yoctoproject.org Cc: Quentin Schulz X-Mailer: b4 0.14.3 X-Infomaniak-Routing: alpha List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 21 Jan 2026 13:32:02 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/8616 From: Quentin Schulz There are some blocks containing C code so highlight them as C with the "c" lexer. For autotool'ed files, there's no lexer available so "none" will do just fine. Finally, there's one Makefile code block so highlight it with the "makefile" lexer. Signed-off-by: Quentin Schulz --- documentation/sdk-manual/working-projects.rst | 28 ++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/documentation/sdk-manual/working-projects.rst b/documentation/sdk-manual/working-projects.rst index ceae1fedd..d64dae435 100644 --- a/documentation/sdk-manual/working-projects.rst +++ b/documentation/sdk-manual/working-projects.rst @@ -56,7 +56,9 @@ project: Create the remaining three files as follows: - - ``hello.c``:: + - ``hello.c``: + + .. code-block:: c #include @@ -66,7 +68,9 @@ project: return 0; } - - ``configure.ac``:: + - ``configure.ac``: + + .. code-block:: none AC_INIT(hello,0.1) AM_INIT_AUTOMAKE([foreign]) @@ -74,7 +78,9 @@ project: AC_CONFIG_FILES(Makefile) AC_OUTPUT - - ``Makefile.am``:: + - ``Makefile.am``: + + .. code-block:: none bin_PROGRAMS = hello hello_SOURCES = hello.c @@ -271,7 +277,9 @@ example: Create the three files as follows: - - ``main.c``:: + - ``main.c``: + + .. code-block:: c #include "module.h" void sample_func(); @@ -281,12 +289,16 @@ example: return 0; } - - ``module.h``:: + - ``module.h``: + + .. code-block:: c #include void sample_func(); - - ``module.c``:: + - ``module.c``: + + .. code-block:: c #include "module.h" void sample_func() @@ -321,7 +333,9 @@ example: two lines that can be used to set the :term:`CC` variable. One line is identical to the value that is set when you run the SDK environment setup script, and the other line sets :term:`CC` to "gcc", the default - GNU compiler on the build host:: + GNU compiler on the build host: + + .. code-block:: Makefile # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux # CC="gcc"