From: David Marchand Date: Fri, 28 Nov 2014 15:42:44 +0000 (+0100) Subject: scripts: fix newline in configuration with bsd sed X-Git-Tag: spdx-start~10009 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=545051540e3f4489cfd6e6584ee555bf0dd1b93c;p=dpdk.git scripts: fix newline in configuration with bsd sed Use of \n in sed expression is not portable and triggered an invalid configuration on BSD (at least). Replace with an explicit newline. Reported-by: Bruce Richardson Signed-off-by: David Marchand Acked-by: Bruce Richardson --- diff --git a/scripts/gen-config-h.sh b/scripts/gen-config-h.sh index 2fac08c5d0..d36efd6980 100755 --- a/scripts/gen-config-h.sh +++ b/scripts/gen-config-h.sh @@ -35,9 +35,11 @@ echo "#ifndef __RTE_CONFIG_H" echo "#define __RTE_CONFIG_H" grep CONFIG_ $1 | grep -v '^[ \t]*#' | -sed 's,CONFIG_\(.*\)=y.*$,#undef \1\n#define \1 1,' | +sed 's,CONFIG_\(.*\)=y.*$,#undef \1\ +#define \1 1,' | sed 's,CONFIG_\(.*\)=n.*$,#undef \1,' | -sed 's,CONFIG_\(.*\)=\(.*\)$,#undef \1\n#define \1 \2,' | +sed 's,CONFIG_\(.*\)=\(.*\)$,#undef \1\ +#define \1 \2,' | sed 's,\# CONFIG_\(.*\) is not set$,#undef \1,' echo "#endif /* __RTE_CONFIG_H */"