1 #############################################################
5 #############################################################
7 M4_SOURCE
:=m4-
$(M4_VERSION
).
tar.bz2
9 M4_SITE
:=$(BR2_GNU_MIRROR
)/m4
10 M4_DIR
:=$(BUILD_DIR
)/m4-
$(M4_VERSION
)
11 M4_HOST_DIR
:=$(TOOL_BUILD_DIR
)/m4-
$(M4_VERSION
)
13 M4_TARGET_BINARY
:=usr
/bin
/m4
15 ifeq ($(UCLIBC_HAS_REGEX
),y
)
16 gl_cv_func_re_compile_pattern_working
=gl_cv_func_re_compile_pattern_working
=yes
18 ifneq ($(UCLIBC_HAS_WCHAR
),y
)
19 gt_cv_c_wchar_t
=gt_cv_c_wchar_t
=no
20 gl_cv_absolute_wchar_h
=gl_cv_absolute_wchar_h
=__fpending.h
23 $(DL_DIR
)/$(M4_SOURCE
):
24 $(WGET
) -P
$(DL_DIR
) $(M4_SITE
)/$(M4_SOURCE
)
26 $(M4_DIR
)/.unpacked
: $(DL_DIR
)/$(M4_SOURCE
)
27 $(M4_CAT
) $(DL_DIR
)/$(M4_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
28 toolchain
/patch-kernel.sh
$(M4_DIR
) package
/m4 m4\
*.patch
29 $(CONFIG_UPDATE
) $(@D
)
32 $(M4_DIR
)/.configured
: $(M4_DIR
)/.unpacked
33 (cd
$(M4_DIR
); rm -rf config.cache
; \
34 gl_cv_func_gettimeofday_clobber
=no \
35 $(gl_cv_func_re_compile_pattern_working
) \
37 $(gl_cv_absolute_wchar_h
) \
38 $(AUTO_CONFIGURE_TARGET
) \
41 $(DISABLE_LARGEFILE
) \
45 $(M4_DIR
)/src
/$(M4_BINARY
): $(M4_DIR
)/.configured
48 $(TARGET_DIR
)/$(M4_TARGET_BINARY
): $(M4_DIR
)/src
/$(M4_BINARY
)
49 $(MAKE
) -C
$(M4_DIR
) DESTDIR
=$(TARGET_DIR
) install
50 ifneq ($(BR2_HAVE_INFOPAGES
),y
)
51 rm -rf
$(TARGET_DIR
)/usr
/share
/info
53 ifneq ($(BR2_HAVE_MANPAGES
),y
)
54 rm -rf
$(TARGET_DIR
)/usr
/share
/man
56 rm -rf
$(TARGET_DIR
)/share
/locale
57 rm -rf
$(TARGET_DIR
)/usr
/share
/doc
58 $(STRIPCMD
) $(STRIP_STRIP_ALL
) $(TARGET_DIR
)/$(M4_TARGET_BINARY
)
60 m4
: uclibc
$(TARGET_DIR
)/$(M4_TARGET_BINARY
)
62 m4-source
: $(DL_DIR
)/$(M4_SOURCE
)
65 -$(MAKE
) -C
$(M4_DIR
) clean
66 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(M4_DIR
) uninstall
71 #############################################################
75 #############################################################
77 $(M4_HOST_DIR
)/.unpacked
: $(DL_DIR
)/$(M4_SOURCE
)
78 $(M4_CAT
) $(DL_DIR
)/$(M4_SOURCE
) |
tar -C
$(TOOL_BUILD_DIR
) $(TAR_OPTIONS
) -
79 toolchain
/patch-kernel.sh
$(M4_HOST_DIR
) package
/m4 m4\
*.patch
80 $(CONFIG_UPDATE
) $(@D
)
83 $(M4_HOST_DIR
)/.configured
: $(M4_HOST_DIR
)/.unpacked
84 (cd
$(M4_HOST_DIR
); rm -rf config.cache
; \
85 $(HOST_CONFIGURE_OPTS
) \
86 CFLAGS
="$(HOST_CFLAGS)" \
87 LDFLAGS
="$(HOST_LDFLAGS)" \
88 gl_cv_func_gettimeofday_clobber
=no \
89 $(gl_cv_func_re_compile_pattern_working
) \
91 --prefix=$(STAGING_DIR
)/usr \
92 $(DISABLE_LARGEFILE
) \
96 $(M4_HOST_DIR
)/src
/$(M4_BINARY
): $(M4_HOST_DIR
)/.configured
97 $(MAKE
) -C
$(M4_HOST_DIR
)
99 $(STAGING_DIR
)/$(M4_TARGET_BINARY
): $(M4_HOST_DIR
)/src
/$(M4_BINARY
)
100 $(MAKE
) -C
$(M4_HOST_DIR
) install
102 host-m4
: uclibc
$(STAGING_DIR
)/$(M4_TARGET_BINARY
)
105 $(MAKE
) -C
$(M4_HOST_DIR
) uninstall
106 -$(MAKE
) -C
$(M4_HOST_DIR
) clean
109 rm -rf
$(M4_HOST_DIR
)
111 #############################################################
113 # Toplevel Makefile options
115 #############################################################
116 ifeq ($(BR2_PACKAGE_M4
),y
)