aboutsummaryrefslogtreecommitdiffstats
path: root/package/flex/flex.mk
blob: 43e7d5717fdbb3961cff69a5756dfa8e631b7920 (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
37
38
39
40
41
#############################################################
#
# flex
#
#############################################################
FLEX_VERSION:=2.5.35
FLEX_PATCH_VERSION:=9
FLEX_SOURCE:=flex_$(FLEX_VERSION).orig.tar.gz
FLEX_PATCH:=flex_$(FLEX_VERSION)-$(FLEX_PATCH_VERSION).diff.gz
FLEX_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/f/flex
FLEX_DIR:=$(BUILD_DIR)/flex-$(FLEX_VERSION)
FLEX_INSTALL_STAGING=YES

# lex -> flex
define FLEX_INSTALL_LEX
cd $(TARGET_DIR)/usr/bin && ln -snf flex lex
endef

define FLEX_UNINSTALL_LEX
-rm $(TARGET_DIR)/usr/bin/lex
endef

FLEX_POST_INSTALL_HOOKS += FLEX_INSTALL_LEX
FLEX_POST_CLEAN_HOOKS += FLEX_UNINSTALL_LEX

# libfl installation
ifeq ($(BR2_PACKAGE_FLEX_LIBFL),y)
define FLEX_INSTALL_LIBFL
install -D $(FLEX_DIR)/libfl.a $(STAGING_DIR)/usr/lib/libfl.a
endef

define FLEX_UNINSTALL_LIBFL
-rm $(STAGING_DIR)/lib/libfl.a
endef

FLEX_POST_INSTALL_HOOKS += FLEX_INSTALL_LIBFL
FLEX_POST_CLEAN_HOOKS += FLEX_UNINSTALL_LIBFL
endif

$(eval $(call AUTOTARGETS,package,flex))
$(eval $(call AUTOTARGETS,package,flex,host))