Discussion:
[PATCH 0/3] sed and grep changes for BSD-like systems (branch yem/configure)
Yann E. MORIN
2014-08-26 23:27:51 UTC
Permalink
Hello All!

This little series is a response to Fabian's initial patch:
http://patchwork.ozlabs.org/patch/376843/

and aims at making it even more easy to build on BSD-like systems, by
consistently using ${grep} and ${sed} instead of directly calling to sed
or grep.

Also, it adds a ./configure --with-grep flag, for those with a GNU grep
in a non-standard location.

Regards,
Yann E. MORIN.


The following changes since commit 2a275f6cc89fc80a573a35de8300483e45fa5b73:

debug/gdb: add GDB_HAS_PYTHON (2014-08-26 23:46:55 +0200)

are available in the git repository at:

git://ymorin.is-a-geek.org/crosstool-ng yem/configure

for you to fetch changes up to 70a665929fe0568d767f79b8f98b5619493c90c9:

scripts/crosstool-NG: use ${grep} instead of 'grep' (2014-08-27 01:01:28 +0200)

----------------------------------------------------------------
Yann E. MORIN (3):
scripts/functions: use ${sed} instead of 'sed'
configure: add option to specify grep
scripts/crosstool-NG: use ${grep} instead of 'grep'

configure.ac | 5 +++++
scripts/crosstool-NG.sh.in | 6 +++---
scripts/functions | 20 +++++++++++---------
3 files changed, 19 insertions(+), 12 deletions(-)
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq
Yann E. MORIN
2014-08-26 23:27:54 UTC
Permalink
Allows users for which GNU grep is not the default grep (e.g. BSD
folks), or is in a weird location.

Reported-by: Fabian Freyer <***@physik.tu-berlin.de>
Signed-off-by: "Yann E. MORIN" <***@free.fr>
Cc: Fabian Freyer <***@physik.tu-berlin.de>
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/configure.ac b/configure.ac
index f8c67be..9899a3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,6 +94,11 @@ AC_ARG_WITH([install],
[Specify the full PATH to a BSD-compatible install]),
[INSTALL=$withval])
AC_PROG_INSTALL
+AC_CACHE_VAL([ac_cv_path_GREP],
+ [AC_ARG_WITH([grep],
+ AS_HELP_STRING([--with-grep=PATH],
+ [Specify the full PATH to GNU grep]),
+ [ac_cv_path_GREP=$withval])])
AC_PROG_GREP
AC_PROG_EGREP
AS_IF(
--
1.9.1


--
For unsubscribe information see http://sourceware.org/lists.html#faq
Fabian Freyer
2014-08-26 23:59:41 UTC
Permalink
Post by Yann E. MORIN
Allows users for which GNU grep is not the default grep (e.g. BSD
folks), or is in a weird location.
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index f8c67be..9899a3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,6 +94,11 @@ AC_ARG_WITH([install],
[Specify the full PATH to a BSD-compatible install]),
[INSTALL=$withval])
AC_PROG_INSTALL
+AC_CACHE_VAL([ac_cv_path_GREP],
+ [AC_ARG_WITH([grep],
+ AS_HELP_STRING([--with-grep=PATH],
+ [Specify the full PATH to GNU grep]),
+ [ac_cv_path_GREP=$withval])])
AC_PROG_GREP
AC_PROG_EGREP
AS_IF(
Fabian Freyer
2014-08-27 00:03:53 UTC
Permalink
Messed up that SoB-order, sorry!
Post by Yann E. MORIN
Allows users for which GNU grep is not the default grep (e.g. BSD
folks), or is in a weird location.
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index f8c67be..9899a3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,6 +94,11 @@ AC_ARG_WITH([install],
[Specify the full PATH to a BSD-compatible install]),
[INSTALL=$withval])
AC_PROG_INSTALL
+AC_CACHE_VAL([ac_cv_path_GREP],
+ [AC_ARG_WITH([grep],
+ AS_HELP_STRING([--with-grep=PATH],
+ [Specify the full PATH to GNU grep]),
+ [ac_cv_path_GREP=$withval])])
AC_PROG_GREP
AC_PROG_EGREP
AS_IF(
Yann E. MORIN
2014-08-26 23:27:53 UTC
Permalink
Helps build on BSD-like systems.

Reported-by: Fabian Freyer <***@physik.tu-berlin.de>
Signed-off-by: "Yann E. MORIN" <***@free.fr>
Cc: Fabian Freyer <***@physik.tu-berlin.de>
---
scripts/functions | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/scripts/functions b/scripts/functions
index eae3b95..cce629c 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -317,7 +317,7 @@ CT_SanitiseVarDir() {
for var in "$@"; do
eval "old_dir=\"\${${var}}\""
new_dir="$( printf "${old_dir}" \
- |sed -r -e 's:/+:/:g;' \
+ |${sed} -r -e 's:/+:/:g;' \
)"
eval "${var}=\"${new_dir}\""
CT_DoLog DEBUG "Sanitised '${var}': '${old_dir}' -> '${new_dir}'"
@@ -381,7 +381,7 @@ CT_Which() {
# to the highest entire second
# Usage: CT_DoDate <fmt>
CT_DoDate() {
- date "$1" |sed -r -e 's/%?N$/000000000/;'
+ date "$1" |${sed} -r -e 's/%?N$/000000000/;'
}

CT_STEP_COUNT=1
@@ -403,7 +403,9 @@ CT_DoStep() {
# Usage: CT_EndStep
CT_EndStep() {
local stop=$(CT_DoDate +%s%N)
- local duration=$(printf "%032d" $((stop-${CT_STEP_START[${CT_STEP_COUNT}]})) |sed -r -e 's/([[:digit:]]{2})[[:digit:]]{7}$/\.\1/; s/^0+//; s/^\./0\./;')
+ local duration=$(printf "%032d" $((stop-${CT_STEP_START[${CT_STEP_COUNT}]})) \
+ |${sed} -r -e 's/([[:digit:]]{2})[[:digit:]]{7}$/\.\1/; s/^0+//; s/^\./0\./;'
+ )
local elapsed=$(printf "%02d:%02d" $((SECONDS/60)) $((SECONDS%60)))
local level="${CT_STEP_LEVEL[${CT_STEP_COUNT}]}"
local message="${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}"
@@ -1226,7 +1228,7 @@ CT_DoBuildTargetTuple() {
# Sanity checks
__sed_alias=""
if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
- __sed_alias=$(echo "${CT_TARGET}" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
+ __sed_alias=$(echo "${CT_TARGET}" |${sed} -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
fi
case ":${CT_TARGET_VENDOR}:${CT_TARGET_ALIAS}:${__sed_alias}:" in
:*" "*:*:*:) CT_Abort "Don't use spaces in the vendor string, it breaks things.";;
@@ -1279,7 +1281,7 @@ CT_DoTarballIfExists() {
CT_DoLog DEBUG " Saving '${dir}'"
{ tar c -C "${dir}" -v -f - "${extra_tar_opts[@]}" . \
|"${compress[@]}" >"${tarball}.tar${tar_ext}" ;
- } 2>&1 |sed -r -e 's/^/ /;' |CT_DoLog STATE
+ } 2>&1 |${sed} -r -e 's/^/ /;' |CT_DoLog STATE
else
CT_DoLog STATE " Not saving '${dir}': does not exist"
fi
@@ -1306,7 +1308,7 @@ CT_DoExtractTarballIfExists() {
CT_DoExecLog DEBUG mkdir -p "${dir}"
{ "${uncompress[@]}" "${tarball}.tar${tar_ext}" \
|tar x -C "${dir}" -v -f - "${extra_tar_opts[@]}" ;
- } 2>&1 |sed -r -e 's/^/ /;' |CT_DoLog STATE
+ } 2>&1 |${sed} -r -e 's/^/ /;' |CT_DoLog STATE
else
CT_DoLog STATE " Not restoring '${dir}': does not exist"
fi
@@ -1335,7 +1337,7 @@ CT_DoSaveState() {
$0~/^[^ ]+ \(\)/ { _p = 0; }
_p == 1
$0 == "}" { _p = 1; }
- ' |sed -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d;
+ ' |${sed} -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d;
/^(UID|EUID)=/d;
/^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh"
--
1.9.1


--
For unsubscribe information see http://sourceware.org/lists.html#faq
Fabian Freyer
2014-08-26 23:58:47 UTC
Permalink
Post by Yann E. MORIN
Helps build on BSD-like systems.
---
scripts/functions | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/scripts/functions b/scripts/functions
index eae3b95..cce629c 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -317,7 +317,7 @@ CT_SanitiseVarDir() {
eval "old_dir=\"\${${var}}\""
new_dir="$( printf "${old_dir}" \
- |sed -r -e 's:/+:/:g;' \
+ |${sed} -r -e 's:/+:/:g;' \
)"
eval "${var}=\"${new_dir}\""
CT_DoLog DEBUG "Sanitised '${var}': '${old_dir}' -> '${new_dir}'"
@@ -381,7 +381,7 @@ CT_Which() {
# to the highest entire second
# Usage: CT_DoDate <fmt>
CT_DoDate() {
- date "$1" |sed -r -e 's/%?N$/000000000/;'
+ date "$1" |${sed} -r -e 's/%?N$/000000000/;'
}
CT_STEP_COUNT=1
@@ -403,7 +403,9 @@ CT_DoStep() {
# Usage: CT_EndStep
CT_EndStep() {
local stop=$(CT_DoDate +%s%N)
- local duration=$(printf "%032d" $((stop-${CT_STEP_START[${CT_STEP_COUNT}]})) |sed -r -e 's/([[:digit:]]{2})[[:digit:]]{7}$/\.\1/; s/^0+//; s/^\./0\./;')
+ local duration=$(printf "%032d" $((stop-${CT_STEP_START[${CT_STEP_COUNT}]})) \
+ |${sed} -r -e 's/([[:digit:]]{2})[[:digit:]]{7}$/\.\1/; s/^0+//; s/^\./0\./;'
+ )
local elapsed=$(printf "%02d:%02d" $((SECONDS/60)) $((SECONDS%60)))
local level="${CT_STEP_LEVEL[${CT_STEP_COUNT}]}"
local message="${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}"
@@ -1226,7 +1228,7 @@ CT_DoBuildTargetTuple() {
# Sanity checks
__sed_alias=""
if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
- __sed_alias=$(echo "${CT_TARGET}" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
+ __sed_alias=$(echo "${CT_TARGET}" |${sed} -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
fi
case ":${CT_TARGET_VENDOR}:${CT_TARGET_ALIAS}:${__sed_alias}:" in
:*" "*:*:*:) CT_Abort "Don't use spaces in the vendor string, it breaks things.";;
@@ -1279,7 +1281,7 @@ CT_DoTarballIfExists() {
CT_DoLog DEBUG " Saving '${dir}'"
- } 2>&1 |sed -r -e 's/^/ /;' |CT_DoLog STATE
+ } 2>&1 |${sed} -r -e 's/^/ /;' |CT_DoLog STATE
else
CT_DoLog STATE " Not saving '${dir}': does not exist"
fi
@@ -1306,7 +1308,7 @@ CT_DoExtractTarballIfExists() {
CT_DoExecLog DEBUG mkdir -p "${dir}"
- } 2>&1 |sed -r -e 's/^/ /;' |CT_DoLog STATE
+ } 2>&1 |${sed} -r -e 's/^/ /;' |CT_DoLog STATE
else
CT_DoLog STATE " Not restoring '${dir}': does not exist"
fi
@@ -1335,7 +1337,7 @@ CT_DoSaveState() {
$0~/^[^ ]+ \(\)/ { _p = 0; }
_p == 1
$0 == "}" { _p = 1; }
- ' |sed -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d;
+ ' |${sed} -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d;
/^(UID|EUID)=/d;
/^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh"
Yann E. MORIN
2014-08-26 23:27:55 UTC
Permalink
Helps building on BSD-like systems.

Reported-by: Fabian Freyer <***@physik.tu-berlin.de>
Signed-off-by: "Yann E. MORIN" <***@free.fr>
Cc: Fabian Freyer <***@physik.tu-berlin.de>
---
scripts/crosstool-NG.sh.in | 6 +++---
scripts/functions | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 3699500..3359bac 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"
@@ -570,9 +570,9 @@ if [ -z "${CT_RESTART}" ]; then
CT_DoLog EXTRA " build = ${CT_REAL_BUILD}"
CT_DoLog EXTRA " host = ${CT_REAL_HOST}"
CT_DoLog EXTRA " target = ${CT_TARGET}"
- set |grep -E '^CT_.+=' |sort |CT_DoLog DEBUG
+ set |${grep} -E '^CT_.+=' |sort |CT_DoLog DEBUG
CT_DoLog DEBUG "Other environment:"
- printenv |grep -v -E '^CT_.+=' |CT_DoLog DEBUG
+ printenv |${grep} -v -E '^CT_.+=' |CT_DoLog DEBUG
CT_EndStep
fi

diff --git a/scripts/functions b/scripts/functions
index cce629c..a309f2d 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -995,9 +995,9 @@ CT_ExtractGit() {
if [ -z "${ref}" ]; then
ref_type=head
ref=$(git rev-list -n1 HEAD)
- elif git tag |grep -E "^${ref}$" >/dev/null 2>&1; then
+ elif git tag |${grep} -E "^${ref}$" >/dev/null 2>&1; then
ref_type=tag
- elif git branch -a --no-color |grep -E "^. ${ref}$" >/dev/null 2>&1; then
+ elif git branch -a --no-color |${grep} -E "^. ${ref}$" >/dev/null 2>&1; then
ref_type=branch
elif date -d "${ref}" >/dev/null 2>&1; then
ref_type=date
--
1.9.1


--
For unsubscribe information see http://sourceware.org/lists.html#faq
Fabian Freyer
2014-08-27 00:04:15 UTC
Permalink
Post by Yann E. MORIN
Helps building on BSD-like systems.
---
scripts/crosstool-NG.sh.in | 6 +++---
scripts/functions | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 3699500..3359bac 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"
@@ -570,9 +570,9 @@ if [ -z "${CT_RESTART}" ]; then
CT_DoLog EXTRA " build = ${CT_REAL_BUILD}"
CT_DoLog EXTRA " host = ${CT_REAL_HOST}"
CT_DoLog EXTRA " target = ${CT_TARGET}"
- set |grep -E '^CT_.+=' |sort |CT_DoLog DEBUG
+ set |${grep} -E '^CT_.+=' |sort |CT_DoLog DEBUG
CT_DoLog DEBUG "Other environment:"
- printenv |grep -v -E '^CT_.+=' |CT_DoLog DEBUG
+ printenv |${grep} -v -E '^CT_.+=' |CT_DoLog DEBUG
CT_EndStep
fi
diff --git a/scripts/functions b/scripts/functions
index cce629c..a309f2d 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -995,9 +995,9 @@ CT_ExtractGit() {
if [ -z "${ref}" ]; then
ref_type=head
ref=$(git rev-list -n1 HEAD)
- elif git tag |grep -E "^${ref}$" >/dev/null 2>&1; then
+ elif git tag |${grep} -E "^${ref}$" >/dev/null 2>&1; then
ref_type=tag
- elif git branch -a --no-color |grep -E "^. ${ref}$" >/dev/null 2>&1; then
+ elif git branch -a --no-color |${grep} -E "^. ${ref}$" >/dev/null 2>&1; then
ref_type=branch
elif date -d "${ref}" >/dev/null 2>&1; then
ref_type=date
Fabian Freyer
2014-08-27 00:04:56 UTC
Permalink
Post by Yann E. MORIN
Helps building on BSD-like systems.
---
scripts/crosstool-NG.sh.in | 6 +++---
scripts/functions | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 3699500..3359bac 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"
@@ -570,9 +570,9 @@ if [ -z "${CT_RESTART}" ]; then
CT_DoLog EXTRA " build = ${CT_REAL_BUILD}"
CT_DoLog EXTRA " host = ${CT_REAL_HOST}"
CT_DoLog EXTRA " target = ${CT_TARGET}"
- set |grep -E '^CT_.+=' |sort |CT_DoLog DEBUG
+ set |${grep} -E '^CT_.+=' |sort |CT_DoLog DEBUG
CT_DoLog DEBUG "Other environment:"
- printenv |grep -v -E '^CT_.+=' |CT_DoLog DEBUG
+ printenv |${grep} -v -E '^CT_.+=' |CT_DoLog DEBUG
CT_EndStep
fi
diff --git a/scripts/functions b/scripts/functions
index cce629c..a309f2d 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -995,9 +995,9 @@ CT_ExtractGit() {
if [ -z "${ref}" ]; then
ref_type=head
ref=$(git rev-list -n1 HEAD)
- elif git tag |grep -E "^${ref}$" >/dev/null 2>&1; then
+ elif git tag |${grep} -E "^${ref}$" >/dev/null 2>&1; then
ref_type=tag
- elif git branch -a --no-color |grep -E "^. ${ref}$" >/dev/null 2>&1; then
+ elif git branch -a --no-color |${grep} -E "^. ${ref}$" >/dev/null 2>&1; then
ref_type=branch
elif date -d "${ref}" >/dev/null 2>&1; then
ref_type=date
Yann E. MORIN
2014-08-26 23:32:05 UTC
Permalink
Fabian, All,
Post by Yann E. MORIN
http://patchwork.ozlabs.org/patch/376843/
and aims at making it even more easy to build on BSD-like systems, by
consistently using ${grep} and ${sed} instead of directly calling to sed
or grep.
Also, it adds a ./configure --with-grep flag, for those with a GNU grep
in a non-standard location.
Fabian, since this is essentially based on your initial patch, but you
forgot to add your SoB line, I could not reproduce it in my patches.

Would you care to reply (to each patch) with your SoB line, so I can add
it when I finally commit those patches to the tree, please?

Also, I forgot to set you as author, sorry. I'll switch authorship back
to you before applying. Sorry...

Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq
Fabian Freyer
2014-08-26 23:49:00 UTC
Permalink
Yann, All,
Post by Yann E. MORIN
Fabian, All,
Post by Yann E. MORIN
http://patchwork.ozlabs.org/patch/376843/
and aims at making it even more easy to build on BSD-like systems, by
consistently using ${grep} and ${sed} instead of directly calling to sed
or grep.
Also, it adds a ./configure --with-grep flag, for those with a GNU grep
in a non-standard location.
Fabian, since this is essentially based on your initial patch, but you
forgot to add your SoB line, I could not reproduce it in my patches.
Would you care to reply (to each patch) with your SoB line, so I can add
it when I finally commit those patches to the tree, please?
I'm sorry, I'm not sure exactly what you want me to do. Should I add the SoB-Line to the patches and inline the patches without citing them (>) or just top-post it?
Post by Yann E. MORIN
Also, I forgot to set you as author, sorry. I'll switch authorship back
to you before applying. Sorry...
No problem, thanks!
Post by Yann E. MORIN
Regards,
Yann E. MORIN.
Regards,
Fabian Freyer
Yann E. MORIN
2014-08-26 23:52:59 UTC
Permalink
Fabian, All,
Post by Fabian Freyer
Post by Yann E. MORIN
Fabian, All,
Post by Yann E. MORIN
http://patchwork.ozlabs.org/patch/376843/
and aims at making it even more easy to build on BSD-like systems, by
consistently using ${grep} and ${sed} instead of directly calling to sed
or grep.
Also, it adds a ./configure --with-grep flag, for those with a GNU grep
in a non-standard location.
Fabian, since this is essentially based on your initial patch, but you
forgot to add your SoB line, I could not reproduce it in my patches.
Would you care to reply (to each patch) with your SoB line, so I can add
it when I finally commit those patches to the tree, please?
I'm sorry, I'm not sure exactly what you want me to do. Should I add
the SoB-Line to the patches and inline the patches without citing them
(>) or just top-post it?
Just reply to the patch (keep them as is), and insert your SoB-line
above mine, which would look like:

[--commit message--]
Signed-off-by: YOU
[--patch is below--]

(Above, because you came first at authoring the patches.)

Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq
Fabian Freyer
2014-08-27 02:03:03 UTC
Permalink
Yann, All,
Post by Yann E. MORIN
Hello All!
http://patchwork.ozlabs.org/patch/376843/
and aims at making it even more easy to build on BSD-like systems, by
consistently using ${grep} and ${sed} instead of directly calling to sed
or grep.
Also, it adds a ./configure --with-grep flag, for those with a GNU grep
in a non-standard location.
Regards,
Yann E. MORIN.
debug/gdb: add GDB_HAS_PYTHON (2014-08-26 23:46:55 +0200)
git://ymorin.is-a-geek.org/crosstool-ng yem/configure
scripts/crosstool-NG: use ${grep} instead of 'grep' (2014-08-27 01:01:28 +0200)
----------------------------------------------------------------
scripts/functions: use ${sed} instead of 'sed'
configure: add option to specify grep
scripts/crosstool-NG: use ${grep} instead of 'grep'
configure.ac | 5 +++++
scripts/crosstool-NG.sh.in | 6 +++---
scripts/functions | 20 +++++++++++---------
3 files changed, 19 insertions(+), 12 deletions(-)
I have tested on OS X and FreeBSD and can confirm this works.

Regards,
Fabian Freyer
Fabian Freyer
2014-08-27 02:06:14 UTC
Permalink
Hi All,

This patch adds documentation for the --with-grep option.

Regards,
Fabian Freyer

From ee0df4acaf860d6520209bae6644a22acbab98d0 Mon Sep 17 00:00:00 2001
From: Fabian Freyer <***@physik.tu-berlin.de>
Signed-off-by: "Fabian Freyer" <***@physik.tu-berlin.de>
Date: Wed, 27 Aug 2014 04:01:26 +0200
Subject: [PATCH] Added documentation for --with-grep

---
docs/C - Misc. tutorials.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/docs/C - Misc. tutorials.txt b/docs/C - Misc. tutorials.txt
index d3c9506..0a827d2 100644
--- a/docs/C - Misc. tutorials.txt
+++ b/docs/C - Misc. tutorials.txt
@@ -91,6 +91,7 @@ toolchain on MacOS as host.
--with-objcopy=/opt/local/bin/gobjcopy \
--with-objdump=/opt/local/bin/gobjdump \
--with-readelf=/opt/local/bin/greadelf \
+ --with-grep=/opt/local/bin/ggrep \
[...other configure parameters as you like...]

6) proceed as described in standard documentation
--
1.8.5.2 (Apple Git-48)
Bryan Hundven
2014-08-27 02:16:31 UTC
Permalink
Fabian, list,

On Tue, Aug 26, 2014 at 7:06 PM, Fabian Freyer
Post by Fabian Freyer
Hi All,
This patch adds documentation for the --with-grep option.
Regards,
Fabian Freyer
From ee0df4acaf860d6520209bae6644a22acbab98d0 Mon Sep 17 00:00:00 2001
Date: Wed, 27 Aug 2014 04:01:26 +0200
Subject: [PATCH] Added documentation for --with-grep
Don't forget the SoB.

I use vim, and so I found a plugin called snipmate.
I'll be it, my version is a bit older, but it has the addition
snippets for adding your signed-off-by, and others:

https://github.com/bhundven/snipmate.vim/commits/master

Cheers,

-Bryan
Post by Fabian Freyer
---
docs/C - Misc. tutorials.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/C - Misc. tutorials.txt b/docs/C - Misc. tutorials.txt
index d3c9506..0a827d2 100644
--- a/docs/C - Misc. tutorials.txt
+++ b/docs/C - Misc. tutorials.txt
@@ -91,6 +91,7 @@ toolchain on MacOS as host.
--with-objcopy=/opt/local/bin/gobjcopy \
--with-objdump=/opt/local/bin/gobjdump \
--with-readelf=/opt/local/bin/greadelf \
+ --with-grep=/opt/local/bin/ggrep \
[...other configure parameters as you like...]
6) proceed as described in standard documentation
--
1.8.5.2 (Apple Git-48)
--
For unsubscribe information see http://sourceware.org/lists.html#faq
Fabian Freyer
2014-08-27 02:22:09 UTC
Permalink
Bryan, All,
Post by Bryan Hundven
Fabian, list,
On Tue, Aug 26, 2014 at 7:06 PM, Fabian Freyer
Post by Fabian Freyer
Hi All,
This patch adds documentation for the --with-grep option.
Regards,
Fabian Freyer
From ee0df4acaf860d6520209bae6644a22acbab98d0 Mon Sep 17 00:00:00 2001
Date: Wed, 27 Aug 2014 04:01:26 +0200
Subject: [PATCH] Added documentation for --with-grep
Don't forget the SoB.
I didn't, afaics.
Post by Bryan Hundven
I use vim, and so I found a plugin called snipmate.
I'll be it, my version is a bit older, but it has the addition
Thanks, I'll take a look at that!
Post by Bryan Hundven
https://github.com/bhundven/snipmate.vim/commits/master
Cheers,
-Bryan
Post by Fabian Freyer
---
docs/C - Misc. tutorials.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/C - Misc. tutorials.txt b/docs/C - Misc. tutorials.txt
index d3c9506..0a827d2 100644
--- a/docs/C - Misc. tutorials.txt
+++ b/docs/C - Misc. tutorials.txt
@@ -91,6 +91,7 @@ toolchain on MacOS as host.
--with-objcopy=/opt/local/bin/gobjcopy \
--with-objdump=/opt/local/bin/gobjdump \
--with-readelf=/opt/local/bin/greadelf \
+ --with-grep=/opt/local/bin/ggrep \
[...other configure parameters as you like...]
6) proceed as described in standard documentation
--
1.8.5.2 (Apple Git-48)
Regards,
Fabian Freyer
Yann E. MORIN
2014-08-28 20:27:11 UTC
Permalink
Bryan, All,
Post by Bryan Hundven
On Tue, Aug 26, 2014 at 7:06 PM, Fabian Freyer
Post by Fabian Freyer
Hi All,
This patch adds documentation for the --with-grep option.
Regards,
Fabian Freyer
From ee0df4acaf860d6520209bae6644a22acbab98d0 Mon Sep 17 00:00:00 2001
Date: Wed, 27 Aug 2014 04:01:26 +0200
Subject: [PATCH] Added documentation for --with-grep
Don't forget the SoB.
I use vim, and so I found a plugin called snipmate.
Ack! snipmate is utterly usefull! I could not live without it, now.
Post by Bryan Hundven
I'll be it, my version is a bit older, but it has the addition
https://github.com/bhundven/snipmate.vim/commits/master
I too have my sob-and-the-likes snippets:

snippet ack
Acked-by:
snippet rev
Reviewed-by:
snippet sob
Signed-off-by:
snippet tst
Tested-by:
snippet rep
Reported-by:
snippet ME
"Yann E. MORIN" <***@free.fr>
snippet me
***@free.fr

So, with them, I can do something like:

sob<TAB>ME<TAB>
which gives:
Signed-off-by: "Yann E. MORIN" <***@free.fr>

Or, when I modify an existing commit:
[me<TAB>: blabla]
which gives:
[***@free.fr: blabla]

My snippets also contain a bunch of short-hand for a bunch of people I
often have to deal with. snipmate also completes its own snippets, so:
bh<TAB> --> bhundven<TAB> --> Bryan Hundven <***@gmail.com>

I also have a bunch of other snippets; rgd<TAB> would give:

Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq
Yann E. MORIN
2014-08-29 15:37:37 UTC
Permalink
Fabian, All,
Post by Yann E. MORIN
http://patchwork.ozlabs.org/patch/376843/
and aims at making it even more easy to build on BSD-like systems, by
consistently using ${grep} and ${sed} instead of directly calling to sed
or grep.
Also, it adds a ./configure --with-grep flag, for those with a GNU grep
in a non-standard location.
Series applied! Thanks! :-)

Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq
Loading...