ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),)
define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
- support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \
+ $(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \
at91bootstrap-$(AT91BOOTSTRAP_VERSION)-\*.patch
endef
ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),)
define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
- support/scripts/apply-patches.sh $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \
+ $(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \
at91bootstrap3-\*.patch
endef
ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),)
define BAREBOX_APPLY_CUSTOM_PATCHES
- support/scripts/apply-patches.sh $(@D) \
+ $(APPLY_PATCHES) $(@D) \
$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \
barebox-$(BAREBOX_VERSION)-\*.patch
endef
ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
define UBOOT_APPLY_CUSTOM_PATCHES
- support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
+ $(APPLY_PATCHES) $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
uboot-\*.patch
endef
define RTAI_PREPARE_KERNEL
kver=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelversion` ; \
if test -f $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/hal-linux-$${kver}-*patch ; then \
- support/scripts/apply-patches.sh $(LINUX_DIR) \
+ $(APPLY_PATCHES) $(LINUX_DIR) \
$(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/ \
hal-linux-$${kver}-*patch ; \
else \
endef
else
define RTAI_PREPARE_KERNEL
- support/scripts/apply-patches.sh \
+ $(APPLY_PATCHES) \
$(LINUX_DIR) \
$(dir $(RTAI_PATCH)) \
$(notdir $(RTAI_PATCH))
define LINUX_APPLY_PATCHES
for p in $(LINUX_PATCHES) ; do \
if echo $$p | grep -q -E "^ftp://|^http://" ; then \
- support/scripts/apply-patches.sh $(@D) $(DL_DIR) `basename $$p` ; \
+ $(APPLY_PATCHES) $(@D) $(DL_DIR) `basename $$p` ; \
elif test -d $$p ; then \
- support/scripts/apply-patches.sh $(@D) $$p linux-\*.patch ; \
+ $(APPLY_PATCHES) $(@D) $$p linux-\*.patch ; \
else \
- support/scripts/apply-patches.sh $(@D) `dirname $$p` `basename $$p` ; \
+ $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` ; \
fi \
done
endef
BISON := $(shell which bison || type -p bison)
SED := $(shell which sed || type -p sed) -i -e
+APPLY_PATCHES = support/scripts/apply-patches.sh
+
HOST_CPPFLAGS = -I$(HOST_DIR)/usr/include
HOST_CFLAGS ?= -O2
HOST_CFLAGS += $(HOST_CPPFLAGS)
do $(SED) 's,^\+\+\+ .*cvs-$(CVS_VERSION)/,+++ cvs-$(CVS_VERSION)/,' $$i; \
done; \
); \
- support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*; \
+ $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*; \
fi
endef
endif
ifeq ($(ARCH),powerpc)
ifneq ($(BR2_SOFT_FLOAT),)
define HOST_GCC_APPLY_POWERPC_PATCH
- support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional
+ $(APPLY_PATCHES) $(@D) package/gcc/$(GCC_VERSION) powerpc-link-with-math-lib.patch.conditional
endef
endif
endif
define HOST_GCC_APPLY_PATCHES
if test -d package/gcc/$(GCC_VERSION); then \
- support/scripts/apply-patches.sh $(@D) package/gcc/$(GCC_VERSION) \*.patch ; \
+ $(APPLY_PATCHES) $(@D) package/gcc/$(GCC_VERSION) \*.patch ; \
fi;
$(HOST_GCC_APPLY_POWERPC_PATCH)
endef
define INPUT_TOOLS_DEBIAN_PATCHES
if [ -d $(@D)/debian/patches ]; then \
- support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
+ $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \
fi
endef
define MII_DIAG_DEBIAN_PATCHES
if [ -d $(@D)/debian/patches ]; then \
- support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
+ $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \
fi
endef
define NETCAT_OPENBSD_APPLY_DEBIAN_PATCHES
if [ -d $(@D)/debian/patches ]; then \
- support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches *.dpatch; \
+ $(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.dpatch; \
fi
endef
ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \
sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
if test $$$${ltmain_version} = '1.5'; then \
- support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
+ $$(APPLY_PATCHES) $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
elif test $$$${ltmain_version} = "2.2"; then\
- support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
+ $$(APPLY_PATCHES) $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
elif test $$$${ltmain_version} = "2.4"; then\
- support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
+ $$(APPLY_PATCHES) $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
fi \
done \
fi
ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \
sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
if test $$$${ltmain_version} = "1.5"; then \
- support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
+ $$(APPLY_PATCHES) $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
elif test $$$${ltmain_version} = "2.2"; then\
- support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
+ $$(APPLY_PATCHES) $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
elif test $$$${ltmain_version} = "2.4"; then\
- support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
+ $$(APPLY_PATCHES) $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
fi \
done \
fi
@$(call step_start,patch)
@$(call MESSAGE,"Patching")
$(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
- $(foreach p,$($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $(notdir $(p))$(sep))
+ $(foreach p,$($(PKG)_PATCH),$(APPLY_PATCHES) $(@D) $(DL_DIR) $(notdir $(p))$(sep))
$(Q)( \
for D in $(PATCH_BASE_DIRS); do \
if test -d $${D}; then \
if test -d $${D}/$($(PKG)_VERSION); then \
- support/scripts/apply-patches.sh $(@D) $${D}/$($(PKG)_VERSION) \*.patch \*.patch.$(ARCH) || exit 1; \
+ $(APPLY_PATCHES) $(@D) $${D}/$($(PKG)_VERSION) \*.patch \*.patch.$(ARCH) || exit 1; \
else \
- support/scripts/apply-patches.sh $(@D) $${D} \*.patch \*.patch.$(ARCH) || exit 1; \
+ $(APPLY_PATCHES) $(@D) $${D} \*.patch \*.patch.$(ARCH) || exit 1; \
fi; \
fi; \
done; \
if [ -d $(@D)/debian/patches ]; then \
touch $(@D)/gorhack.h; \
rm $(@D)/debian/patches/01_makefile.dpatch; \
- support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches *.dpatch; \
+ $(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.dpatch; \
fi
endef
define SYSVINIT_DEBIAN_PATCHES
if [ -d $(@D)/debian/patches ]; then \
- support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
+ $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \
fi
endef
ifneq ($(THTTPD_PATCH),)
define THTTPD_DEBIAN_PATCHES
if [ -d $(@D)/debian/patches ]; then \
- support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
+ $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \
fi
endef
endif