Skip to contentSkip to conversation

env: Fix avoid using a leftover text-environment file

PATCH In review Marek Vasut 2 participants 2 messages Apr 3, 2022 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 env: Fix avoid using a leftover text-environment file

Clean build ends up generating the following error, add -f switch to rm to mitigate it:
"
rm: cannot remove 'include/generated/env.in': No such file or directory "

Fixes f432eb6d8a9 ("env: Avoid using a leftover text-environment file")
Cc Sean Anderson <[email protected]>
Cc Simon Glass <[email protected]>
Cc Tom Rini <[email protected]>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 4672147318e..868445bf33c 100644
@@ -1846,7 +1846,7 @@ quiet_cmd_gen_envp = ENVP    $@
 			-I$(srctree)/arch/$(ARCH)/include \
 			$< -o $@; \
 	else \
-		rm $@; \
+		rm -f $@; \
 		touch $@ ; \
 	fi
 include/generated/env.in: include/generated/env.txt FORCE
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Marek Vasut

Clean build ends up generating the following error, add -f switch to rm to mitigate it:
"
rm: cannot remove 'include/generated/env.in': No such file or directory "

Fixes f432eb6d8a9 ("env: Avoid using a leftover text-environment file")
Cc Sean Anderson <[email protected]>
Cc Simon Glass <[email protected]>
Cc Tom Rini <[email protected]>
---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index 4672147318e..868445bf33c 100644

Makefile quiet_cmd_gen_envp = ENVP $@ · line 1852

Quoted 8 lines
Makefile +1 -1
@@ -1846,7 +1846,7 @@ quiet_cmd_gen_envp = ENVP    $@
  			-I$(srctree)/arch/$(ARCH)/include \
  			$< -o $@; \
  	else \
-		rm $@; \
+		rm -f $@; \
  		touch $@ ; \
  	fi
  include/generated/env.in: include/generated/env.txt FORCE

Duplicate of https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Either one LGTM

Tom, this should probably go in the release.

--Sean