[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v2 2/3] docs: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Thu, 28 Sep 2023 00:53:30 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/XD0k6XY3UGd1KI6ghs3WdoJL5f1kSZPTQvp2UdKnIw=; b=aD2+3uJwBKlXH9wTxQ1fjafaaOaBL75BdGd14+966fKFUTR4dBvjv+K4NaADAk3Hw1i+3CTytWLbGUBKfdJVtJVSK0UloLMjXs61qej0OgH+P2sgNeOGhw1+xTY3qBHFxNkHJehFhxZkQeOC5Eau5uXAp/Wddd/pt3cUEEhEF8k8GR1Q3EnVPo9U1IAj8rrGu78fFo2qhb3h6FmcPUMvsUPn79cZ86DRflDNbbScXTjOOvMZOio+owjFYOasbqCxH5RSVswGdMT2ryWlXhW5olnmaI0hVqqQkU4E5s1pDnT+upbixzrw6RSLAPx4j5Y0fDmsmspsxu3BBclxM/LVlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GGRJlxaHHhPUBmclXBVFdfnoEliyYVfai9dfeO4XBg8C+/8sA4sKCCM23M1vNJTaZ+isaOPWKpI8TpjVv8G5hDwEigWRTscVzPGrPah5nt30/0C/joXhXIK3/8zj8/yjIOimRECXzP7one8kBC1S/PK6wMOmWi+GSnMmKCVkip1IkNGKbr/+xkIiz7SPuWj7X+yOiacZ31Jss+/7mQR7XJu/2bW1YbPaMXOxD3FzYERX0eYsRhswQTD4GmTFOYPQT+4xSk9yHpsmAqrPZrYB52kT/LKxjDvMWHIXqYtveHcu4Wt/91npr26oYDxtcxXhWLCsdQk+xBA3HgftiY8OIA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "xenia.ragiadakou@xxxxxxx" <xenia.ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, "consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Thu, 28 Sep 2023 00:54:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZ8ShxJs2WsoZlEkeaevb5QFdHibAvaOaAgAABIYA=
  • Thread-topic: [XEN PATCH v2 2/3] docs: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR


> On Sep 28, 2023, at 08:49, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> On Wed, 27 Sep 2023, Nicola Vetrini wrote:
>> To be able to check for the existence of the necessary subsections in
>> the documentation for MISRA C:2012 Dir 4.1, ECLAIR needs to have a source
>> file that is built.
>> 
>> This file is generated from 'C-runtime-failures.rst' in docs/misra
>> and the configuration is updated accordingly.
>> 
>> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry
> 
> 
>> ---
>> Changes from RFC:
>> - Dropped unused/useless code
>> - Revised the sed command
>> - Revised the clean target
>> 
>> Changes in v2:
>> - Added explanative comment to the makefile
>> - printf instead of echo
>> ---
>> docs/Makefile       |  7 ++++++-
>> docs/misra/Makefile | 22 ++++++++++++++++++++++
>> 2 files changed, 28 insertions(+), 1 deletion(-)
>> create mode 100644 docs/misra/Makefile
>> 
>> diff --git a/docs/Makefile b/docs/Makefile
>> index 966a104490ac..ff991a0c3ca2 100644
>> --- a/docs/Makefile
>> +++ b/docs/Makefile
>> @@ -43,7 +43,7 @@ DOC_PDF  := $(patsubst %.pandoc,pdf/%.pdf,$(PANDOCSRC-y)) \
>> all: build
>> 
>> .PHONY: build
>> -build: html txt pdf man-pages figs
>> +build: html txt pdf man-pages figs misra
>> 
>> .PHONY: sphinx-html
>> sphinx-html:
>> @@ -66,9 +66,14 @@ endif
>> .PHONY: pdf
>> pdf: $(DOC_PDF)
>> 
>> +.PHONY: misra
>> +misra:
>> + $(MAKE) -C misra
>> +
>> .PHONY: clean
>> clean: clean-man-pages
>> $(MAKE) -C figs clean
>> + $(MAKE) -C misra clean
>> rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
>> rm -rf *.ilg *.log *.ind *.toc *.bak *.tmp core
>> rm -rf html txt pdf sphinx/html
>> diff --git a/docs/misra/Makefile b/docs/misra/Makefile
>> new file mode 100644
>> index 000000000000..8fd89404e96b
>> --- /dev/null
>> +++ b/docs/misra/Makefile
>> @@ -0,0 +1,22 @@
>> +TARGETS := C-runtime-failures.o
>> +
>> +all: $(TARGETS)
>> +
>> +# This Makefile will generate the object files indicated in TARGETS by 
>> taking
>> +# the corresponding .rst file, converting its content to a C block comment 
>> and
>> +# then compiling the resulting .c file. This is needed for the file's 
>> content to
>> +# be available when performing static analysis with ECLAIR on the project.
>> +
>> +# sed is used in place of cat to prevent occurrences of '*/'
>> +# in the .rst from breaking the compilation
>> +$(TARGETS:.o=.c): %.c: %.rst
>> + printf "/*\n\n" > $@.tmp
>> + sed -e 's|\*/|*//*|g' $< >> $@.tmp
>> + printf "\n\n*/" >> $@.tmp
>> + mv $@.tmp $@
>> +
>> +%.o: %.c
>> + $(CC) -c $< -o $@
>> +
>> +clean:
>> + rm -f C-runtime-failures.c *.o *.tmp
>> -- 
>> 2.34.1
>> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.