* [Buildroot] [PATCH 0 of 2] infra: remove pkgparentdir
@ 2013-11-11 11:53 Thomas De Schampheleire
2013-11-11 11:53 ` [Buildroot] [PATCH 1 of 2] dhrystone: remove usage of FOO_DIR_PREFIX Thomas De Schampheleire
2013-11-11 11:53 ` [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir Thomas De Schampheleire
0 siblings, 2 replies; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-11-11 11:53 UTC (permalink / raw)
To: buildroot
Following Arnout's suggestion, this patch series removes the pkgparentdir
function in favor of pkgdir.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
package/dhrystone/dhrystone.mk | 2 +-
package/pkg-autotools.mk | 6 +++---
package/pkg-cmake.mk | 6 +++---
package/pkg-generic.mk | 10 +++++-----
package/pkg-utils.mk | 1 -
5 files changed, 12 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1 of 2] dhrystone: remove usage of FOO_DIR_PREFIX
2013-11-11 11:53 [Buildroot] [PATCH 0 of 2] infra: remove pkgparentdir Thomas De Schampheleire
@ 2013-11-11 11:53 ` Thomas De Schampheleire
2014-02-04 13:18 ` Peter Korsgaard
2013-11-11 11:53 ` [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir Thomas De Schampheleire
1 sibling, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-11-11 11:53 UTC (permalink / raw)
To: buildroot
As the semantics of FOO_DIR_PREFIX will change in the following patch, we
want to remove unnecessary usage of this variable.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
package/dhrystone/dhrystone.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/package/dhrystone/dhrystone.mk b/package/dhrystone/dhrystone.mk
--- a/package/dhrystone/dhrystone.mk
+++ b/package/dhrystone/dhrystone.mk
@@ -10,7 +10,7 @@ DHRYSTONE_SITE = http://www.netlib.org/b
define DHRYSTONE_EXTRACT_CMDS
(cd $(@D) && $(SHELL) $(DL_DIR)/$($(PKG)_SOURCE))
- $(Q)cp $($(PKG)_DIR_PREFIX)/dhrystone/Makefile $(@D)/
+ $(Q)cp package/dhrystone/Makefile $(@D)/
endef
define DHRYSTONE_BUILD_CMDS
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-11 11:53 [Buildroot] [PATCH 0 of 2] infra: remove pkgparentdir Thomas De Schampheleire
2013-11-11 11:53 ` [Buildroot] [PATCH 1 of 2] dhrystone: remove usage of FOO_DIR_PREFIX Thomas De Schampheleire
@ 2013-11-11 11:53 ` Thomas De Schampheleire
2013-11-11 23:15 ` Arnout Vandecappelle
1 sibling, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-11-11 11:53 UTC (permalink / raw)
To: buildroot
As Arnout suggested, pkgparentdir is no longer really needed. Its usage can
be replaced with pkgdir. This patch makes that change, and removes the
definition of pkgparentdir.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
Note: as a consequence of this change, the definition of FOO_DIR_PREFIX
slightly changed. I could have renamed the variable, but FOO_DIR was already
taken, and it's still more or less a prefix.
package/pkg-autotools.mk | 6 +++---
package/pkg-cmake.mk | 6 +++---
package/pkg-generic.mk | 10 +++++-----
package/pkg-utils.mk | 1 -
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -48,7 +48,7 @@ endef
# for host packages
# argument 3 is the uppercase package name, without the HOST_ prefix
# for host packages
-# argument 4 is the package directory prefix
+# argument 4 is the package directory
# argument 5 is the type (target or host)
################################################################################
@@ -311,5 +311,5 @@ endef
# autotools-package -- the target generator macro for autotools packages
################################################################################
-autotools-package = $(call inner-autotools-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
-host-autotools-package = $(call inner-autotools-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
+autotools-package = $(call inner-autotools-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target)
+host-autotools-package = $(call inner-autotools-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -31,7 +31,7 @@
# for host packages
# argument 3 is the uppercase package name, without the HOST_ prefix
# for host packages
-# argument 4 is the package directory prefix
+# argument 4 is the package directory
# argument 5 is the type (target or host)
################################################################################
@@ -179,8 +179,8 @@ endef
# cmake-package -- the target generator macro for CMake packages
################################################################################
-cmake-package = $(call inner-cmake-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
-host-cmake-package = $(call inner-cmake-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
+cmake-package = $(call inner-cmake-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target)
+host-cmake-package = $(call inner-cmake-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host)
################################################################################
# Generation of the CMake toolchain file
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -89,7 +89,7 @@ endif
# find the package directory (typically package/<pkgname>) and the
# prefix of the patches
$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
-$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)
+$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)
$(BUILD_DIR)/%/.stamp_patched:
@$(call MESSAGE,"Patching")
$(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
@@ -197,7 +197,7 @@ endif
# for host packages
# argument 3 is the uppercase package name, without the HOST_ prefix
# for host packages
-# argument 4 is the package directory prefix
+# argument 4 is the package directory
# argument 5 is the type (target or host)
################################################################################
@@ -475,7 +475,7 @@ endif
# kernel case, the bootloaders case, and the normal packages case.
ifeq ($(1),linux)
$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
-else ifeq ($(4),boot/)
+else ifneq ($(filter boot/%,$(4)),)
$(2)_KCONFIG_VAR = BR2_TARGET_$(2)
else
$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
@@ -565,8 +565,8 @@ endef # inner-generic-package
################################################################################
# In the case of target packages, keep the package name "pkg"
-generic-package = $(call inner-generic-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
+generic-package = $(call inner-generic-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target)
# In the case of host packages, turn the package name "pkg" into "host-pkg"
-host-generic-package = $(call inner-generic-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
+host-generic-package = $(call inner-generic-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host)
# :mode=makefile:
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -60,7 +60,6 @@ endef
# package, for which the package directory is an empty string.
pkgdir = $(dir $(lastword $(MAKEFILE_LIST)))
pkgname = $(lastword $(subst /, ,$(call pkgdir)))
-pkgparentdir = $(patsubst %$(call pkgname)/,%,$(call pkgdir))
# Define extractors for different archive suffixes
INFLATE.bz2 = $(BZCAT)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-11 11:53 ` [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir Thomas De Schampheleire
@ 2013-11-11 23:15 ` Arnout Vandecappelle
2013-11-12 8:56 ` Thomas De Schampheleire
0 siblings, 1 reply; 16+ messages in thread
From: Arnout Vandecappelle @ 2013-11-11 23:15 UTC (permalink / raw)
To: buildroot
On 11/11/13 12:53, Thomas De Schampheleire wrote:
> As Arnout suggested, pkgparentdir is no longer really needed. Its usage can
> be replaced with pkgdir. This patch makes that change, and removes the
> definition of pkgparentdir.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> ---
> Note: as a consequence of this change, the definition of FOO_DIR_PREFIX
> slightly changed. I could have renamed the variable, but FOO_DIR was already
> taken, and it's still more or less a prefix.
I think it's a better idea to choose a new name - if only to help
people who are using this variable in custom packages. Or better yet,
remove it completely - it's anyway not used anymore.
>
> package/pkg-autotools.mk | 6 +++---
> package/pkg-cmake.mk | 6 +++---
> package/pkg-generic.mk | 10 +++++-----
> package/pkg-utils.mk | 1 -
> 4 files changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -48,7 +48,7 @@ endef
> # for host packages
> # argument 3 is the uppercase package name, without the HOST_ prefix
> # for host packages
> -# argument 4 is the package directory prefix
> +# argument 4 is the package directory
> # argument 5 is the type (target or host)
> ################################################################################
>
> @@ -311,5 +311,5 @@ endef
> # autotools-package -- the target generator macro for autotools packages
> ################################################################################
>
> -autotools-package = $(call inner-autotools-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
> -host-autotools-package = $(call inner-autotools-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
> +autotools-package = $(call inner-autotools-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target)
> +host-autotools-package = $(call inner-autotools-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host)
> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -31,7 +31,7 @@
> # for host packages
> # argument 3 is the uppercase package name, without the HOST_ prefix
> # for host packages
> -# argument 4 is the package directory prefix
> +# argument 4 is the package directory
> # argument 5 is the type (target or host)
> ################################################################################
>
> @@ -179,8 +179,8 @@ endef
> # cmake-package -- the target generator macro for CMake packages
> ################################################################################
>
> -cmake-package = $(call inner-cmake-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
> -host-cmake-package = $(call inner-cmake-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
> +cmake-package = $(call inner-cmake-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target)
> +host-cmake-package = $(call inner-cmake-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host)
>
> ################################################################################
> # Generation of the CMake toolchain file
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -89,7 +89,7 @@ endif
> # find the package directory (typically package/<pkgname>) and the
> # prefix of the patches
> $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
> -$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)
> +$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)
> $(BUILD_DIR)/%/.stamp_patched:
> @$(call MESSAGE,"Patching")
> $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
> @@ -197,7 +197,7 @@ endif
> # for host packages
> # argument 3 is the uppercase package name, without the HOST_ prefix
> # for host packages
> -# argument 4 is the package directory prefix
> +# argument 4 is the package directory
> # argument 5 is the type (target or host)
> ################################################################################
>
> @@ -475,7 +475,7 @@ endif
> # kernel case, the bootloaders case, and the normal packages case.
> ifeq ($(1),linux)
> $(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
> -else ifeq ($(4),boot/)
> +else ifneq ($(filter boot/%,$(4)),)
Since this is the only place where $(4) is used, we could use $(pkgdir)
directly and drop the 4th parameter. (I just tested and it seems to work.)
Regards,
Arnout
> $(2)_KCONFIG_VAR = BR2_TARGET_$(2)
> else
> $(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
> @@ -565,8 +565,8 @@ endef # inner-generic-package
> ################################################################################
>
> # In the case of target packages, keep the package name "pkg"
> -generic-package = $(call inner-generic-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
> +generic-package = $(call inner-generic-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target)
> # In the case of host packages, turn the package name "pkg" into "host-pkg"
> -host-generic-package = $(call inner-generic-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
> +host-generic-package = $(call inner-generic-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host)
>
> # :mode=makefile:
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -60,7 +60,6 @@ endef
> # package, for which the package directory is an empty string.
> pkgdir = $(dir $(lastword $(MAKEFILE_LIST)))
> pkgname = $(lastword $(subst /, ,$(call pkgdir)))
> -pkgparentdir = $(patsubst %$(call pkgname)/,%,$(call pkgdir))
>
> # Define extractors for different archive suffixes
> INFLATE.bz2 = $(BZCAT)
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-11 23:15 ` Arnout Vandecappelle
@ 2013-11-12 8:56 ` Thomas De Schampheleire
2013-11-12 11:09 ` Thomas Petazzoni
2013-11-12 13:46 ` Arnout Vandecappelle
0 siblings, 2 replies; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-11-12 8:56 UTC (permalink / raw)
To: buildroot
On Tue, Nov 12, 2013 at 12:15 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 11/11/13 12:53, Thomas De Schampheleire wrote:
>>
>> As Arnout suggested, pkgparentdir is no longer really needed. Its usage
>> can
>> be replaced with pkgdir. This patch makes that change, and removes the
>> definition of pkgparentdir.
>>
>> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>>
>> ---
>> Note: as a consequence of this change, the definition of FOO_DIR_PREFIX
>> slightly changed. I could have renamed the variable, but FOO_DIR was
>> already
>> taken, and it's still more or less a prefix.
>
>
> I think it's a better idea to choose a new name - if only to help people
> who are using this variable in custom packages. Or better yet, remove it
> completely - it's anyway not used anymore.
The only remaining place is in the foo-patch block, to get the
location of patches for that package.
That is outside the inner-generic-package, so we cannot use $(4)
anymore. How do you propose to solve that?
>
>
>
>>
>> package/pkg-autotools.mk | 6 +++---
>> package/pkg-cmake.mk | 6 +++---
>> package/pkg-generic.mk | 10 +++++-----
>> package/pkg-utils.mk | 1 -
>> 4 files changed, 11 insertions(+), 12 deletions(-)
>>
>> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
>> --- a/package/pkg-autotools.mk
>> +++ b/package/pkg-autotools.mk
>> @@ -48,7 +48,7 @@ endef
>> # for host packages
>> # argument 3 is the uppercase package name, without the HOST_ prefix
>> # for host packages
>> -# argument 4 is the package directory prefix
>> +# argument 4 is the package directory
>> # argument 5 is the type (target or host)
>>
>> ################################################################################
>>
>> @@ -311,5 +311,5 @@ endef
>> # autotools-package -- the target generator macro for autotools packages
>>
>> ################################################################################
>>
>> -autotools-package = $(call inner-autotools-package,$(call pkgname),$(call
>> UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call
>> pkgparentdir),target)
>> -host-autotools-package = $(call inner-autotools-package,host-$(call
>> pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call
>> pkgname)),$(call pkgparentdir),host)
>> +autotools-package = $(call inner-autotools-package,$(call pkgname),$(call
>> UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call
>> pkgdir),target)
>> +host-autotools-package = $(call inner-autotools-package,host-$(call
>> pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call
>> pkgname)),$(call pkgdir),host)
>> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
>> --- a/package/pkg-cmake.mk
>> +++ b/package/pkg-cmake.mk
>> @@ -31,7 +31,7 @@
>> # for host packages
>> # argument 3 is the uppercase package name, without the HOST_ prefix
>> # for host packages
>> -# argument 4 is the package directory prefix
>> +# argument 4 is the package directory
>> # argument 5 is the type (target or host)
>>
>> ################################################################################
>>
>> @@ -179,8 +179,8 @@ endef
>> # cmake-package -- the target generator macro for CMake packages
>>
>> ################################################################################
>>
>> -cmake-package = $(call inner-cmake-package,$(call pkgname),$(call
>> UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call
>> pkgparentdir),target)
>> -host-cmake-package = $(call inner-cmake-package,host-$(call
>> pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call
>> pkgname)),$(call pkgparentdir),host)
>> +cmake-package = $(call inner-cmake-package,$(call pkgname),$(call
>> UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call
>> pkgdir),target)
>> +host-cmake-package = $(call inner-cmake-package,host-$(call
>> pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call
>> pkgname)),$(call pkgdir),host)
>>
>>
>> ################################################################################
>> # Generation of the CMake toolchain file
>> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
>> --- a/package/pkg-generic.mk
>> +++ b/package/pkg-generic.mk
>> @@ -89,7 +89,7 @@ endif
>> # find the package directory (typically package/<pkgname>) and the
>> # prefix of the patches
>> $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
>> -$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS =
>> $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call
>> qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)
>> +$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)
>> $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME)
>> $(BUILD_DIR)/%/.stamp_patched:
>> @$(call MESSAGE,"Patching")
>> $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
>> @@ -197,7 +197,7 @@ endif
>> # for host packages
>> # argument 3 is the uppercase package name, without the HOST_ prefix
>> # for host packages
>> -# argument 4 is the package directory prefix
>> +# argument 4 is the package directory
>> # argument 5 is the type (target or host)
>>
>> ################################################################################
>>
>> @@ -475,7 +475,7 @@ endif
>> # kernel case, the bootloaders case, and the normal packages case.
>> ifeq ($(1),linux)
>> $(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
>> -else ifeq ($(4),boot/)
>> +else ifneq ($(filter boot/%,$(4)),)
>
>
> Since this is the only place where $(4) is used, we could use $(pkgdir)
> directly and drop the 4th parameter. (I just tested and it seems to work.)
If we can find a solution for the patching commands, then it's
probably possible...
Best regards,
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 8:56 ` Thomas De Schampheleire
@ 2013-11-12 11:09 ` Thomas Petazzoni
2013-11-12 11:32 ` Thomas De Schampheleire
2013-11-12 13:46 ` Arnout Vandecappelle
1 sibling, 1 reply; 16+ messages in thread
From: Thomas Petazzoni @ 2013-11-12 11:09 UTC (permalink / raw)
To: buildroot
Dear Thomas De Schampheleire,
On Tue, 12 Nov 2013 09:56:37 +0100, Thomas De Schampheleire wrote:
> > I think it's a better idea to choose a new name - if only to help
> > people who are using this variable in custom packages. Or better
> > yet, remove it completely - it's anyway not used anymore.
>
> The only remaining place is in the foo-patch block, to get the
> location of patches for that package.
> That is outside the inner-generic-package, so we cannot use $(4)
> anymore. How do you propose to solve that?
Currently:
<foo>_DIR => build directory
<foo>_DIR_PREFIX => prefix of the package directory in Buildroot
sources
<foo>_DL_DIR => location of the package download directory, for
git/cvs downloads (apparently not used consistently)
I think it would make a lot more sense to have:
<foo>_DIR => points to the package directory in Buildroot sources, e.g
package/busybox/ for Busybox. This would allow packages
to easily reference their own directory, to get access to
configuration files and others, instead of having to know
they are located in package/busybox/. This could also be
used in the patching step instead of the DIR_PREFIX thing.
<foo>_BUILDDIR => points to the package build directory in $(BUILD_DIR)
<foo>_SRCDIR => points to the package source directory (currently
identical to <foo>_BUILDDIR, would change when we
introduce OOT build for packages). Actually, more than
half of the patch set I have to introduce OOT is about
using <foo>_SRCDIR vs <foo>_BUILDDIR in the right
places.
<foo>_DL_DIR => same as before.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 11:09 ` Thomas Petazzoni
@ 2013-11-12 11:32 ` Thomas De Schampheleire
2013-11-12 13:42 ` Arnout Vandecappelle
0 siblings, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-11-12 11:32 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Tue, Nov 12, 2013 at 12:09 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Thomas De Schampheleire,
>
> On Tue, 12 Nov 2013 09:56:37 +0100, Thomas De Schampheleire wrote:
>
>> > I think it's a better idea to choose a new name - if only to help
>> > people who are using this variable in custom packages. Or better
>> > yet, remove it completely - it's anyway not used anymore.
>>
>> The only remaining place is in the foo-patch block, to get the
>> location of patches for that package.
>> That is outside the inner-generic-package, so we cannot use $(4)
>> anymore. How do you propose to solve that?
>
> Currently:
>
> <foo>_DIR => build directory
>
> <foo>_DIR_PREFIX => prefix of the package directory in Buildroot
> sources
>
> <foo>_DL_DIR => location of the package download directory, for
> git/cvs downloads (apparently not used consistently)
>
> I think it would make a lot more sense to have:
>
> <foo>_DIR => points to the package directory in Buildroot sources, e.g
> package/busybox/ for Busybox. This would allow packages
> to easily reference their own directory, to get access to
> configuration files and others, instead of having to know
> they are located in package/busybox/. This could also be
> used in the patching step instead of the DIR_PREFIX thing.
Suppose we change this definition, do you suggest to change all .mk
files that currently reference package/foo to use FOO_DIR instead?
While FOO_DIR is useful for the infrastructure, like in the patching
case, I don't think it is necessary to change a file
package/foo/foo.mk to remove the hardcoded package/foo inside the
file. The likelihood of files being moved is very small, plus it will
be very hard to enforce consistent usage of FOO_DIR in favor of
package/foo in this case.
>
> <foo>_BUILDDIR => points to the package build directory in $(BUILD_DIR)
>
> <foo>_SRCDIR => points to the package source directory (currently
> identical to <foo>_BUILDDIR, would change when we
> introduce OOT build for packages). Actually, more than
> half of the patch set I have to introduce OOT is about
> using <foo>_SRCDIR vs <foo>_BUILDDIR in the right
> places.
>
> <foo>_DL_DIR => same as before.
In general, I think the new variable names make sense.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 11:32 ` Thomas De Schampheleire
@ 2013-11-12 13:42 ` Arnout Vandecappelle
2013-11-12 13:49 ` Thomas De Schampheleire
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2013-11-12 13:42 UTC (permalink / raw)
To: buildroot
On 12/11/13 12:32, Thomas De Schampheleire wrote:
> Hi Thomas,
>
> On Tue, Nov 12, 2013 at 12:09 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Dear Thomas De Schampheleire,
>>
>> On Tue, 12 Nov 2013 09:56:37 +0100, Thomas De Schampheleire wrote:
>>
>>>> I think it's a better idea to choose a new name - if only to help
>>>> people who are using this variable in custom packages. Or better
>>>> yet, remove it completely - it's anyway not used anymore.
>>>
>>> The only remaining place is in the foo-patch block, to get the
>>> location of patches for that package.
>>> That is outside the inner-generic-package, so we cannot use $(4)
>>> anymore. How do you propose to solve that?
>>
>> Currently:
>>
>> <foo>_DIR => build directory
>>
>> <foo>_DIR_PREFIX => prefix of the package directory in Buildroot
>> sources
>>
>> <foo>_DL_DIR => location of the package download directory, for
>> git/cvs downloads (apparently not used consistently)
>>
>> I think it would make a lot more sense to have:
>>
>> <foo>_DIR => points to the package directory in Buildroot sources, e.g
>> package/busybox/ for Busybox. This would allow packages
>> to easily reference their own directory, to get access to
>> configuration files and others, instead of having to know
>> they are located in package/busybox/. This could also be
>> used in the patching step instead of the DIR_PREFIX thing.
As I mentioned before, I would prefer to not reuse the same name with a
different meaning, because it may confuse users who have custom
modifications that rely on that variable. So instead I'd remove the
<foo>_DIR completely (so that it's pretty clear that this variable is
empty if anybody still uses it), and instead use e.g. <foo>_BR_DIR for
this purpose.
>
> Suppose we change this definition, do you suggest to change all .mk
> files that currently reference package/foo to use FOO_DIR instead?
> While FOO_DIR is useful for the infrastructure, like in the patching
> case, I don't think it is necessary to change a file
> package/foo/foo.mk to remove the hardcoded package/foo inside the
> file. The likelihood of files being moved is very small, plus it will
> be very hard to enforce consistent usage of FOO_DIR in favor of
> package/foo in this case.
How is that hard?
I would do what we usually do for new policy: enforce it for new
packages, but leave it alone for existing packages until someone grows
tired of the inconsistency and sends a global fixup patch. That also has
the advantage that we can still change our mind on the short term without
needing to change things all over the place again.
That said, I think that using package/foo in the .mk file is a lot
clearer than $(FOO_XXXDIR).
>
>>
>> <foo>_BUILDDIR => points to the package build directory in $(BUILD_DIR)
>>
>> <foo>_SRCDIR => points to the package source directory (currently
>> identical to <foo>_BUILDDIR, would change when we
>> introduce OOT build for packages). Actually, more than
>> half of the patch set I have to introduce OOT is about
>> using <foo>_SRCDIR vs <foo>_BUILDDIR in the right
>> places.
>>
>> <foo>_DL_DIR => same as before.
>
> In general, I think the new variable names make sense.
+1.
ThomasP, perhaps you can resubmit the patches for <foo>_SRCDIR vs
<foo>_BUILDDIR, since they can be applied independently of OOT.
Regards,
Arnout
>
> Best regards,
> Thomas
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 8:56 ` Thomas De Schampheleire
2013-11-12 11:09 ` Thomas Petazzoni
@ 2013-11-12 13:46 ` Arnout Vandecappelle
1 sibling, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2013-11-12 13:46 UTC (permalink / raw)
To: buildroot
On 12/11/13 09:56, Thomas De Schampheleire wrote:
> On Tue, Nov 12, 2013 at 12:15 AM, Arnout Vandecappelle<arnout@mind.be> wrote:
>> >On 11/11/13 12:53, Thomas De Schampheleire wrote:
>>> >>
>>> >>As Arnout suggested, pkgparentdir is no longer really needed. Its usage
>>> >>can
>>> >>be replaced with pkgdir. This patch makes that change, and removes the
>>> >>definition of pkgparentdir.
>>> >>
>>> >>Signed-off-by: Thomas De Schampheleire<thomas.de.schampheleire@gmail.com>
>>> >>
>>> >>---
>>> >>Note: as a consequence of this change, the definition of FOO_DIR_PREFIX
>>> >>slightly changed. I could have renamed the variable, but FOO_DIR was
>>> >>already
>>> >>taken, and it's still more or less a prefix.
>> >
>> >
>> > I think it's a better idea to choose a new name - if only to help people
>> >who are using this variable in custom packages. Or better yet, remove it
>> >completely - it's anyway not used anymore.
> The only remaining place is in the foo-patch block, to get the
> location of patches for that package.
> That is outside the inner-generic-package, so we cannot use $(4)
> anymore. How do you propose to solve that?
Oops, I forgot about that.
It would be possible to move the definition of PATCH_BASE_DIRS to
inner-generic-package (i.e. call it $(2)_PATCH_BASE_DIRS and expand
$($(PKG)_PATCH_BASE_DIRS) in the pattern rule). However, it's a lot
clearer to define something like $(2)_BRDIR in inner-generic-package.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 13:42 ` Arnout Vandecappelle
@ 2013-11-12 13:49 ` Thomas De Schampheleire
2013-11-12 15:35 ` Arnout Vandecappelle
2013-11-12 22:05 ` Peter Korsgaard
2013-12-05 14:53 ` Thomas De Schampheleire
2 siblings, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-11-12 13:49 UTC (permalink / raw)
To: buildroot
On Tue, Nov 12, 2013 at 2:42 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 12/11/13 12:32, Thomas De Schampheleire wrote:
>>
>> Hi Thomas,
>>
>> On Tue, Nov 12, 2013 at 12:09 PM, Thomas Petazzoni
>> <thomas.petazzoni@free-electrons.com> wrote:
>>>
>>> Dear Thomas De Schampheleire,
>>>
>>> On Tue, 12 Nov 2013 09:56:37 +0100, Thomas De Schampheleire wrote:
>>>
>>>>> I think it's a better idea to choose a new name - if only to help
>>>>> people who are using this variable in custom packages. Or better
>>>>> yet, remove it completely - it's anyway not used anymore.
>>>>
>>>>
>>>> The only remaining place is in the foo-patch block, to get the
>>>> location of patches for that package.
>>>> That is outside the inner-generic-package, so we cannot use $(4)
>>>> anymore. How do you propose to solve that?
>>>
>>>
>>> Currently:
>>>
>>> <foo>_DIR => build directory
>>>
>>> <foo>_DIR_PREFIX => prefix of the package directory in Buildroot
>>> sources
>>>
>>> <foo>_DL_DIR => location of the package download directory, for
>>> git/cvs downloads (apparently not used consistently)
>>>
>>> I think it would make a lot more sense to have:
>>>
>>> <foo>_DIR => points to the package directory in Buildroot sources, e.g
>>> package/busybox/ for Busybox. This would allow packages
>>> to easily reference their own directory, to get access to
>>> configuration files and others, instead of having to know
>>> they are located in package/busybox/. This could also be
>>> used in the patching step instead of the DIR_PREFIX thing.
>
>
> As I mentioned before, I would prefer to not reuse the same name with a
> different meaning, because it may confuse users who have custom
> modifications that rely on that variable. So instead I'd remove the
> <foo>_DIR completely (so that it's pretty clear that this variable is empty
> if anybody still uses it), and instead use e.g. <foo>_BR_DIR for this
> purpose.
In that case I would prefer something like <foo>_PKG_DIR, instead of BR.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 13:49 ` Thomas De Schampheleire
@ 2013-11-12 15:35 ` Arnout Vandecappelle
2013-11-12 22:06 ` Peter Korsgaard
0 siblings, 1 reply; 16+ messages in thread
From: Arnout Vandecappelle @ 2013-11-12 15:35 UTC (permalink / raw)
To: buildroot
On 12/11/13 14:49, Thomas De Schampheleire wrote:
> On Tue, Nov 12, 2013 at 2:42 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>> On 12/11/13 12:32, Thomas De Schampheleire wrote:
>>>
>>> Hi Thomas,
>>>
>>> On Tue, Nov 12, 2013 at 12:09 PM, Thomas Petazzoni
>>> <thomas.petazzoni@free-electrons.com> wrote:
>>>>
>>>> Dear Thomas De Schampheleire,
>>>>
>>>> On Tue, 12 Nov 2013 09:56:37 +0100, Thomas De Schampheleire wrote:
>>>>
>>>>>> I think it's a better idea to choose a new name - if only to help
>>>>>> people who are using this variable in custom packages. Or better
>>>>>> yet, remove it completely - it's anyway not used anymore.
>>>>>
>>>>>
>>>>> The only remaining place is in the foo-patch block, to get the
>>>>> location of patches for that package.
>>>>> That is outside the inner-generic-package, so we cannot use $(4)
>>>>> anymore. How do you propose to solve that?
>>>>
>>>>
>>>> Currently:
>>>>
>>>> <foo>_DIR => build directory
>>>>
>>>> <foo>_DIR_PREFIX => prefix of the package directory in Buildroot
>>>> sources
>>>>
>>>> <foo>_DL_DIR => location of the package download directory, for
>>>> git/cvs downloads (apparently not used consistently)
>>>>
>>>> I think it would make a lot more sense to have:
>>>>
>>>> <foo>_DIR => points to the package directory in Buildroot sources, e.g
>>>> package/busybox/ for Busybox. This would allow packages
>>>> to easily reference their own directory, to get access to
>>>> configuration files and others, instead of having to know
>>>> they are located in package/busybox/. This could also be
>>>> used in the patching step instead of the DIR_PREFIX thing.
>>
>>
>> As I mentioned before, I would prefer to not reuse the same name with a
>> different meaning, because it may confuse users who have custom
>> modifications that rely on that variable. So instead I'd remove the
>> <foo>_DIR completely (so that it's pretty clear that this variable is empty
>> if anybody still uses it), and instead use e.g. <foo>_BR_DIR for this
>> purpose.
>
> In that case I would prefer something like <foo>_PKG_DIR, instead of BR.
OK.
But for consistency with BUILDDIR and SRCDIR, I'd prefer PKGDIR.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 13:42 ` Arnout Vandecappelle
2013-11-12 13:49 ` Thomas De Schampheleire
@ 2013-11-12 22:05 ` Peter Korsgaard
2013-12-05 14:53 ` Thomas De Schampheleire
2 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2013-11-12 22:05 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
Hi,
> How is that hard?
> I would do what we usually do for new policy: enforce it for new
> packages, but leave it alone for existing packages until someone grows
> tired of the inconsistency and sends a global fixup patch. That also
> has the advantage that we can still change our mind on the short term
> without needing to change things all over the place again.
> That said, I think that using package/foo in the .mk file is a lot
> clearer than $(FOO_XXXDIR).
Agreed. We already have a bunch of magic variable names in BR, so lets
not enforce more than needed.
>>> <foo>_DL_DIR => same as before.
>>
>> In general, I think the new variable names make sense.
> +1.
+1
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 15:35 ` Arnout Vandecappelle
@ 2013-11-12 22:06 ` Peter Korsgaard
0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2013-11-12 22:06 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
>>> As I mentioned before, I would prefer to not reuse the same name with a
>>> different meaning, because it may confuse users who have custom
>>> modifications that rely on that variable. So instead I'd remove the
>>> <foo>_DIR completely (so that it's pretty clear that this variable is empty
>>> if anybody still uses it), and instead use e.g. <foo>_BR_DIR for this
>>> purpose.
>>
>> In that case I would prefer something like <foo>_PKG_DIR, instead of BR.
> OK.
> But for consistency with BUILDDIR and SRCDIR, I'd prefer PKGDIR.
Or <foo>_BUILD_DIR / _SRC_DIR.
</bikeshed>
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-11-12 13:42 ` Arnout Vandecappelle
2013-11-12 13:49 ` Thomas De Schampheleire
2013-11-12 22:05 ` Peter Korsgaard
@ 2013-12-05 14:53 ` Thomas De Schampheleire
2013-12-15 13:14 ` Thomas De Schampheleire
2 siblings, 1 reply; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-12-05 14:53 UTC (permalink / raw)
To: buildroot
Thomas,
On Tue, Nov 12, 2013 at 2:42 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
[..]
>>
>>>
>>> <foo>_BUILDDIR => points to the package build directory in $(BUILD_DIR)
>>>
>>> <foo>_SRCDIR => points to the package source directory (currently
>>> identical to <foo>_BUILDDIR, would change when we
>>> introduce OOT build for packages). Actually, more than
>>> half of the patch set I have to introduce OOT is about
>>> using <foo>_SRCDIR vs <foo>_BUILDDIR in the right
>>> places.
>>>
>>> <foo>_DL_DIR => same as before.
>>
>>
>> In general, I think the new variable names make sense.
>
>
> +1.
>
> ThomasP, perhaps you can resubmit the patches for <foo>_SRCDIR vs
> <foo>_BUILDDIR, since they can be applied independently of OOT.
>
Thomas, could you resubmit or point me to these patches? Is it work in
progress or pretty much ready?
I'm going to take up this patch series during this release cycle...
Thanks,
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir
2013-12-05 14:53 ` Thomas De Schampheleire
@ 2013-12-15 13:14 ` Thomas De Schampheleire
0 siblings, 0 replies; 16+ messages in thread
From: Thomas De Schampheleire @ 2013-12-15 13:14 UTC (permalink / raw)
To: buildroot
All,
On Thu, Dec 5, 2013 at 3:53 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> Thomas,
>
> On Tue, Nov 12, 2013 at 2:42 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> [..]
>>>
>>>>
>>>> <foo>_BUILDDIR => points to the package build directory in $(BUILD_DIR)
>>>>
>>>> <foo>_SRCDIR => points to the package source directory (currently
>>>> identical to <foo>_BUILDDIR, would change when we
>>>> introduce OOT build for packages). Actually, more than
>>>> half of the patch set I have to introduce OOT is about
>>>> using <foo>_SRCDIR vs <foo>_BUILDDIR in the right
>>>> places.
>>>>
>>>> <foo>_DL_DIR => same as before.
>>>
>>>
>>> In general, I think the new variable names make sense.
>>
>>
>> +1.
>>
>> ThomasP, perhaps you can resubmit the patches for <foo>_SRCDIR vs
>> <foo>_BUILDDIR, since they can be applied independently of OOT.
>>
>
> Thomas, could you resubmit or point me to these patches? Is it work in
> progress or pretty much ready?
>
> I'm going to take up this patch series during this release cycle...
Looking again to this, there already is a FOO_SRCDIR and FOO_BUILDDIR:
$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME)
$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME)
$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR)
$(2)_BUILDDIR ?= $$($(2)_SRCDIR)
There may be some overlay between FOO_DIR and FOO_SRCDIR, which is
identical for many packages (those that do not have FOO_SUBDIR set).
Additionally, the naming policy is not uniform now (underscores). We
could either keep it as it is, or rename SRCDIR to SRC_DIR and
BUILDDIR to BUILD_DIR. There are only very few occurrences of these
variables, so it is certainly doable. However, there is also
FOO_OVERRIDE_SRCDIR which is something visible externally and may be
more difficult to change (from a usability perspective).
Inputs?
However, to meet the comments on this particular patch, I think we can simply:
- introduce $(2)_PKGDIR (or $(2)_PKG_DIR, depending on the above discussion)
- remove the fourth parameter to inner-generic package ($(pkgdir)), as
suggested by Arnout
What do you think?
Best regards,
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1 of 2] dhrystone: remove usage of FOO_DIR_PREFIX
2013-11-11 11:53 ` [Buildroot] [PATCH 1 of 2] dhrystone: remove usage of FOO_DIR_PREFIX Thomas De Schampheleire
@ 2014-02-04 13:18 ` Peter Korsgaard
0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2014-02-04 13:18 UTC (permalink / raw)
To: buildroot
On Mon, Nov 11, 2013 at 12:53 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> As the semantics of FOO_DIR_PREFIX will change in the following patch, we
> want to remove unnecessary usage of this variable.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-02-04 13:18 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11 11:53 [Buildroot] [PATCH 0 of 2] infra: remove pkgparentdir Thomas De Schampheleire
2013-11-11 11:53 ` [Buildroot] [PATCH 1 of 2] dhrystone: remove usage of FOO_DIR_PREFIX Thomas De Schampheleire
2014-02-04 13:18 ` Peter Korsgaard
2013-11-11 11:53 ` [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir Thomas De Schampheleire
2013-11-11 23:15 ` Arnout Vandecappelle
2013-11-12 8:56 ` Thomas De Schampheleire
2013-11-12 11:09 ` Thomas Petazzoni
2013-11-12 11:32 ` Thomas De Schampheleire
2013-11-12 13:42 ` Arnout Vandecappelle
2013-11-12 13:49 ` Thomas De Schampheleire
2013-11-12 15:35 ` Arnout Vandecappelle
2013-11-12 22:06 ` Peter Korsgaard
2013-11-12 22:05 ` Peter Korsgaard
2013-12-05 14:53 ` Thomas De Schampheleire
2013-12-15 13:14 ` Thomas De Schampheleire
2013-11-12 13:46 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox