2003-01-09 03:34:10 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# m4
|
|
|
|
#
|
|
|
|
#############################################################
|
2004-10-11 22:42:53 +02:00
|
|
|
M4_VER:=1.4
|
|
|
|
M4_SOURCE:=m4-$(M4_VER).tar.gz
|
2003-01-09 03:34:10 +01:00
|
|
|
M4_SITE:=ftp://ftp.gnu.org/gnu/m4
|
|
|
|
M4_CAT:=zcat
|
2004-10-11 22:42:53 +02:00
|
|
|
M4_DIR:=$(BUILD_DIR)/m4-$(M4_VER)
|
2003-01-09 03:34:10 +01:00
|
|
|
M4_BINARY:=m4
|
|
|
|
M4_TARGET_BINARY:=usr/bin/m4
|
|
|
|
|
|
|
|
$(DL_DIR)/$(M4_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(M4_SITE)/$(M4_SOURCE)
|
|
|
|
|
|
|
|
m4-source: $(DL_DIR)/$(M4_SOURCE)
|
|
|
|
|
|
|
|
$(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(M4_CAT) $(DL_DIR)/$(M4_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2003-01-09 03:34:10 +01:00
|
|
|
touch $(M4_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(M4_DIR)/.configured: $(M4_DIR)/.unpacked
|
2003-01-17 09:03:59 +01:00
|
|
|
(cd $(M4_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2003-11-01 06:34:41 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2003-01-17 09:03:59 +01:00
|
|
|
./configure \
|
2003-01-09 03:34:10 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-01-09 03:34:10 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
);
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(M4_DIR)/.configured
|
2003-01-09 03:34:10 +01:00
|
|
|
|
|
|
|
$(M4_DIR)/src/$(M4_BINARY): $(M4_DIR)/.configured
|
2003-01-19 07:07:22 +01:00
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(M4_DIR)
|
2003-01-09 03:34:10 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(M4_TARGET_BINARY): $(M4_DIR)/src/$(M4_BINARY)
|
|
|
|
$(MAKE) \
|
|
|
|
prefix=$(TARGET_DIR)/usr \
|
|
|
|
exec_prefix=$(TARGET_DIR)/usr \
|
|
|
|
bindir=$(TARGET_DIR)/usr/bin \
|
|
|
|
sbindir=$(TARGET_DIR)/usr/sbin \
|
|
|
|
libexecdir=$(TARGET_DIR)/usr/lib \
|
|
|
|
datadir=$(TARGET_DIR)/usr/share \
|
|
|
|
sysconfdir=$(TARGET_DIR)/etc \
|
|
|
|
localstatedir=$(TARGET_DIR)/var \
|
|
|
|
libdir=$(TARGET_DIR)/usr/lib \
|
|
|
|
infodir=$(TARGET_DIR)/usr/info \
|
|
|
|
mandir=$(TARGET_DIR)/usr/man \
|
|
|
|
includedir=$(TARGET_DIR)/usr/include \
|
|
|
|
-C $(M4_DIR) install;
|
2003-11-01 06:34:41 +01:00
|
|
|
$(STRIP) $(TARGET_DIR)/$(M4_TARGET_BINARY) > /dev/null 2>&1
|
2003-02-14 13:20:38 +01:00
|
|
|
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
|
|
|
|
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
|
2003-01-09 03:34:10 +01:00
|
|
|
|
|
|
|
m4: uclibc $(TARGET_DIR)/$(M4_TARGET_BINARY)
|
|
|
|
|
|
|
|
m4-clean:
|
2003-01-19 07:07:22 +01:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(M4_DIR) uninstall
|
2003-01-17 09:03:59 +01:00
|
|
|
-$(MAKE) -C $(M4_DIR) clean
|
2003-01-09 03:34:10 +01:00
|
|
|
|
|
|
|
m4-dirclean:
|
|
|
|
rm -rf $(M4_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_M4)),y)
|
|
|
|
TARGETS+=m4
|
|
|
|
endif
|