diff mbox

[RESEND] scripts/crosstool-NG.sh.in: patch regex to work with BSD grep

Message ID 1413910849-16942-1-git-send-email-andreas@biessmann.de
State Not Applicable, archived
Headers show

Commit Message

Andreas Bießmann Oct. 21, 2014, 5 p.m. UTC
From: "Jason T. Masker" <jason@masker.net>

Updated patch to also fix change another occurrence, found in
kconfig/kconfig.mk.

Signed-off-by: Jason T. Masker <jason@masker.net>
Tested-by: Andreas Bießmann <andreas@biessmann.de>
---

This is just a resent cause the original message could not be applied
properly. I also add my Tested-by, tested on OS X 10.10.

 kconfig/kconfig.mk         | 2 +-
 scripts/crosstool-NG.sh.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk
index cb9f91c..06e022c 100644
--- a/kconfig/kconfig.mk
+++ b/kconfig/kconfig.mk
@@ -38,7 +38,7 @@  defconfig:
 # Always be silent, the stdout an be >.config
 extractconfig:
 	@$(awk) 'BEGIN { dump=0; }                                                  \
-	         dump==1 && $$0~/^\[.....\][[:space:]]+(# |)CT_/ {                  \
+	         dump==1 && $$0~/^\[.....\][[:space:]]+(# )?CT_/ {                  \
 	             $$1="";                                                        \
 	             gsub("^[[:space:]]","");                                       \
 	             print;                                                         \
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index cd65d5b..53ac552 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -125,7 +125,7 @@  CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}"
 # We really need to extract from ,config and not .config.2, as we
 # do want the kconfig's values, not our mangled config with arrays.
 CT_DoStep DEBUG "Dumping user-supplied crosstool-NG configuration"
-CT_DoExecLog DEBUG ${grep} -E '^(# |)CT_' .config
+CT_DoExecLog DEBUG ${grep} -E '^(# )?CT_' .config
 CT_EndStep
 
 CT_DoLog DEBUG "Unsetting and unexporting MAKEFLAGS"