* [Buildroot] [PATCH] Makefile.package.in: Pass non-prefixed name as argument to GENTARGETS_INNER.
@ 2011-07-18 9:46 Quotient Remainder
2011-07-19 18:29 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Quotient Remainder @ 2011-07-18 9:46 UTC (permalink / raw)
To: buildroot
Instead of effectively running s/^host-// on the package name, just pass the
non-prefixed name to GENTARGETS_INNER. This removes the need to ban packages
with names starting with "host-".
Signed-off-by: Quotient Remainder <quotientvremainder@gmail.com>
---
package/Makefile.package.in | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 74087cd..f4d54fe 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -347,6 +347,7 @@ $(BUILD_DIR)/%/.stamp_dircleaned:
# for host packages
# argument 4 is the package directory prefix
# argument 5 is the type (target or host)
+# argument 6 is the lowercase package name without the host- prefix.
################################################################################
define GENTARGETS_INNER
@@ -516,7 +517,7 @@ $$($(2)_TARGET_INSTALL_HOST): PKG=$(2)
$$($(2)_TARGET_BUILD): PKG=$(2)
$$($(2)_TARGET_CONFIGURE): PKG=$(2)
$$($(2)_TARGET_PATCH): PKG=$(2)
-$$($(2)_TARGET_PATCH): RAWNAME=$(patsubst host-%,%,$(1))
+$$($(2)_TARGET_PATCH): RAWNAME=$(6)
$$($(2)_TARGET_EXTRACT): PKG=$(2)
$$($(2)_TARGET_SOURCE): PKG=$(2)
$$($(2)_TARGET_UNINSTALL): PKG=$(2)
@@ -562,10 +563,10 @@ endef # GENTARGETS_INNER
define GENTARGETS
ifeq ($(3),host)
# In the case of host packages, turn the package name "pkg" into "host-pkg"
-$(call GENTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host)
+$(call GENTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host,$(2))
else
# In the case of target packages, keep the package name "pkg"
-$(call GENTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)
+$(call GENTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target,$(2))
endif
endef
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] Makefile.package.in: Pass non-prefixed name as argument to GENTARGETS_INNER.
2011-07-18 9:46 [Buildroot] [PATCH] Makefile.package.in: Pass non-prefixed name as argument to GENTARGETS_INNER Quotient Remainder
@ 2011-07-19 18:29 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2011-07-19 18:29 UTC (permalink / raw)
To: buildroot
Le Mon, 18 Jul 2011 10:46:07 +0100,
Quotient Remainder <quotientvremainder@gmail.com> a ?crit :
> Instead of effectively running s/^host-// on the package name, just
> pass the non-prefixed name to GENTARGETS_INNER. This removes the
> need to ban packages with names starting with "host-".
>
> Signed-off-by: Quotient Remainder <quotientvremainder@gmail.com>
I have taken this patch in my branch dedicated to package
infrastructure improvements, but did the following changes :
* Updated the AUTOTARGETS and CMAKETARGETS infrastructures as well
* Put the new argument in position 2 of GENTARGETS_INNER instead of
the last argument. It requires a lot of renaming inside
GENTARGETS_INNER, but it is a lot cleaner to have arg 1, lowercase
package name with host-, arg 2, lowercase package name without
host-, arg 3 uppercase package name with HOST_, arg 4, uppercase
package name without HOST_
It will be part of an upcoming pull requests with various improvements
to the package infrastructure.
Thanks !
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] 2+ messages in thread
end of thread, other threads:[~2011-07-19 18:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18 9:46 [Buildroot] [PATCH] Makefile.package.in: Pass non-prefixed name as argument to GENTARGETS_INNER Quotient Remainder
2011-07-19 18:29 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox