Commit 300f9c9c authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

package: remove useless arguments from AUTOTARGETS



Thanks to the pkgparentdir and pkgname functions, we can rewrite the
AUTOTARGETS 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: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 0849e819
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,4 +82,4 @@ define GRUB_UNINSTALL_TARGET_CMDS
	rm -rf $(TARGET_DIR)/boot/grub
endef

$(eval $(call AUTOTARGETS,boot,grub))
$(eval $(call AUTOTARGETS))
+4 −6
Original line number Diff line number Diff line
@@ -294,15 +294,13 @@ endef
################################################################################
# AUTOTARGETS -- the target generator macro for autotools 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 AUTOTARGETS
ifeq ($(3),host)
$(call AUTOTARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host)
ifeq ($(1),host)
$(call AUTOTARGETS_INNER,$(1)-$(call pkgname),$(call UPPERCASE,$(1)-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host)
else
$(call AUTOTARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)
$(call AUTOTARGETS_INNER,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target)
endif
endef
+1 −1
Original line number Diff line number Diff line
@@ -25,4 +25,4 @@ ACL_INSTALL_TARGET_OPT = \
	exec_prefix=$(TARGET_DIR)/usr 		\
	install install-lib

$(eval $(call AUTOTARGETS,package,acl))
$(eval $(call AUTOTARGETS))
+1 −1
Original line number Diff line number Diff line
@@ -14,5 +14,5 @@ ALSAMIXERGUI_CONF_ENV = ac_cv_lib_fltk_numericsort=yes \

ALSAMIXERGUI_DEPENDENCIES = fltk alsa-lib

$(eval $(call AUTOTARGETS,package,alsamixergui))
$(eval $(call AUTOTARGETS))
+1 −1
Original line number Diff line number Diff line
@@ -18,4 +18,4 @@ define ARGP_STANDALONE_INSTALL_TARGET_CMDS
	$(INSTALL) -D $(@D)/argp.h $(TARGET_DIR)/usr/include/argp.h
endef

$(eval $(call AUTOTARGETS,package,argp-standalone))
$(eval $(call AUTOTARGETS))
Loading