* [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists
@ 2013-05-30 13:57 Fabio Porcedda
2013-05-30 14:01 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Fabio Porcedda @ 2013-05-30 13:57 UTC (permalink / raw)
To: buildroot
This is to be able to use "make defconfig" even when BR2_DEFCONFIG has
a filename that does not exist or use the default value that
does not exists.
Example on a clean installation, without a "./defconfig":
make defconfig
make defconfig
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index e8647d1..57bf8b3 100644
--- a/Makefile
+++ b/Makefile
@@ -698,7 +698,7 @@ olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
- @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(wildcard $(DEFCONFIG)),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists
2013-05-30 13:57 [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists Fabio Porcedda
@ 2013-05-30 14:01 ` Thomas Petazzoni
2013-05-30 14:25 ` Fabio Porcedda
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2013-05-30 14:01 UTC (permalink / raw)
To: buildroot
Dear Fabio Porcedda,
On Thu, 30 May 2013 15:57:40 +0200, Fabio Porcedda wrote:
> This is to be able to use "make defconfig" even when BR2_DEFCONFIG has
> a filename that does not exist or use the default value that
> does not exists.
>
> Example on a clean installation, without a "./defconfig":
> make defconfig
> make defconfig
I'm not sure to understand the example here. Could you detail a little
bit?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists
2013-05-30 14:01 ` Thomas Petazzoni
@ 2013-05-30 14:25 ` Fabio Porcedda
2013-12-26 23:09 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Fabio Porcedda @ 2013-05-30 14:25 UTC (permalink / raw)
To: buildroot
On Thu, May 30, 2013 at 4:01 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Fabio Porcedda,
>
> On Thu, 30 May 2013 15:57:40 +0200, Fabio Porcedda wrote:
>> This is to be able to use "make defconfig" even when BR2_DEFCONFIG has
>> a filename that does not exist or use the default value that
>> does not exists.
>>
>> Example on a clean installation, without a "./defconfig":
>> make defconfig
>> make defconfig
>
> I'm not sure to understand the example here. Could you detail a little
> bit?
Without this patch the first "make defconfig" works, but the second
"make defconfig" fails.
With this patch the second "make defconfig" works like the first one.
This is because when the first "make defconfig" is issued the
BR2_DEFCONFIG is empty, instead when the second "make defconfig" is
issued the BR2_DEFCONFIG has the default value
"$(CONFIG_DIR)/defconfig" that usually does not exists and so fails.
I fixed this failure ignoring the BR2_DEFCONFIG when the default value
does not exist.
Best regards
--
Fabio Porcedda
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists
2013-05-30 14:25 ` Fabio Porcedda
@ 2013-12-26 23:09 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2013-12-26 23:09 UTC (permalink / raw)
To: buildroot
Fabio, Thomas, All,
On 2013-05-30 16:25 +0200, Fabio Porcedda spake thusly:
> On Thu, May 30, 2013 at 4:01 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> > Dear Fabio Porcedda,
> >
> > On Thu, 30 May 2013 15:57:40 +0200, Fabio Porcedda wrote:
> >> This is to be able to use "make defconfig" even when BR2_DEFCONFIG has
> >> a filename that does not exist or use the default value that
> >> does not exists.
> >>
> >> Example on a clean installation, without a "./defconfig":
> >> make defconfig
> >> make defconfig
> >
> > I'm not sure to understand the example here. Could you detail a little
> > bit?
>
> Without this patch the first "make defconfig" works, but the second
> "make defconfig" fails.
> With this patch the second "make defconfig" works like the first one.
I think I have a better fix for this:
http://patchwork.ozlabs.org/patch/305312/
So I'm marking your patch as superseded.
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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-26 23:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 13:57 [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists Fabio Porcedda
2013-05-30 14:01 ` Thomas Petazzoni
2013-05-30 14:25 ` Fabio Porcedda
2013-12-26 23:09 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox