dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: David Marchand <david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: dev-VfR2kkLFssw@public.gmane.org
Subject: [PATCH] scripts: fix newline character in sed expression
Date: Fri, 28 Nov 2014 16:42:44 +0100	[thread overview]
Message-ID: <1417189364-23969-1-git-send-email-david.marchand@6wind.com> (raw)
In-Reply-To: <CALwxeUuUJPUvKnyAxGtyebuQX24dJSZPm8q4cLi3ODEYUdwY-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

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 <bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: David Marchand <david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
---
 scripts/gen-config-h.sh |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/gen-config-h.sh b/scripts/gen-config-h.sh
index 2fac08c..d36efd6 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 */"
 
-- 
1.7.10.4

  parent reply	other threads:[~2014-11-28 15:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27 11:29 [PATCH] scripts: fix symbol overriding in configuration files David Marchand
     [not found] ` <1417087745-9004-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-11-27 18:17   ` Thomas Monjalon
2014-11-28 13:56     ` Bruce Richardson
2014-11-28 14:06       ` David Marchand
     [not found]         ` <CALwxeUvRWYPmwSR4tuH9x8QYwR1AA6qnUarMu=wM-NrK+Aq-6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-28 14:37           ` Bruce Richardson
2014-11-28 14:43           ` Bruce Richardson
2014-11-28 14:49             ` David Marchand
     [not found]               ` <CALwxeUt+_0mnh1Z15ruBr5eB5UkAQSX_ZzWaoHnNgaMEt9NUkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-28 14:59                 ` Bruce Richardson
2014-11-28 15:41                   ` David Marchand
     [not found]                     ` <CALwxeUuUJPUvKnyAxGtyebuQX24dJSZPm8q4cLi3ODEYUdwY-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-28 15:42                       ` David Marchand [this message]
     [not found]                         ` <1417189364-23969-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-11-28 15:49                           ` [PATCH] scripts: fix newline character in sed expression Bruce Richardson
2014-11-28 16:05                             ` Thomas Monjalon
2014-11-28 14:35       ` [PATCH] scripts: fix merged lines on FreeBSD in config.h Bruce Richardson
2014-11-28 11:35   ` [PATCH] scripts: fix symbol overriding in configuration files Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417189364-23969-1-git-send-email-david.marchand@6wind.com \
    --to=david.marchand-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).