kumquat-buildroot/package/patch/patch.mk

71 lines
2.0 KiB
Makefile
Raw Normal View History

2003-02-12 11:40:28 +01:00
#############################################################
#
# patch
#
#############################################################
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
GNUPATCH_CAT:=$(ZCAT)
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)
$(GNUPATCH_CAT) $(DL_DIR)/$(GNUPATCH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(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; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
./configure $(QUIET) \
2003-02-12 11:40:28 +01:00
--target=$(GNU_TARGET_NAME) \
--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 \
--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 \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
)
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)
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: $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
2003-02-12 11:40:28 +01:00
patch-clean:
rm -f $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
2003-02-12 11:40:28 +01:00
patch-dirclean:
rm -rf $(GNUPATCH_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_PATCH),y)
TARGETS+=patch
endif