]> Git Repo - buildroot-mgba.git/blob - package/tar/tar.mk
5f4bd0456624f5662631bd97ff6440670f592eaa
[buildroot-mgba.git] / package / tar / tar.mk
1 #############################################################
2 #
3 # tar
4 #
5 #############################################################
6 GNUTAR_VERSION:=1.18
7 GNUTAR_SOURCE:=tar-$(GNUTAR_VERSION).tar.bz2
8 GNUTAR_SITE:=$(BR2_GNU_MIRROR)/gnu/tar/
9 GNUTAR_DIR:=$(BUILD_DIR)/tar-$(GNUTAR_VERSION)
10 GNUTAR_CAT:=$(BZCAT)
11 GNUTAR_BINARY:=src/tar
12 GNUTAR_TARGET_BINARY:=bin/tar
13
14 $(DL_DIR)/$(GNUTAR_SOURCE):
15          $(WGET) -P $(DL_DIR) $(GNUTAR_SITE)/$(GNUTAR_SOURCE)
16
17 tar-source: $(DL_DIR)/$(GNUTAR_SOURCE)
18
19 $(GNUTAR_DIR)/.unpacked: $(DL_DIR)/$(GNUTAR_SOURCE)
20         $(GNUTAR_CAT) $(DL_DIR)/$(GNUTAR_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
21         toolchain/patch-kernel.sh $(GNUTAR_DIR) package/tar/ tar\*.patch
22         $(CONFIG_UPDATE) $(GNUTAR_DIR)
23         $(CONFIG_UPDATE) $(GNUTAR_DIR)/build-aux
24         touch $@
25
26 $(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
27         (cd $(GNUTAR_DIR); rm -rf config.cache; \
28                 $(TARGET_CONFIGURE_OPTS) \
29                 $(TARGET_CONFIGURE_ARGS) \
30                 ac_cv_func_chown_works=yes \
31                 gl_cv_func_chown_follows_symlink=yes \
32                 ./configure \
33                 --target=$(GNU_TARGET_NAME) \
34                 --host=$(GNU_TARGET_NAME) \
35                 --build=$(GNU_HOST_NAME) \
36                 --prefix=/usr \
37                 --exec-prefix=/usr \
38                 --bindir=/usr/bin \
39                 --sbindir=/usr/sbin \
40                 --libdir=/lib \
41                 --libexecdir=/usr/lib \
42                 --sysconfdir=/etc \
43                 --datadir=/usr/share \
44                 --localstatedir=/var \
45                 --mandir=/usr/man \
46                 --infodir=/usr/info \
47                 $(DISABLE_NLS) \
48                 $(DISABLE_LARGEFILE) \
49         )
50         touch $@
51
52 $(GNUTAR_DIR)/$(GNUTAR_BINARY): $(GNUTAR_DIR)/.configured
53         $(MAKE) -C $(GNUTAR_DIR)
54
55 # This stuff is needed to work around GNU make deficiencies
56 tar-target_binary: $(GNUTAR_DIR)/$(GNUTAR_BINARY)
57         @if [ -L $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) ]; then \
58                 rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
59         fi
60         @if [ ! -f $(GNUTAR_DIR)/$(GNUTAR_BINARY) -o $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) \
61         -ot $(GNUTAR_DIR)/$(GNUTAR_BINARY) ]; then \
62                 set -x; \
63                 rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
64                 cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) \
65                         $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
66         fi
67
68 tar: uclibc tar-target_binary
69
70 tar-clean:
71         $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUTAR_DIR) uninstall
72         -$(MAKE) -C $(GNUTAR_DIR) clean
73
74 tar-dirclean:
75         rm -rf $(GNUTAR_DIR)
76
77 #############################################################
78 #
79 # Toplevel Makefile options
80 #
81 #############################################################
82 ifeq ($(strip $(BR2_PACKAGE_TAR)),y)
83 TARGETS+=tar
84 endif
This page took 0.019602 seconds and 2 git commands to generate.