2003-02-15 11:23:19 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# tar
|
|
|
|
#
|
|
|
|
#############################################################
|
2009-03-01 21:20:20 +01:00
|
|
|
GNUTAR_VERSION:=1.21
|
2007-07-11 16:06:06 +02:00
|
|
|
GNUTAR_SOURCE:=tar-$(GNUTAR_VERSION).tar.bz2
|
2008-03-26 04:28:09 +01:00
|
|
|
GNUTAR_SITE:=$(BR2_GNU_MIRROR)/tar/
|
2007-07-11 16:06:06 +02:00
|
|
|
GNUTAR_DIR:=$(BUILD_DIR)/tar-$(GNUTAR_VERSION)
|
2006-11-17 16:43:51 +01:00
|
|
|
GNUTAR_CAT:=$(BZCAT)
|
2003-02-15 11:23:19 +01:00
|
|
|
GNUTAR_BINARY:=src/tar
|
|
|
|
GNUTAR_TARGET_BINARY:=bin/tar
|
|
|
|
|
|
|
|
$(DL_DIR)/$(GNUTAR_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(GNUTAR_SITE),$(GNUTAR_SOURCE))
|
2003-02-15 11:23:19 +01:00
|
|
|
|
|
|
|
tar-source: $(DL_DIR)/$(GNUTAR_SOURCE)
|
|
|
|
|
|
|
|
$(GNUTAR_DIR)/.unpacked: $(DL_DIR)/$(GNUTAR_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(GNUTAR_CAT) $(DL_DIR)/$(GNUTAR_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-06-24 10:36:13 +02:00
|
|
|
toolchain/patch-kernel.sh $(GNUTAR_DIR) package/tar/ tar\*.patch
|
2008-02-12 01:35:03 +01:00
|
|
|
$(CONFIG_UPDATE) $(GNUTAR_DIR)
|
|
|
|
$(CONFIG_UPDATE) $(GNUTAR_DIR)/build-aux
|
2007-08-28 23:42:44 +02:00
|
|
|
touch $@
|
2003-02-15 11:23:19 +01:00
|
|
|
|
|
|
|
$(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
|
|
|
|
(cd $(GNUTAR_DIR); rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2005-09-13 22:40:59 +02:00
|
|
|
ac_cv_func_chown_works=yes \
|
2005-09-30 22:47:40 +02:00
|
|
|
gl_cv_func_chown_follows_symlink=yes \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2003-02-15 11:23:19 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-02-15 11:23:19 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2003-02-15 11:23:19 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2003-11-17 02:31:38 +01:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-08-28 23:42:44 +02:00
|
|
|
touch $@
|
2003-02-15 11:23:19 +01:00
|
|
|
|
|
|
|
$(GNUTAR_DIR)/$(GNUTAR_BINARY): $(GNUTAR_DIR)/.configured
|
|
|
|
$(MAKE) -C $(GNUTAR_DIR)
|
|
|
|
|
2003-03-06 19:24:00 +01:00
|
|
|
# This stuff is needed to work around GNU make deficiencies
|
|
|
|
tar-target_binary: $(GNUTAR_DIR)/$(GNUTAR_BINARY)
|
2007-08-22 11:56:41 +02:00
|
|
|
@if [ -L $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) ]; then \
|
2007-08-28 23:42:44 +02:00
|
|
|
rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
|
|
|
|
fi
|
2003-12-20 01:22:39 +01:00
|
|
|
@if [ ! -f $(GNUTAR_DIR)/$(GNUTAR_BINARY) -o $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) \
|
2007-08-22 11:56:41 +02:00
|
|
|
-ot $(GNUTAR_DIR)/$(GNUTAR_BINARY) ]; then \
|
2007-08-28 23:42:44 +02:00
|
|
|
set -x; \
|
|
|
|
rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
|
|
|
|
cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) \
|
|
|
|
$(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
|
|
|
|
fi
|
2003-03-06 19:24:00 +01:00
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
tar: tar-target_binary
|
2003-02-15 11:23:19 +01:00
|
|
|
|
|
|
|
tar-clean:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUTAR_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(GNUTAR_DIR) clean
|
|
|
|
|
|
|
|
tar-dirclean:
|
|
|
|
rm -rf $(GNUTAR_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_TAR),y)
|
2005-02-10 04:06:39 +01:00
|
|
|
TARGETS+=tar
|
|
|
|
endif
|