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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA3B0CD4F33 for ; Fri, 22 Sep 2023 08:53:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.606797.944833 (Exim 4.92) (envelope-from ) id 1qjbup-0005ah-UH; Fri, 22 Sep 2023 08:53:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 606797.944833; Fri, 22 Sep 2023 08:53:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qjbup-0005aa-Qy; Fri, 22 Sep 2023 08:53:35 +0000 Received: by outflank-mailman (input) for mailman id 606797; Fri, 22 Sep 2023 08:53:35 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qjbup-0005aU-A8 for xen-devel@lists.xenproject.org; Fri, 22 Sep 2023 08:53:35 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 82616965-5925-11ee-878a-cb3800f73035; Fri, 22 Sep 2023 10:53:33 +0200 (CEST) Received: from support.bugseng.com (support.bugseng.com [162.55.131.47]) by support.bugseng.com (Postfix) with ESMTPA id C590B4EE0739; Fri, 22 Sep 2023 10:53:32 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 82616965-5925-11ee-878a-cb3800f73035 MIME-Version: 1.0 Date: Fri, 22 Sep 2023 10:53:32 +0200 From: Nicola Vetrini To: Anthony PERARD Cc: xen-devel@lists.xenproject.org, sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Wei Liu , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall Subject: Re: [XEN PATCH 2/3] docs: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR In-Reply-To: <30e0d1b7-6ac0-464e-b45f-36b56960d8f9@perard> References: <30e0d1b7-6ac0-464e-b45f-36b56960d8f9@perard> User-Agent: Roundcube Webmail/1.4.3 Message-ID: X-Sender: nicola.vetrini@bugseng.com Organization: BUGSENG s.r.l. Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit On 08/09/2023 13:04, Anthony PERARD wrote: > On Fri, Sep 01, 2023 at 11:06:39AM +0200, Nicola Vetrini wrote: >> diff --git a/docs/misra/Makefile b/docs/misra/Makefile >> new file mode 100644 >> index 000000000000..8ea0505c8a20 >> --- /dev/null >> +++ b/docs/misra/Makefile >> @@ -0,0 +1,17 @@ >> +TARGETS := C-runtime-failures.o >> + >> +all: $(TARGETS) >> + >> +# sed is used in place of cat to prevent occurrences of '*/' >> +# in the .rst from breaking the compilation >> +$(TARGETS:.o=.c): %.c: %.rst >> + echo "/*\n" > $@.tmp > > This doesn't really works as you expect. Depending on the shell used or > the echo binary used, the "\n" would write a or justs "\n". > Bash just write "\n" for example, while dash does write a . > But, you can use `printf` instead: > printf "/*\n\n" > $@.tmp > >> + sed -e 's|\*/|*//*|g' $< >> $@.tmp >> + echo "\n*/" >> $@.tmp > > Same here. > > Thanks, I'll fix it in the next version. -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)