From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 3 Feb 2016 08:57:45 -0700 Subject: [U-Boot] [PATCH 3/5] kbuild: use $(call cmd, ) rather than $(call if_changed, ) where possible In-Reply-To: <1454501114-4346-4-git-send-email-yamada.masahiro@socionext.com> References: <1454501114-4346-1-git-send-email-yamada.masahiro@socionext.com> <1454501114-4346-4-git-send-email-yamada.masahiro@socionext.com> Message-ID: <56B22379.4040203@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.