kumquat-buildroot/package/getent/getent.mk
Arnout Vandecappelle 7f971ecf72 getent: look for glibc's getent in more places
External toolchains don't always install the executable in /usr/bin -
God knows why. So check in a few more places.

We can use make's $(wildcard ...) here, because the variable only gets
expanded when the install step is executed, and by that time the
STAGING_DIR has already been installed.

Probably fixes most getent autobuilder errors, at least if fixes
http://autobuild.buildroot.net/results/615b9d17f713b4a53192efb00188560a76b9efa3/

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-16 11:01:45 +02:00

31 lines
906 B
Makefile

################################################################################
#
# getent
#
################################################################################
# source included in Buildroot
GETENT_SOURCE =
GETENT_VERSION = buildroot-$(BR2_VERSION)
GETENT_LICENSE = LGPLv2.1+
# For glibc toolchains, we use the getent program built/installed by
# the C library. For other toolchains, we use the wrapper script
# included in this package.
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
# Sourcery toolchains install it in sysroot/usr/lib/bin
# Buildroot toolchains install it in sysroot/usr/bin
GETENT_LOCATION = $(firstword $(wildcard \
$(STAGING_DIR)/usr/bin/getent \
$(STAGING_DIR)/usr/lib/bin/getent))
else
GETENT_LOCATION = package/getent/getent
endif
define GETENT_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(GETENT_LOCATION) $(TARGET_DIR)/usr/bin/getent
endef
$(eval $(generic-package))