diff mbox

[05/16,v3] core: move rule to create basic directories

Message ID 35c825b427c5e89497aafde9b787986eeeac1ad7.1468750623.git.yann.morin.1998@free.fr
State Accepted
Headers show

Commit Message

Yann E. MORIN July 17, 2016, 10:34 a.m. UTC
Some of those directories will be needed even during configuration, like
BUILD_DIR, where we'll store the generated kconfig snippet.

So, move the rule to create them outside the HAVE_CONFIG block.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
---
 Makefile | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Romain Naour Aug. 6, 2016, 3:16 p.m. UTC | #1
Hi Yann,

Le 17/07/2016 à 12:34, Yann E. MORIN a écrit :
> Some of those directories will be needed even during configuration, like
> BUILD_DIR, where we'll store the generated kconfig snippet.
> 
> So, move the rule to create them outside the HAVE_CONFIG block.

You mean BR2_HAVE_DOT_CONFIG here, right ?

With that fixed:
Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Peter Korsgaard <jacmet@uclibc.org>
> ---
>  Makefile | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 6f947f3..d4dc1c5 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -200,6 +200,15 @@ LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt
>  LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
>  LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
>  
> +################################################################################
> +#
> +# staging and target directories do NOT list these as
> +# dependencies anywhere else
> +#
> +################################################################################
> +$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
> +	@mkdir -p $@
> +
>  BR2_CONFIG = $(CONFIG_DIR)/.config
>  
>  # Pull in the user's configuration file
> @@ -496,15 +505,6 @@ world: target-post-image
>  	legal-info legal-info-prepare legal-info-clean printvars help \
>  	list-defconfigs target-finalize target-post-image source-check
>  
> -################################################################################
> -#
> -# staging and target directories do NOT list these as
> -# dependencies anywhere else
> -#
> -################################################################################
> -$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
> -	@mkdir -p $@
> -
>  # Populating the staging with the base directories is handled by the skeleton package
>  $(STAGING_DIR):
>  	@mkdir -p $(STAGING_DIR)
>
Thomas Petazzoni Aug. 27, 2016, 2:14 p.m. UTC | #2
Hello,

On Sat, 6 Aug 2016 17:16:20 +0200, Romain Naour wrote:
> Hi Yann,
> 
> Le 17/07/2016 à 12:34, Yann E. MORIN a écrit :
> > Some of those directories will be needed even during configuration, like
> > BUILD_DIR, where we'll store the generated kconfig snippet.
> > 
> > So, move the rule to create them outside the HAVE_CONFIG block.  
> 
> You mean BR2_HAVE_DOT_CONFIG here, right ?

Yann, could you reply to this comment? I think Romain is right, but I
just want to be sure before fixing up myself when applying.

Thanks,

Thomas
Yann E. MORIN Aug. 27, 2016, 2:34 p.m. UTC | #3
Romain, Thomas, All,

On 2016-08-27 16:14 +0200, Thomas Petazzoni spake thusly:
> On Sat, 6 Aug 2016 17:16:20 +0200, Romain Naour wrote:
> > Hi Yann,
> > 
> > Le 17/07/2016 à 12:34, Yann E. MORIN a écrit :
> > > Some of those directories will be needed even during configuration, like
> > > BUILD_DIR, where we'll store the generated kconfig snippet.
> > > 
> > > So, move the rule to create them outside the HAVE_CONFIG block.  
> > 
> > You mean BR2_HAVE_DOT_CONFIG here, right ?
> 
> Yann, could you reply to this comment? I think Romain is right, but I
> just want to be sure before fixing up myself when applying.

Yes, he's right, this should have been 'BR2_HAVE_DOT_CONFIG'.

Regards,
Yann E. MORIN.
Thomas Petazzoni Aug. 27, 2016, 7:41 p.m. UTC | #4
Hello,

On Sun, 17 Jul 2016 12:34:25 +0200, Yann E. MORIN wrote:
> Some of those directories will be needed even during configuration, like
> BUILD_DIR, where we'll store the generated kconfig snippet.
> 
> So, move the rule to create them outside the HAVE_CONFIG block.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Peter Korsgaard <jacmet@uclibc.org>

I've applied this patch to next, after fixing the typo in the commit
log noticed by Romain Naour. One question below, though.

> +################################################################################
> +#
> +# staging and target directories do NOT list these as
> +# dependencies anywhere else
> +#
> +################################################################################

Do you understand what this comment means? It seems to date back from
the "major rework" commit 08782ae7d8812933ad3f932132955ea1c0fb1e52 in
2002, and I don't really understand the meaning of this comment.

Thanks,

Thomas
Yann E. MORIN Aug. 27, 2016, 10:07 p.m. UTC | #5
Thomas, All,

On 2016-08-27 21:41 +0200, Thomas Petazzoni spake thusly:
> On Sun, 17 Jul 2016 12:34:25 +0200, Yann E. MORIN wrote:
> > Some of those directories will be needed even during configuration, like
> > BUILD_DIR, where we'll store the generated kconfig snippet.
> > 
> > So, move the rule to create them outside the HAVE_CONFIG block.
> > 
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Peter Korsgaard <jacmet@uclibc.org>
> 
> I've applied this patch to next, after fixing the typo in the commit
> log noticed by Romain Naour. One question below, though.

Thanks! :-)

> > +################################################################################
> > +#
> > +# staging and target directories do NOT list these as
> > +# dependencies anywhere else
> > +#
> > +################################################################################
> 
> Do you understand what this comment means? It seems to date back from
> the "major rework" commit 08782ae7d8812933ad3f932132955ea1c0fb1e52 in
> 2002, and I don't really understand the meaning of this comment.

Neither do I... And as a once-colleague-of-mine said:

    When you don't know, don't touch!

Regards,
Yann E. MORIN.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 6f947f3..d4dc1c5 100644
--- a/Makefile
+++ b/Makefile
@@ -200,6 +200,15 @@  LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt
 LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
 LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
 
+################################################################################
+#
+# staging and target directories do NOT list these as
+# dependencies anywhere else
+#
+################################################################################
+$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
+	@mkdir -p $@
+
 BR2_CONFIG = $(CONFIG_DIR)/.config
 
 # Pull in the user's configuration file
@@ -496,15 +505,6 @@  world: target-post-image
 	legal-info legal-info-prepare legal-info-clean printvars help \
 	list-defconfigs target-finalize target-post-image source-check
 
-################################################################################
-#
-# staging and target directories do NOT list these as
-# dependencies anywhere else
-#
-################################################################################
-$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
-	@mkdir -p $@
-
 # Populating the staging with the base directories is handled by the skeleton package
 $(STAGING_DIR):
 	@mkdir -p $(STAGING_DIR)