1
0
Fork 0
alistair23-linux/Documentation/kbuild
Dirk Gouders bb81955fd4 kbuild: if_changed: document single use per target limitation
Users of if_changed could easily feel invited to use it to divide a
recipe into parts like:

a: prereq FORCE
	$(call if_changed,do_a)
	$(call if_changed,do_b)

But this is problematic, because if_changed should not be used more
than once per target: in the above example, if_changed stores the
command-line of the given command in .a.cmd and when a is up-to-date
with respect to prereq, the file .a.cmd contains the command-line for
the last command executed, i.e. do_b.

When the recipe is then executed again, without any change of
prerequisites, the command-line check for do_a will fail, do_a will be
executed and stored in .a.cmd.  The next check, however, will still see
the old content (the file isn't re-read) and if_changed will skip
do_b, because the command-line test will not recognize a change.  On
the next execution of the recipe the roles will flip: do_a is OK but
do_b not and it will be executed.  And so on...

Signed-off-by: Dirk Gouders <dirk@gouders.net>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-21 06:50:32 +09:00
..
00-INDEX Documentation: headers_install.txt is part of kbuild 2014-08-05 16:08:11 +02:00
Kconfig.recursion-issue-01 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.recursion-issue-02 kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
Kconfig.select-break kbuild: document recursive dependency limitation / resolution 2015-10-08 15:36:16 +02:00
headers_install.txt kbuild : Fix documentation of INSTALL_HDR_PATH 2015-06-22 09:56:07 -06:00
kbuild.txt kbuild: Use HOST*FLAGS options from the command line 2018-07-18 01:18:05 +09:00
kconfig-language.txt kconfig: document Kconfig source file comments 2018-06-25 23:21:14 +09:00
kconfig-macro-language.txt Documentation: kconfig: document a new Kconfig macro language 2018-05-29 03:31:19 +09:00
kconfig.txt kconfig: update user kconfig tools doc. 2018-07-06 22:04:01 +09:00
makefiles.txt kbuild: if_changed: document single use per target limitation 2018-07-21 06:50:32 +09:00
modules.txt kbuild: Fix a typo in documentation 2014-06-10 14:14:29 +02:00