buildrootschalter/package/iputils/iputils.mk
Thomas De Schampheleire 0518a98ac3 packages: rename FOO_MAKE_OPT into FOO_MAKE_OPTS
While the autotools infrastructure was using FOO_MAKE_OPT, generic packages
were typically using FOO_MAKE_OPTS. This inconsistency becomes a problem
when a new infrastructure is introduced that wants to make use of
FOO_MAKE_OPT(S), and can live alongside either generic-package or
autotools-package. The new infrastructure will have to choose between either
OPT or OPTS, and thus rule out transparent usage by respectively generic
packages or generic packages. An example of such an infrastructure is
kconfig-package, which provides kconfig-related make targets.

The OPTS variant is more logical, as there are typically multiple options.

This patch renames all occurrences of FOO_MAKE_OPT in FOO_MAKE_OPTS.
Sed command used:
    find * -type f | xargs sed -i 's#_MAKE_OPT\>#&S#g'

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-04 15:07:23 +02:00

54 lines
1.8 KiB
Makefile

################################################################################
#
# iputils
#
################################################################################
IPUTILS_VERSION = s20121011
IPUTILS_SITE = http://www.skbuff.net/iputils
IPUTILS_SOURCE = iputils-$(IPUTILS_VERSION).tar.bz2
IPUTILS_LICENSE = GPLv2+ BSD-3c
# Only includes a license file for BSD
IPUTILS_LICENSE_FILES = ninfod/COPYING
# Build after busybox so target ends up with this package's full
# versions of the applications instead of busybox applets.
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
IPUTILS_DEPENDENCIES += busybox
endif
# Disabling CAP_SETPCAP (file capabilities)
IPUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) USE_CAP=no USE_SYSFS=no\
CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
arping clockdiff ping rarpd rdisc tftpd tracepath
ifeq ($(BR2_INET_IPV6),y)
# To support md5 for ping6
IPUTILS_DEPENDENCIES += openssl
IPUTILS_MAKE_OPTS += ping6 tracepath6 traceroute6
define IPUTILS_IPV6_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 755 $(@D)/ping6 $(TARGET_DIR)/bin/ping6
$(INSTALL) -D -m 755 $(@D)/tracepath6 $(TARGET_DIR)/bin/tracepath6
$(INSTALL) -D -m 755 $(@D)/traceroute6 $(TARGET_DIR)/bin/traceroute6
endef
endif
define IPUTILS_BUILD_CMDS
$(MAKE) -C $(@D) $(IPUTILS_MAKE_OPTS)
endef
define IPUTILS_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 755 $(@D)/arping $(TARGET_DIR)/sbin/arping
$(INSTALL) -D -m 755 $(@D)/clockdiff $(TARGET_DIR)/bin/clockdiff
$(INSTALL) -D -m 755 $(@D)/ping $(TARGET_DIR)/bin/ping
$(INSTALL) -D -m 755 $(@D)/rarpd $(TARGET_DIR)/sbin/rarpd
$(INSTALL) -D -m 755 $(@D)/rdisc $(TARGET_DIR)/sbin/rdisc
$(INSTALL) -D -m 755 $(@D)/tftpd $(TARGET_DIR)/usr/sbin/in.tftpd
$(INSTALL) -D -m 755 $(@D)/tracepath $(TARGET_DIR)/bin/tracepath
$(IPUTILS_IPV6_INSTALL_TARGET_CMDS)
endef
$(eval $(generic-package))