moved.
[openwrt.git] / obsolete-buildroot / make / m4.mk
1 #############################################################
2 #
3 # m4
4 #
5 #############################################################
6 M4_SOURCE:=m4-1.4.tar.gz
7 M4_SITE:=ftp://ftp.gnu.org/gnu/m4
8 M4_CAT:=zcat
9 M4_DIR:=$(BUILD_DIR)/m4-1.4
10 M4_BINARY:=m4
11 M4_TARGET_BINARY:=usr/bin/m4
12
13 $(DL_DIR)/$(M4_SOURCE):
14 $(WGET) -P $(DL_DIR) $(M4_SITE)/$(M4_SOURCE)
15
16 m4-source: $(DL_DIR)/$(M4_SOURCE)
17
18 $(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE)
19 $(M4_CAT) $(DL_DIR)/$(M4_SOURCE) | tar -C $(BUILD_DIR) -xvf -
20 touch $(M4_DIR)/.unpacked
21
22 $(M4_DIR)/.configured: $(M4_DIR)/.unpacked
23 (cd $(M4_DIR); rm -rf config.cache; \
24 $(TARGET_CONFIGURE_OPTS) \
25 CFLAGS="$(TARGET_CFLAGS)" \
26 ./configure \
27 --target=$(GNU_TARGET_NAME) \
28 --host=$(GNU_TARGET_NAME) \
29 --build=$(GNU_HOST_NAME) \
30 --prefix=/usr \
31 --exec-prefix=/usr \
32 );
33 touch $(M4_DIR)/.configured
34
35 $(M4_DIR)/src/$(M4_BINARY): $(M4_DIR)/.configured
36 $(MAKE) CC=$(TARGET_CC) -C $(M4_DIR)
37
38 $(TARGET_DIR)/$(M4_TARGET_BINARY): $(M4_DIR)/src/$(M4_BINARY)
39 $(MAKE) \
40 prefix=$(TARGET_DIR)/usr \
41 exec_prefix=$(TARGET_DIR)/usr \
42 bindir=$(TARGET_DIR)/usr/bin \
43 sbindir=$(TARGET_DIR)/usr/sbin \
44 libexecdir=$(TARGET_DIR)/usr/lib \
45 datadir=$(TARGET_DIR)/usr/share \
46 sysconfdir=$(TARGET_DIR)/etc \
47 localstatedir=$(TARGET_DIR)/var \
48 libdir=$(TARGET_DIR)/usr/lib \
49 infodir=$(TARGET_DIR)/usr/info \
50 mandir=$(TARGET_DIR)/usr/man \
51 includedir=$(TARGET_DIR)/usr/include \
52 -C $(M4_DIR) install;
53 $(STRIP) $(TARGET_DIR)/$(M4_TARGET_BINARY) > /dev/null 2>&1
54 rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
55 $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
56
57 m4: uclibc $(TARGET_DIR)/$(M4_TARGET_BINARY)
58
59 m4-clean:
60 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(M4_DIR) uninstall
61 -$(MAKE) -C $(M4_DIR) clean
62
63 m4-dirclean:
64 rm -rf $(M4_DIR)
65
This page took 0.059774 seconds and 5 git commands to generate.