summaryrefslogtreecommitdiff
path: root/package/Makefile.package.in
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-09-29 21:57:42 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-09-29 23:09:58 +0200
commit0849e8193ef429f29945b8c2a54eafc8635e0969 (patch)
tree87934d420647a042d53c0332e15d4d02404b8010 /package/Makefile.package.in
parente055aea216cff4d12cf55eab2e35ca1459edaa91 (diff)
package: remove useless arguments from GENTARGETS
Thanks to the pkgparentdir and pkgname functions, we can rewrite the GENTARGETS macro in a way that avoids the need for each package to repeat its name and the directory in which it is present. [Peter: pkgdir->pkgparentdir] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/Makefile.package.in')
-rw-r--r--package/Makefile.package.in10
1 files changed, 4 insertions, 6 deletions
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index afa8d0e9f..069a86892 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -648,18 +648,16 @@ endef # GENTARGETS_INNER
################################################################################
# GENTARGETS -- the target generator macro for generic packages
#
-# Argument 1 is the package directory prefix [mandatory]
-# Argument 2 is the lowercase package name [mandatory]
-# Argument 3 is "target" or "host" [optional, default: "target"]
+# Argument 1 is "target" or "host" [optional, default: "target"]
################################################################################
define GENTARGETS
-ifeq ($(3),host)
+ifeq ($(1),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,$(1)-$(call pkgname),$(call UPPERCASE,$(1)-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
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,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
endif
endef