From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Devicetree Compiler
<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Mike Frysinger <vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH] Avoid installing pylibfdt when dependencies are missing
Date: Mon, 8 Jan 2018 17:55:17 +1100 [thread overview]
Message-ID: <20180108065517.GE2131@umbus.fritz.box> (raw)
In-Reply-To: <20180105185412.167666-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2417 bytes --]
On Fri, Jan 05, 2018 at 11:54:12AM -0700, Simon Glass wrote:
> At present we have a build check that python-dev and swig are available.
> If they are not, we print a message and skip building pylibfdt.
>
> However this check is not currently present with 'make install'. The
> install is attempted, and fails. See crbug.com/789189
>
> Split the check out into a separate script and use it twice, once for the
> build and once for the install. This corrects the error.
>
> Reported-by: Mike Frysinger <vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Applied, thanks.
> ---
>
> Makefile | 24 ++++++++++++++++--------
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9ba8121..fffb80e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -126,19 +126,23 @@ SCRIPTS = dtdiff
>
> all: $(BIN) libfdt
>
> -# We need both Python and swig to build pylibfdt.
> -.PHONY: maybe_pylibfdt
> -maybe_pylibfdt: FORCE
> +# We need both Python and swig to build/install pylibfdt.
> +# This builds the given make ${target} if those deps are found.
> +check_python_deps = \
> if $(PKG_CONFIG) --cflags python2 >/dev/null 2>&1; then \
> if which swig >/dev/null 2>&1; then \
> can_build=yes; \
> fi; \
> fi; \
> - if [ "$$can_build" = "yes" ]; then \
> - $(MAKE) pylibfdt; \
> + if [ "$${can_build}" = "yes" ]; then \
> + $(MAKE) $${target}; \
> else \
> - echo "## Skipping pylibfdt (install python dev and swig to build)"; \
> - fi
> + echo "\#\# Skipping pylibfdt (install python dev and swig to build)"; \
> + fi ;
> +
> +.PHONY: maybe_pylibfdt
> +maybe_pylibfdt: FORCE
> + target=pylibfdt; $(check_python_deps)
>
> ifeq ($(NO_PYTHON),)
> all: maybe_pylibfdt
> @@ -208,8 +212,12 @@ install-includes:
>
> install: install-bin install-lib install-includes
>
> +.PHONY: maybe_install_pylibfdt
> +maybe_install_pylibfdt: FORCE
> + target=install_pylibfdt; $(check_python_deps)
> +
> ifeq ($(NO_PYTHON),)
> -install: install_pylibfdt
> +install: maybe_install_pylibfdt
> endif
>
> $(VERSION_FILE): Makefile FORCE
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-01-08 6:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-05 18:54 [PATCH] Avoid installing pylibfdt when dependencies are missing Simon Glass
[not found] ` <20180105185412.167666-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-01-08 6:55 ` David Gibson [this message]
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=20180108065517.GE2131@umbus.fritz.box \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=vapier-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).