From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/5] kbuild: use $(call cmd, ) rather than $(call if_changed, ) where possible
Date: Wed, 3 Feb 2016 08:57:45 -0700 [thread overview]
Message-ID: <56B22379.4040203@wwwdotorg.org> (raw)
In-Reply-To: <1454501114-4346-4-git-send-email-yamada.masahiro@socionext.com>
On 02/03/2016 05:05 AM, Masahiro Yamada wrote:
> These build commands are constant (mostly, just concatenating images,
> or just copying). No need to use $(call if_changed,...) for them.
I disagree, since I believe this change means that if someone /does/
change the command in the future (e.g. to replace it with more complex
processing, or add additional dependencies), then the Makefile will/may
not automatically rebuild those targets, which is the entire point of
using if_changed, and is a huge benefit of using Kbuild.
In my opinion, every rule should use if_changed, and contain a single
command at the Makefile level; i.e. I noticed the following somewhere,
which also doesn't rebuild the target in all cases if the commands are
changed, which is bad:
target: sources FORCE
$(call if_changed,xxx)
something_else
yet_more_cmds
If "something_else" or "yet_more_cmds" are edited, the target won't get
rebuilt unless some other modification causes it to be.
next prev parent reply other threads:[~2016-02-03 15:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 12:05 [U-Boot] [PATCH 0/5] kbuild fixes Masahiro Yamada
2016-02-03 12:05 ` [U-Boot] [PATCH 1/5] kbuild: remove unneeded ifdef conditionals around build rules Masahiro Yamada
2016-02-03 12:05 ` [U-Boot] [PATCH 2/5] kbuild: sunxi: fix build rule of sunxi-spl.bin Masahiro Yamada
2016-02-03 12:05 ` [U-Boot] [PATCH 3/5] kbuild: use $(call cmd, ) rather than $(call if_changed, ) where possible Masahiro Yamada
2016-02-03 12:18 ` Albert ARIBAUD
2016-02-03 12:20 ` Albert ARIBAUD
2016-02-03 15:57 ` Stephen Warren [this message]
2016-02-05 5:33 ` Masahiro Yamada
2016-02-05 8:11 ` Ian Campbell
2016-02-03 12:05 ` [U-Boot] [PATCH 4/5] kbuild: add missing FORCE where $(call if_changed, ) is used Masahiro Yamada
2016-02-03 12:05 ` [U-Boot] [PATCH 5/5] kbuild: fix build rule of u-boot-spl.dtb Masahiro Yamada
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=56B22379.4040203@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.de \
/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