Makefile: fix newline escaping for CONFIG_DEFAULT_ENV_FILE
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Wed, 28 Aug 2019 11:00:46 +0000 (11:00 +0000)
committerTom Rini <trini@konsulko.com>
Sat, 31 Aug 2019 13:27:24 +0000 (09:27 -0400)
I wanted this to be compatible with mkenvimage, including the ability
to embed newlines in variables by escaping them. But I failed to check
that it works more than once.

Fixes: f3d8f7dd73a (Allow providing default environment from file)
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Makefile

index 0570d02e5d0247e0ffb1dd349b9e809b6acc3ba9..c02accfc265368cc75f334eaad956c0606d61734 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1700,7 +1700,7 @@ define filechk_defaultenv.h
        (grep -v '^#' | \
         grep -v '^$$' | \
         tr '\n' '\0' | \
-        sed -e 's/\\\x0/\n/' | \
+        sed -e 's/\\\x0/\n/g' | \
         xxd -i ; echo ", 0x00" ; )
 endef