add USE_* variables to the makefiles
[openwrt.git] / obsolete-buildroot / make / tar.mk
1 #############################################################
2 #
3 # tar
4 #
5 #############################################################
6 GNUTAR_SOURCE:=tar-1.13.25.tar.gz
7 GNUTAR_SITE:=ftp://alpha.gnu.org/gnu/tar
8 GNUTAR_DIR:=$(BUILD_DIR)/tar-1.13.25
9 GNUTAR_CAT:=zcat
10 GNUTAR_BINARY:=src/tar
11 GNUTAR_TARGET_BINARY:=bin/tar
12
13 $(DL_DIR)/$(GNUTAR_SOURCE):
14 $(WGET) -P $(DL_DIR) $(GNUTAR_SITE)/$(GNUTAR_SOURCE)
15
16 tar-source: $(DL_DIR)/$(GNUTAR_SOURCE)
17
18 $(GNUTAR_DIR)/.unpacked: $(DL_DIR)/$(GNUTAR_SOURCE)
19 $(GNUTAR_CAT) $(DL_DIR)/$(GNUTAR_SOURCE) | tar -C $(BUILD_DIR) -xvf -
20 touch $(GNUTAR_DIR)/.unpacked
21
22 $(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
23 (cd $(GNUTAR_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 --bindir=/usr/bin \
33 --sbindir=/usr/sbin \
34 --libexecdir=/usr/lib \
35 --sysconfdir=/etc \
36 --datadir=/usr/share \
37 --localstatedir=/var \
38 --mandir=/usr/man \
39 --infodir=/usr/info \
40 $(DISABLE_NLS) \
41 $(DISABLE_LARGEFILE) \
42 );
43 touch $(GNUTAR_DIR)/.configured
44
45 $(GNUTAR_DIR)/$(GNUTAR_BINARY): $(GNUTAR_DIR)/.configured
46 $(MAKE) -C $(GNUTAR_DIR)
47
48 # This stuff is needed to work around GNU make deficiencies
49 tar-target_binary: $(GNUTAR_DIR)/$(GNUTAR_BINARY)
50 @if [ -L $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) ] ; then \
51 rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi;
52 @if [ ! -f $(GNUTAR_DIR)/$(GNUTAR_BINARY) -o $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) \
53 -ot $(GNUTAR_DIR)/$(GNUTAR_BINARY) ] ; then \
54 set -x; \
55 rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
56 cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi ;
57
58 tar: uclibc tar-target_binary
59
60 tar-clean:
61 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUTAR_DIR) uninstall
62 -$(MAKE) -C $(GNUTAR_DIR) clean
63
64 tar-dirclean:
65 rm -rf $(GNUTAR_DIR)
66
This page took 0.042151 seconds and 5 git commands to generate.