build(libfdt): introduce include guards
In some build configurations the `libfdt.mk` file is included multiple
times. Due to the fact that rules cannot (or rather, should not) be
defined multiple times, the `MAKE_LIB` function (which this makefile
calls) cannot be called twice with the same inputs. Doing so leads to
warnings about overridden rules, e.g.:
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt/fdt.o'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt/fdt.o'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt/fdt_addresses.o'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt/fdt_addresses.o'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt/fdt_empty_tree.o'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt/fdt_empty_tree.o'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt/fdt_ro.o'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt/fdt_ro.o'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt/fdt_rw.o'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt/fdt_rw.o'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt/fdt_strerror.o'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt/fdt_strerror.o'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt/fdt_sw.o'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt/fdt_sw.o'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target libfdt/fdt_wip.o'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target libfdt/fdt_wip.o'
lib/libfdt/libfdt.mk:19: warning: overriding recipe for target lib/libfdt.a'
lib/libfdt/libfdt.mk:19: warning: ignoring old recipe for target lib/libfdt.a'
This change introduces an include guard to the file to prevent it from
executing twice. This avoids redefining the rules defined by `MAKE_LIB`.
Change-Id: I07e0648b07dbd907eaa6dd6fbd0788203b19fddb
Signed-off-by: Chris Kay <chris.kay@arm.com>
1 file changed