From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] $(SED) not defined if 'make menuconfig savedefconfig'
Date: Mon, 15 Jun 2015 15:37:42 +0200 [thread overview]
Message-ID: <20150615153742.02ebdb85@free-electrons.com> (raw)
In-Reply-To: <CAM+bi4tjaJB2bJuQ40_cap55ZrEmOYg4Ssz+TMM_zg5Cb0yo6A@mail.gmail.com>
Dear Alvaro Gamez,
On Mon, 15 Jun 2015 12:26:02 +0200, Alvaro Gamez wrote:
> While using buildroot-submodule (
> https://github.com/Openwide-Ingenierie/buildroot-submodule) I've noticed
> this happens since commit f71a621d91ec27f175fc84012962f88b1107305f was
> introduced into buildroot.
>
> $ make menuconfig savedefconfig
> [Do whatever, or nothing at all and exit, there's no need to save anything]
> *** End of the configuration.
> *** Execute 'make' to start the build or try 'make help'.
>
> make: /BR2_DEFCONFIG=/d: Command not found
> Makefile:777: recipe for target 'savedefconfig' failed
> make: *** [savedefconfig] Error 127
>
> However,
> $ make menuconfig
> $ make savedefconfig
>
> does not end with that error. I've just tracked it down to the fact that
> $(SED) is not defined when menuconfig savedefconfig are used in a single
> make call, whereas it equals to '/bin/sed -i -e'
>
> Simply replacing that @$(SED) by /bin/sed -i -e on line 777 of Makefile
> makes it work again, but I don't think that solution is desirable. I'm
> sorry I can't provide a full patch, the motive of this bug is beyond my
> knowledge.
Hum, right. Can you try the below patch:
diff --git a/Makefile b/Makefile
index d3f80c4..67eb50c 100644
--- a/Makefile
+++ b/Makefile
@@ -272,6 +272,7 @@ HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
+SED := $(shell which sed || type -p sed) -i -e
export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD
export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
diff --git a/package/Makefile.in b/package/Makefile.in
index c02d31f..f256b05 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -217,7 +217,6 @@ endif
INSTALL := $(shell which install || type -p install)
FLEX := $(shell which flex || type -p flex)
BISON := $(shell which bison || type -p bison)
-SED := $(shell which sed || type -p sed) -i -e
UNZIP := $(shell which unzip || type -p unzip) -q
APPLY_PATCHES = support/scripts/apply-patches.sh $(if $(QUIET),-s)
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-06-15 13:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 10:26 [Buildroot] $(SED) not defined if 'make menuconfig savedefconfig' Alvaro Gamez
2015-06-15 13:37 ` Thomas Petazzoni [this message]
2015-06-15 14:20 ` rdkehn at yahoo.com
2015-06-16 7:58 ` Alvaro Gamez
2016-02-16 11:46 ` Alvaro Gamez
2016-02-16 15:10 ` Thomas Petazzoni
2016-02-16 15:15 ` [Buildroot] [PATCH 1/1] Declare SED Makefile instead of package/Makefile.in so it exists globally Alvaro G. M
2016-02-16 20:35 ` Thomas Petazzoni
2016-02-16 22:35 ` Arnout Vandecappelle
2016-02-17 8:22 ` Alvaro Gamez
2016-02-17 8:47 ` Thomas Petazzoni
2016-02-27 13:17 ` Arnout Vandecappelle
2016-02-27 22:00 ` Peter Korsgaard
2016-02-28 7:43 ` Alvaro Gamez
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=20150615153742.02ebdb85@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--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