All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bertrand Marquis <Bertrand.Marquis@arm.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] xen: Add MISRA support to cppcheck make rule
Date: Tue, 31 May 2022 14:50:02 +0000	[thread overview]
Message-ID: <FD54D7F2-1A9A-4171-8708-C66BFD8510E5@arm.com> (raw)
In-Reply-To: <b84ed70c-dc34-6eb8-4b0d-a14b3fb91710@suse.com>

Hi,

> On 31 May 2022, at 15:28, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 31.05.2022 16:14, Bertrand Marquis wrote:
>>> On 31 May 2022, at 14:50, Jan Beulich <jbeulich@suse.com> wrote:
>>> On 31.05.2022 15:30, Bertrand Marquis wrote:
>>>> +# Replace current by goal in the dependency to generate an analysis for all
>>>> +# rules we would like to respect.
>>>> +cppcheck-misra.json cppcheck-misra.txt: $(XEN_ROOT)/docs/misra/rules.rst
>>>> +	$(Q)$(srctree)/tools/convert_misra_doc.py -i $< -o cppcheck-misra.txt \
>>>> +		-j cppcheck-misra.json
>>>> +
>>>> +# Prevent parallel make issues as script is generating both files
>>>> +cppcheck-misra.json: cppcheck-misra.txt
>>> 
>>> With this dependency the earlier rule should not list multiple targets
>>> (and it generally should not, for not being a pattern rule). If I'm not
>>> mistaken the way you have it the Python script would be invoked twice,
>>> and all you prevent is that it is invoked twice in parallel. And then
>>> please use $@ inside the rule. Additionally, with the script being an
>>> in-tree one, the rule should also have a dependency on that script
>>> (such that the targets would be rebuilt if the script alone changes).
>> 
>> I am a bit lost on the $@, previous patch adding cppcheck was changed
>> to use $(Q) instead. So can you justify this request ?
> 
> I'm talking of $@ (a macro expansion), not @ as a prefix to suppress
> command echoing.
> 

That make a lot more sense.

Thanks
Bertrand

> Jan
> 
> 



      reply	other threads:[~2022-05-31 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 13:30 [PATCH] xen: Add MISRA support to cppcheck make rule Bertrand Marquis
2022-05-31 13:50 ` Jan Beulich
2022-05-31 14:14   ` Bertrand Marquis
2022-05-31 14:28     ` Jan Beulich
2022-05-31 14:50       ` Bertrand Marquis [this message]

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=FD54D7F2-1A9A-4171-8708-C66BFD8510E5@arm.com \
    --to=bertrand.marquis@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.