diff mbox series

[06/22] Makefile: Avoid rebuilding .dtb files each time

Message ID 20210705223300.2139971-5-sjg@chromium.org
State Rejected
Delegated to: Simon Glass
Headers show
Series Various fixes and enhancements | expand

Commit Message

Simon Glass July 5, 2021, 10:32 p.m. UTC
Drop the FORCE from the rule that builds .dtb files and let the normal
dependency checking do its work. This should work correctly, at least
for .dts files that don't use /include/.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass July 17, 2021, 8:39 p.m. UTC | #1
Drop the FORCE from the rule that builds .dtb files and let the normal
dependency checking do its work. This should work correctly, at least
for .dts files that don't use /include/.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm, thanks!
Masahiro Yamada July 18, 2021, 1:34 p.m. UTC | #2
On Sun, Jul 18, 2021 at 5:41 AM Simon Glass <sjg@chromium.org> wrote:
>
> Drop the FORCE from the rule that builds .dtb files and let the normal
> dependency checking do its work. This should work correctly, at least
> for .dts files that don't use /include/.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  scripts/Makefile.lib | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Applied to u-boot-dm, thanks!


I am no longer working on U-Boot,
but this patch is obviously wrong.

if_changed_dep must always have FORCE
as the prerequisite.

If it is not working, you may miss adding
the objects to the 'targets'.

Somebody had broken the build system?


--
Best Regards
Masahiro Yamada
Simon Glass July 22, 2021, 2:13 a.m. UTC | #3
Hi Masahiro,

On Sun, 18 Jul 2021 at 07:36, Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sun, Jul 18, 2021 at 5:41 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Drop the FORCE from the rule that builds .dtb files and let the normal
> > dependency checking do its work. This should work correctly, at least
> > for .dts files that don't use /include/.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  scripts/Makefile.lib | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Applied to u-boot-dm, thanks!
>
>
> I am no longer working on U-Boot,
> but this patch is obviously wrong.
>
> if_changed_dep must always have FORCE
> as the prerequisite.

Thanks for the email.

OK I found the documentation about this in Linux so will add it to U-Boot.

>
> If it is not working, you may miss adding
> the objects to the 'targets'.
>
> Somebody had broken the build system?

I'm not sure, but let's drop this patch for now.

Regards,
Simon
diff mbox series

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 78bbebe7e93..03b348c8df8 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -328,7 +328,7 @@  cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
 		; \
 	sed "s:$(pre-tmp):$(<):" $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 
-$(obj)/%.dtb: $(src)/%.dts FORCE
+$(obj)/%.dtb: $(src)/%.dts
 	$(call if_changed_dep,dtc)
 
 pre-tmp = $(subst $(comma),_,$(dot-target).pre.tmp)