devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: unittest: refactor Makefile
@ 2018-01-05 11:55 Masahiro Yamada
       [not found] ` <1515153330-11810-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2018-01-05 11:55 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring
  Cc: Masahiro Yamada, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Thomas Gleixner, Greg Kroah-Hartman, Rob Herring, Frank Rowand

Some cleanups:
 - use obj-$(CONFIG_OF_OVERLAY) instead of ifdef ... endif
 - compute targets from obj-y

Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
---

 drivers/of/unittest-data/Makefile | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile
index 32389ac..df69797 100644
--- a/drivers/of/unittest-data/Makefile
+++ b/drivers/of/unittest-data/Makefile
@@ -2,19 +2,12 @@
 DTC_FLAGS_testcases := -Wno-interrupts_property
 obj-y += testcases.dtb.o
 
-targets += testcases.dtb testcases.dtb.S
+obj-$(CONFIG_OF_OVERLAY) += overlay.dtb.o \
+			    overlay_bad_phandle.dtb.o \
+			    overlay_bad_symbol.dtb.o \
+			    overlay_base.dtb.o
 
-ifdef CONFIG_OF_OVERLAY
-
-obj-y += overlay.dtb.o
-obj-y += overlay_bad_phandle.dtb.o
-obj-y += overlay_bad_symbol.dtb.o
-obj-y += overlay_base.dtb.o
-
-targets += overlay.dtb overlay.dtb.S
-targets += overlay_bad_phandle.dtb overlay_bad_phandle.dtb.S
-targets += overlay_bad_symbol.dtb overlay_bad_symbol.dtb.S
-targets += overlay_base.dtb overlay_base.dtb.S
+targets += $(foreach suffix, dtb dtb.S, $(patsubst %.dtb.o,%.$(suffix),$(obj-y)))
 
 # enable creation of __symbols__ node
 DTC_FLAGS_overlay := -@
@@ -22,8 +15,6 @@ DTC_FLAGS_overlay_bad_phandle := -@
 DTC_FLAGS_overlay_bad_symbol := -@
 DTC_FLAGS_overlay_base := -@
 
-endif
-
 .PRECIOUS: \
 	$(obj)/%.dtb.S \
 	$(obj)/%.dtb
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] of: unittest: refactor Makefile
       [not found] ` <1515153330-11810-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
@ 2018-01-09  4:09   ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2018-01-09  4:09 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner,
	Greg Kroah-Hartman, Frank Rowand

On Fri, Jan 05, 2018 at 08:55:30PM +0900, Masahiro Yamada wrote:
> Some cleanups:
>  - use obj-$(CONFIG_OF_OVERLAY) instead of ifdef ... endif
>  - compute targets from obj-y
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> ---
> 
>  drivers/of/unittest-data/Makefile | 19 +++++--------------
>  1 file changed, 5 insertions(+), 14 deletions(-)

Applied, thanks.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-09  4:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 11:55 [PATCH] of: unittest: refactor Makefile Masahiro Yamada
     [not found] ` <1515153330-11810-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2018-01-09  4:09   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).