2003-01-09 03:34:10 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# m4
|
|
|
|
#
|
|
|
|
#############################################################
|
2009-03-23 22:46:47 +01:00
|
|
|
M4_VERSION = 1.4.9
|
|
|
|
M4_SOURCE = m4-$(M4_VERSION).tar.bz2
|
|
|
|
M4_SITE = $(BR2_GNU_MIRROR)/m4
|
2003-01-09 03:34:10 +01:00
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
ifeq ($(BR2_ENABLE_DEBUG),y) # no install-exec
|
|
|
|
M4_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
|
2007-07-07 12:11:17 +02:00
|
|
|
endif
|
2007-04-16 20:51:20 +02:00
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
M4_CONF_ENV = gl_cv_func_gettimeofday_clobber=no
|
2003-01-09 03:34:10 +01:00
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
ifneq ($(BR2_USE_WCHAR),y)
|
|
|
|
M4_CONF_ENV += gt_cv_c_wchar_t=no gl_cv_absolute_wchar_h=__fpending.h
|
2007-09-17 14:30:31 +02:00
|
|
|
endif
|
2003-01-09 03:34:10 +01:00
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
$(eval $(call AUTOTARGETS,package,m4))
|
2003-01-09 03:34:10 +01:00
|
|
|
|
2007-07-05 19:54:38 +02:00
|
|
|
# m4 for the host
|
2009-03-23 22:46:47 +01:00
|
|
|
M4_HOST_DIR:=$(BUILD_DIR)/m4-$(M4_VERSION)-host
|
2007-07-05 19:54:38 +02:00
|
|
|
|
2009-03-26 20:21:02 +01:00
|
|
|
$(DL_DIR)/$(M4_SOURCE):
|
|
|
|
$(call DOWNLOAD,$(M4_SITE),$(M4_SOURCE))
|
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
$(STAMP_DIR)/host_m4_unpacked: $(DL_DIR)/$(M4_SOURCE)
|
|
|
|
mkdir -p $(M4_HOST_DIR)
|
|
|
|
$(INFLATE$(suffix $(M4_SOURCE))) $< | \
|
|
|
|
$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(M4_HOST_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh $(M4_HOST_DIR) package/m4/ \*.patch
|
2007-07-05 19:54:38 +02:00
|
|
|
touch $@
|
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
$(STAMP_DIR)/host_m4_configured: $(STAMP_DIR)/host_m4_unpacked
|
2007-07-05 19:54:38 +02:00
|
|
|
(cd $(M4_HOST_DIR); rm -rf config.cache; \
|
|
|
|
$(HOST_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(HOST_CFLAGS)" \
|
|
|
|
LDFLAGS="$(HOST_LDFLAGS)" \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2009-03-23 22:46:47 +01:00
|
|
|
--prefix="$(HOST_DIR)/usr" \
|
|
|
|
--sysconfdir="$(HOST_DIR)/etc" \
|
|
|
|
--disable-static \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-07-05 19:54:38 +02:00
|
|
|
touch $@
|
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
$(STAMP_DIR)/host_m4_compiled: $(STAMP_DIR)/host_m4_configured
|
2007-07-05 19:54:38 +02:00
|
|
|
$(MAKE) -C $(M4_HOST_DIR)
|
2009-03-23 22:46:47 +01:00
|
|
|
touch $@
|
2007-07-05 19:54:38 +02:00
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
$(STAMP_DIR)/host_m4_installed: $(STAMP_DIR)/host_m4_compiled
|
2007-08-21 21:20:18 +02:00
|
|
|
$(MAKE) -C $(M4_HOST_DIR) install
|
2009-03-23 22:46:47 +01:00
|
|
|
touch $@
|
2007-07-05 19:54:38 +02:00
|
|
|
|
2009-03-23 22:46:47 +01:00
|
|
|
host-m4: $(STAMP_DIR)/host_m4_installed
|
2007-07-05 19:54:38 +02:00
|
|
|
|
|
|
|
host-m4-clean:
|
2009-03-23 22:46:47 +01:00
|
|
|
rm -f $(addprefix $(STAMP_DIR)/host_m4_,unpacked configured compiled installed)
|
|
|
|
-$(MAKE) -C $(M4_HOST_DIR) uninstall
|
2007-07-05 19:54:38 +02:00
|
|
|
-$(MAKE) -C $(M4_HOST_DIR) clean
|
|
|
|
|
|
|
|
host-m4-dirclean:
|
|
|
|
rm -rf $(M4_HOST_DIR)
|