From 99b31ce046c45ae1ed1aff1e8bb873f517bf2aa5 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Fri, 15 Jan 2021 13:49:53 -0800 Subject: [PATCH] Revert "ANDROID: kbuild: simplify cmd_mod" This reverts commit 631b20dd6c9c ("ANDROID: kbuild: simplify cmd_mod") since this causes regression in how Kbuild handles dependencies. Bug: 175420575 Change-Id: I162eedf19357287c5ab9840ed84081d071aa320b Signed-off-by: Elliot Berman --- scripts/Makefile.build | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 17d04ea62cd1..3f6bf0ea7c0e 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -272,11 +272,10 @@ $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE $(call if_changed_rule,cc_o_c) $(call cmd,force_checksrc) -cmd_mod = $(file >$@,\ - $(if $($*-objs)$($*-y)$($*-m), \ - $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), \ - $(@:.mod=.o))) \ - $(undefined_syms) echo >> $@ +cmd_mod = { \ + echo $(if $($*-objs)$($*-y)$($*-m), $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), $(@:.mod=.o)); \ + $(undefined_syms) echo; \ + } > $@ $(obj)/%.mod: $(obj)/%.o FORCE $(call if_changed,mod)