From: Kieran Bingham <kieran@ksquared.org.uk>
To: Michal Marek <mmarek@suse.com>
Cc: linux-kbuild@vger.kernel.org, Jan Kiszka <jan.kiszka@web.de>
Subject: Re: Automatic dependency resolution on generated python file
Date: Tue, 21 Jun 2016 23:02:45 +0100 [thread overview]
Message-ID: <5769B985.7080208@bingham.xyz> (raw)
In-Reply-To: <576802A4.5040804@suse.com>
On 20/06/16 15:50, Michal Marek wrote:
> On 2016-05-24 01:02, Kieran Bingham wrote:
>> Hi Kbuild / Michal,
>>
>> I've been working through a problem that Jan has reported whereby if we
>> modify a file included by our template for constants.py, the generated
>> file is not rebuilt.
>>
>> The rule/cmd [0] to generate the python constants is
>> cmd_gen_constants_py which uses the $(CPP) with $(c_flags) to create the
>> output.
>>
>> One benefit of this is that it already creates the $(depfile) through
>> the addition of the flags provided by $(c_flags), however as yet it
>> would seem that my efforts to understand how the $(depfile) gets
>> included have failed.
>>
>> From what I can tell, the $(call if_changed...) rule is generating my
>> targets .constants.py.cmd, but the .d file is not being utilised.
>>
>> By swapping $(call if_changed, ) to $(call if_changed_dep,...) I can see
>> that my .constants.py.cmd [1] file now has (apparently) correct
>> dependency rules being generated. However they still don't take actual
>> effect. If I 'touch/modify' one of the files I have added to the
>> #includes, then my target is not rebuilt (I have added
>> include/linux/kieran.h for testing this specifically without rebuilding
>> all other objects)
>
> Hi Kieran,
>
> sorry for the late reply.
No problem, still useful!
> In case this is still relevant: For
> if_changed/if_changed_dep to work, you must list the target in the
> $(targets) list (without the $(obj) prefix) and add FORCE as a
> prerequisite of the rule.
Thankyou! - It works!
Now my generate rule is only called when it is supposed to be.
I'll hopefully get this fix sent in with the rest of my series by the
weekend.
> Michal
Thankyou for your support
--
Regards
Kieran Bingham
prev parent reply other threads:[~2016-06-21 22:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 23:02 Automatic dependency resolution on generated python file Kieran Bingham
2016-06-20 14:50 ` Michal Marek
2016-06-21 22:02 ` Kieran Bingham [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=5769B985.7080208@bingham.xyz \
--to=kieran@ksquared.org.uk \
--cc=jan.kiszka@web.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox