From f0570d91ce8493883daa234ffdafb5c5620a1128 Mon Sep 17 00:00:00 2001 From: Frank Rowand Date: Fri, 13 Mar 2015 12:21:46 -0700 Subject: [PATCH] dt: OF_UNITTEST make dependency broken If CONFIG_OF_UNITTEST=y then a kernel image make will always cause .version to be incremented, even if there are not source changes. This is caused by a lack of dependency tracking and checking for drivers/of/unittest-data/testcases.dtb.o. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/Makefile | 5 +++-- drivers/of/unittest-data/.gitignore | 2 ++ drivers/of/unittest-data/Makefile | 7 +++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 drivers/of/unittest-data/.gitignore create mode 100644 drivers/of/unittest-data/Makefile diff --git a/drivers/of/Makefile b/drivers/of/Makefile index 7563f36c71db..fcacb186a67b 100644 --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -6,8 +6,7 @@ obj-$(CONFIG_OF_PROMTREE) += pdt.o obj-$(CONFIG_OF_ADDRESS) += address.o obj-$(CONFIG_OF_IRQ) += irq.o obj-$(CONFIG_OF_NET) += of_net.o -obj-$(CONFIG_OF_UNITTEST) += of_unittest.o -of_unittest-objs := unittest.o unittest-data/testcases.dtb.o +obj-$(CONFIG_OF_UNITTEST) += unittest.o obj-$(CONFIG_OF_MDIO) += of_mdio.o obj-$(CONFIG_OF_PCI) += of_pci.o obj-$(CONFIG_OF_PCI_IRQ) += of_pci_irq.o @@ -16,5 +15,7 @@ obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o obj-$(CONFIG_OF_RESOLVE) += resolver.o obj-$(CONFIG_OF_OVERLAY) += overlay.o +obj-$(CONFIG_OF_UNITTEST) += unittest-data/ + CFLAGS_fdt.o = -I$(src)/../../scripts/dtc/libfdt CFLAGS_fdt_address.o = -I$(src)/../../scripts/dtc/libfdt diff --git a/drivers/of/unittest-data/.gitignore b/drivers/of/unittest-data/.gitignore new file mode 100644 index 000000000000..4b3cf8b16de2 --- /dev/null +++ b/drivers/of/unittest-data/.gitignore @@ -0,0 +1,2 @@ +testcases.dtb +testcases.dtb.S diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile new file mode 100644 index 000000000000..1ac5cc01d627 --- /dev/null +++ b/drivers/of/unittest-data/Makefile @@ -0,0 +1,7 @@ +obj-y += testcases.dtb.o + +targets += testcases.dtb testcases.dtb.S + +.SECONDARY: \ + $(obj)/testcases.dtb.S \ + $(obj)/testcases.dtb -- 2.20.1