0849e8193e
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>
36 lines
896 B
Makefile
36 lines
896 B
Makefile
#############################################################
|
|
#
|
|
# mii-diag
|
|
#
|
|
#############################################################
|
|
MII_DIAG_VERSION = 2.11
|
|
MII_DIAG_SOURCE = mii-diag_$(MII_DIAG_VERSION).orig.tar.gz
|
|
MII_DIAG_PATCH = mii-diag_$(MII_DIAG_VERSION)-3.diff.gz
|
|
MII_DIAG_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
|
|
|
|
define MII_DIAG_DEBIAN_PATCHES
|
|
if [ -d $(@D)/debian/patches ]; then \
|
|
support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
|
|
fi
|
|
endef
|
|
|
|
MII_DIAG_POST_PATCH_HOOKS = MII_DIAG_DEBIAN_PATCHES
|
|
|
|
define MII_DIAG_BUILD_CMDS
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
|
|
endef
|
|
|
|
define MII_DIAG_INSTALL_TARGET_CMDS
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
|
|
endef
|
|
|
|
define MII_DIAG_UNINSTALL_TARGET_CMDS
|
|
rm -f $(TARGET_DIR)/usr/sbin/mii-diag
|
|
endef
|
|
|
|
define MII_DIAG_CLEAN_CMDS
|
|
$(MAKE) -C $(@D) clean
|
|
endef
|
|
|
|
$(eval $(call GENTARGETS))
|