From 0849e8193ef429f29945b8c2a54eafc8635e0969 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 29 Sep 2011 21:57:42 +0200 Subject: 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 Signed-off-by: Peter Korsgaard --- package/Makefile.package.in | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'package/Makefile.package.in') 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 -- cgit v1.2.3