2003-02-12 11:40:28 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# patch
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
GNUPATCH_VERSION:=2.5.9
|
|
|
|
GNUPATCH_SOURCE:=patch_$(GNUPATCH_VERSION).orig.tar.gz
|
2007-12-27 13:00:12 +01:00
|
|
|
GNUPATCH_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/p/patch
|
2006-10-01 17:17:52 +02:00
|
|
|
GNUPATCH_CAT:=$(ZCAT)
|
2007-07-11 16:06:06 +02:00
|
|
|
GNUPATCH_DIR:=$(BUILD_DIR)/patch-$(GNUPATCH_VERSION)
|
2003-02-12 11:40:28 +01:00
|
|
|
GNUPATCH_BINARY:=patch
|
|
|
|
GNUPATCH_TARGET_BINARY:=usr/bin/patch
|
|
|
|
|
|
|
|
$(DL_DIR)/$(GNUPATCH_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(GNUPATCH_SITE),$(GNUPATCH_SOURCE))
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
patch-source: $(DL_DIR)/$(GNUPATCH_SOURCE)
|
|
|
|
|
|
|
|
$(GNUPATCH_DIR)/.unpacked: $(DL_DIR)/$(GNUPATCH_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(GNUPATCH_CAT) $(DL_DIR)/$(GNUPATCH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-08-19 23:44:58 +02:00
|
|
|
$(CONFIG_UPDATE) $(GNUPATCH_DIR)
|
2003-02-12 11:40:28 +01:00
|
|
|
touch $(GNUPATCH_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(GNUPATCH_DIR)/.configured: $(GNUPATCH_DIR)/.unpacked
|
|
|
|
(cd $(GNUPATCH_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) \
|
2003-02-12 11:40:28 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-02-12 11:40:28 +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-12 11:40:28 +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
|
|
|
)
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(GNUPATCH_DIR)/.configured
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
$(GNUPATCH_DIR)/$(GNUPATCH_BINARY): $(GNUPATCH_DIR)/.configured
|
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(GNUPATCH_DIR)
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY): $(GNUPATCH_DIR)/$(GNUPATCH_BINARY)
|
2003-06-27 21:01:12 +02:00
|
|
|
rm -f $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
|
2003-02-12 11:40:28 +01:00
|
|
|
cp -a $(GNUPATCH_DIR)/$(GNUPATCH_BINARY) $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
|
|
|
|
|
|
|
|
patch: uclibc $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
|
|
|
|
|
|
|
|
patch-clean:
|
2007-08-19 23:44:58 +02:00
|
|
|
rm -f $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
|
2003-02-12 11:40:28 +01:00
|
|
|
|
|
|
|
patch-dirclean:
|
|
|
|
rm -rf $(GNUPATCH_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_PATCH),y)
|
2005-02-10 04:06:39 +01:00
|
|
|
TARGETS+=patch
|
|
|
|
endif
|