2003-02-12 11:40:28 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# patch
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
GNUPATCH_SOURCE:=patch-2.5.4.tar.gz
|
|
|
|
GNUPATCH_SITE:=ftp://ftp.gnu.org/pub/gnu/patch
|
|
|
|
GNUPATCH_CAT:=zcat
|
|
|
|
GNUPATCH_DIR:=$(BUILD_DIR)/patch-2.5.4
|
|
|
|
GNUPATCH_BINARY:=patch
|
|
|
|
GNUPATCH_TARGET_BINARY:=usr/bin/patch
|
|
|
|
|
|
|
|
$(DL_DIR)/$(GNUPATCH_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(GNUPATCH_SITE)/$(GNUPATCH_SOURCE)
|
|
|
|
|
|
|
|
patch-source: $(DL_DIR)/$(GNUPATCH_SOURCE)
|
|
|
|
|
|
|
|
$(GNUPATCH_DIR)/.unpacked: $(DL_DIR)/$(GNUPATCH_SOURCE)
|
|
|
|
$(GNUPATCH_CAT) $(DL_DIR)/$(GNUPATCH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
|
|
|
|
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) \
|
2003-11-01 06:34:41 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
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 \
|
|
|
|
--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-02-12 11:40:28 +01:00
|
|
|
);
|
|
|
|
touch $(GNUPATCH_DIR)/.configured
|
|
|
|
|
|
|
|
$(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:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GNUPATCH_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(GNUPATCH_DIR) clean
|
|
|
|
|
|
|
|
patch-dirclean:
|
|
|
|
rm -rf $(GNUPATCH_DIR)
|
|
|
|
|