From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/3] apply-patches.sh: Use the "APPLY_PATCHES" variable to call the script
Date: Fri, 25 Jul 2014 19:40:43 +0200 [thread overview]
Message-ID: <20140725174043.GD3955@free.fr> (raw)
In-Reply-To: <1406306319-11972-3-git-send-email-fabio.porcedda@gmail.com>
Fabio, All,
On 2014-07-25 18:38 +0200, Fabio Porcedda spake thusly:
> To easy up adding optional parameters when calling the
> "apply-patches.sh" add and use the "APPLY_PATCHES" variable to execute
> the script.
[--SNIP--]
> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> index bcc648d..0daf012 100644
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -196,11 +196,11 @@ define LIBTOOL_PATCH_HOOK
> 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; \
Variables in hooks should be double-escaped:
$$(APPLY_PATCHES)
See: http://git.buildroot.org/buildroot/tree/package/pkg-generic.mk#n277
(for pkg-generic, but valid for all pkg-* infras.)
Ditto for the five following occurences, of course.
> 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
> @@ -230,11 +230,11 @@ define AUTORECONF_HOOK
> 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
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index fb4b849..95a95b7 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -146,14 +146,14 @@ $(BUILD_DIR)/%/.stamp_patched:
Note: the fololowing is not in a define-block, so needs no
double-escaping, so it is good as is:
> @$(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; \
Otherwise, looks good. Thanks! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2014-07-25 17:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 16:38 [Buildroot] [PATCH v2 0/3] apply-patches.sh: be quiet when "make -s" is used Fabio Porcedda
2014-07-25 16:38 ` [Buildroot] [PATCH v2 1/3] package/Makefile.in: fix coding style regarding the '=' sign Fabio Porcedda
2014-07-26 7:07 ` Thomas Petazzoni
2014-07-25 16:38 ` [Buildroot] [PATCH v2 2/3] apply-patches.sh: Use the "APPLY_PATCHES" variable to call the script Fabio Porcedda
2014-07-25 17:40 ` Yann E. MORIN [this message]
2014-07-28 9:38 ` Fabio Porcedda
2014-07-25 16:38 ` [Buildroot] [PATCH v2 3/3] apply-patches.sh: don't print anything when "make -s" is used Fabio Porcedda
2014-07-25 17:45 ` Yann E. MORIN
2014-07-26 5:31 ` Thomas De Schampheleire
2014-07-30 16:07 ` Fabio Porcedda
2014-07-31 17:12 ` [Buildroot] [PATCH v2 0/3] apply-patches.sh: be quiet " Fabio Porcedda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140725174043.GD3955@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox