summaryrefslogtreecommitdiffstats
path: root/package/gawk/gawk.mk
blob: 3f790400a55e6c0b6ff60b9da24f31ff9a995f1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
################################################################################
#
# gawk
#
################################################################################

GAWK_VERSION = 4.1.0
GAWK_SITE = $(BR2_GNU_MIRROR)/gawk
GAWK_DEPENDENCIES = host-gawk $(if $(BR2_PACKAGE_MPFR),mpfr)
GAWK_LICENSE = GPLv3+
GAWK_LICENSE_FILES = COPYING

# Prefer full-blown gawk over busybox awk
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
GAWK_DEPENDENCIES += busybox
endif

# We don't have a host-busybox
HOST_GAWK_DEPENDENCIES =

define GAWK_CREATE_SYMLINK
	ln -sf /usr/bin/gawk $(TARGET_DIR)/usr/bin/awk
endef

GAWK_POST_INSTALL_TARGET_HOOKS += GAWK_CREATE_SYMLINK

# Assume we support shared libs
# The check isn't cross-compile friendly and it's mandatory anyway
define GAWK_DISABLE_SHARED_CHECK
	$(SED) 's/ check-for-shared-lib-support//' $(@D)/extension/Makefile.in
endef

GAWK_POST_PATCH_HOOKS += GAWK_DISABLE_SHARED_CHECK

$(eval $(autotools-package))
$(eval $(host-autotools-package))