]> git.sur5r.net Git - u-boot/commitdiff
Avoid non-portable sed construct
authorMark Kettenis <kettenis@openbsd.org>
Sun, 8 Jan 2017 18:11:27 +0000 (19:11 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 14 Jan 2017 21:47:15 +0000 (16:47 -0500)
Using \n in a substitution is a GNU extension.  Use the 'G" command instead
to insert the desired line.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
scripts/Makefile.lib

index 81ac7eb12c2f6ec650d955bea82bc37b5b84d45c..23be32436922436ba5af0d454f96d7da20bd782e 100644 (file)
@@ -311,7 +311,7 @@ quiet_cmd_dtc = DTC     $@
 # Bring in any U-Boot-specific include after the '/dts-v1/;' header
 cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
        cat $< $(if $(u_boot_dtsi),\
-               | sed 's%^/ {$$%\#include \"$(u_boot_dtsi)\"\n&%')  | \
+               | sed '/^\/ {$$/{x;s%$$%\#include \"$(u_boot_dtsi)\"%;G;}') | \
                $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \
        $(DTC) -O dtb -o $@ -b 0 \
                -i $(dir $<) $(DTC_FLAGS) \