Remove pcmcia from packages
[gumsense-br.git] / package / m4 / m4.mk
blobf1dd2d15241c05f4876c8d6090ad2fcb8e9704f7
1 #############################################################
3 # m4
5 #############################################################
6 M4_VER:=1.4.4
7 M4_SOURCE:=m4-$(M4_VER).tar.bz2
8 M4_SITE:=ftp://ftp.gnu.org/gnu/m4
9 M4_CAT:=bzcat
10 M4_DIR:=$(BUILD_DIR)/m4-$(M4_VER)
11 M4_BINARY:=m4
12 M4_TARGET_BINARY:=usr/bin/m4
14 $(DL_DIR)/$(M4_SOURCE):
15 $(WGET) -P $(DL_DIR) $(M4_SITE)/$(M4_SOURCE)
17 m4-source: $(DL_DIR)/$(M4_SOURCE)
19 $(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE)
20 $(M4_CAT) $(DL_DIR)/$(M4_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
21 touch $(M4_DIR)/.unpacked
23 $(M4_DIR)/.configured: $(M4_DIR)/.unpacked
24 (cd $(M4_DIR); rm -rf config.cache; \
25 $(TARGET_CONFIGURE_OPTS) \
26 CFLAGS="$(TARGET_CFLAGS)" \
27 ./configure \
28 --target=$(GNU_TARGET_NAME) \
29 --host=$(GNU_TARGET_NAME) \
30 --build=$(GNU_HOST_NAME) \
31 --prefix=/usr \
32 --exec-prefix=/usr \
34 touch $(M4_DIR)/.configured
36 $(M4_DIR)/src/$(M4_BINARY): $(M4_DIR)/.configured
37 $(MAKE) CC=$(TARGET_CC) -C $(M4_DIR)
39 $(TARGET_DIR)/$(M4_TARGET_BINARY): $(M4_DIR)/src/$(M4_BINARY)
40 $(MAKE) \
41 prefix=$(TARGET_DIR)/usr \
42 exec_prefix=$(TARGET_DIR)/usr \
43 bindir=$(TARGET_DIR)/usr/bin \
44 sbindir=$(TARGET_DIR)/usr/sbin \
45 libexecdir=$(TARGET_DIR)/usr/lib \
46 datadir=$(TARGET_DIR)/usr/share \
47 sysconfdir=$(TARGET_DIR)/etc \
48 localstatedir=$(TARGET_DIR)/var \
49 libdir=$(TARGET_DIR)/usr/lib \
50 infodir=$(TARGET_DIR)/usr/info \
51 mandir=$(TARGET_DIR)/usr/man \
52 includedir=$(TARGET_DIR)/usr/include \
53 -C $(M4_DIR) install;
54 $(STRIP) $(TARGET_DIR)/$(M4_TARGET_BINARY) > /dev/null 2>&1
55 rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
56 $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
58 m4: uclibc $(TARGET_DIR)/$(M4_TARGET_BINARY)
60 m4-clean:
61 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(M4_DIR) uninstall
62 -$(MAKE) -C $(M4_DIR) clean
64 m4-dirclean:
65 rm -rf $(M4_DIR)
67 #############################################################
69 # Toplevel Makefile options
71 #############################################################
72 ifeq ($(strip $(BR2_PACKAGE_M4)),y)
73 TARGETS+=m4
74 endif