On 31.05.2022 16:14, Bertrand Marquis wrote:
>> On 31 May 2022, at 14:50, Jan Beulich <[email protected]> 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.

Jan


Reply via email to