From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] Remove some absolute paths
Date: Tue, 31 Dec 2013 00:11:24 +0100 [thread overview]
Message-ID: <52C1FD9C.9060401@lucaceresoli.net> (raw)
In-Reply-To: <1388421102-29198-1-git-send-email-bjorn.forsman@gmail.com>
Il 30/12/2013 17:31, Bj?rn Forsman ha scritto:
> Buildroot fails to run on NixOS because it has no /bin/echo or
> /bin/grep. Instead of relying on absolute paths, rely on tools to be
> available in PATH. This should work for all systems.
>
> Signed-off-by: Bj?rn Forsman <bjorn.forsman@gmail.com>
> ---
> support/dependencies/dependencies.sh | 96 ++++++++++++++++++------------------
> 1 file changed, 48 insertions(+), 48 deletions(-)
>
> diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
> index 32b8fea..d1ce918 100755
> --- a/support/dependencies/dependencies.sh
> +++ b/support/dependencies/dependencies.sh
> @@ -7,20 +7,20 @@ export LC_ALL=C
> # Verify that grep works
> echo "WORKS" | grep "WORKS" >/dev/null 2>&1
> if test $? != 0 ; then
> - /bin/echo -e "\ngrep doesn't work\n"
> + echo -e "\ngrep doesn't work\n"
I'm ok with the change, but while we're touching these basig commands,
why not replacing them with an ECHO and a GREP constant? Such as:
ECHO := $(shell which grep)
or, more simply:
ECHO := echo
and wherever it's used:
- /bin/echo -e "\ngrep doesn't work\n"
+ $(ECHO) -e "\ngrep doesn't work\n"
This is what we do i.e. for sed. See package/Makefile.in.
This allows successive changes to the command definition without
the need for a massive search and replace.
--
Luca
next prev parent reply other threads:[~2013-12-30 23:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-30 16:31 [Buildroot] [PATCH 1/2] Remove some absolute paths Bjørn Forsman
2013-12-30 16:31 ` [Buildroot] [PATCH 2/2] Prefer 'printf' over 'echo -e' (for portability) Bjørn Forsman
2014-01-21 8:08 ` Thomas De Schampheleire
2014-01-21 8:40 ` Peter Korsgaard
2014-01-21 18:07 ` Bjørn Forsman
2013-12-30 23:11 ` Luca Ceresoli [this message]
2013-12-31 12:56 ` [Buildroot] [PATCH 1/2] Remove some absolute paths Bjørn Forsman
2014-01-01 17:13 ` Thomas De Schampheleire
2014-01-01 20:24 ` Bjørn Forsman
2014-01-18 16:00 ` Bjørn Forsman
2014-01-21 8:04 ` Thomas De Schampheleire
2014-01-21 8:43 ` Peter Korsgaard
2014-01-21 18:14 ` Bjørn Forsman
2014-01-21 20:53 ` Peter Korsgaard
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=52C1FD9C.9060401@lucaceresoli.net \
--to=luca@lucaceresoli.net \
--cc=buildroot@busybox.net \
/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