]> Git Repo - buildroot-mgba.git/blob - package/tar/tar.mk
There is no need to have a separate 'Makefile.in' file in the
[buildroot-mgba.git] / package / tar / tar.mk
1 #############################################################
2 #
3 # tar
4 #
5 #############################################################
6 GNUTAR_VER:=1.15.1
7 GNUTAR_SOURCE:=tar-$(GNUTAR_VER).tar.bz2
8 GNUTAR_SITE:=http://ftp.gnu.org/gnu/tar/
9 GNUTAR_DIR:=$(BUILD_DIR)/tar-$(GNUTAR_VER)
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         touch $(GNUTAR_DIR)/.unpacked
23
24 $(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
25         (cd $(GNUTAR_DIR); rm -rf config.cache; \
26                 $(TARGET_CONFIGURE_OPTS) \
27                 CFLAGS="$(TARGET_CFLAGS)" \
28                 ./configure \
29                 --target=$(GNU_TARGET_NAME) \
30                 --host=$(GNU_TARGET_NAME) \
31                 --build=$(GNU_HOST_NAME) \
32                 --prefix=/usr \
33                 --exec-prefix=/usr \
34                 --bindir=/usr/bin \
35                 --sbindir=/usr/sbin \
36                 --libexecdir=/usr/lib \
37                 --sysconfdir=/etc \
38                 --datadir=/usr/share \
39                 --localstatedir=/var \
40                 --mandir=/usr/man \
41                 --infodir=/usr/info \
42                 $(DISABLE_NLS) \
43                 $(DISABLE_LARGEFILE) \
44         );
45         touch  $(GNUTAR_DIR)/.configured
46
47 $(GNUTAR_DIR)/$(GNUTAR_BINARY): $(GNUTAR_DIR)/.configured
48         $(MAKE) -C $(GNUTAR_DIR)
49
50 # This stuff is needed to work around GNU make deficiencies
51 tar-target_binary: $(GNUTAR_DIR)/$(GNUTAR_BINARY)
52         @if [ -L $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) ] ; then \
53                 rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi;
54         @if [ ! -f $(GNUTAR_DIR)/$(GNUTAR_BINARY) -o $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) \
55         -ot $(GNUTAR_DIR)/$(GNUTAR_BINARY) ] ; then \
56             set -x; \
57             rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
58             cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi ;
59
60 tar: uclibc tar-target_binary
61
62 tar-clean:
63         $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUTAR_DIR) uninstall
64         -$(MAKE) -C $(GNUTAR_DIR) clean
65
66 tar-dirclean:
67         rm -rf $(GNUTAR_DIR)
68
69 #############################################################
70 #
71 # Toplevel Makefile options
72 #
73 #############################################################
74 ifeq ($(strip $(BR2_PACKAGE_TAR)),y)
75 TARGETS+=tar
76 endif
This page took 0.026338 seconds and 4 git commands to generate.