All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: RT <linux-rt-users@vger.kernel.org>
Cc: Anders Roxell <anders.roxell@linaro.org>,
	Clark Williams <williams@redhat.com>,
	John Kacur <jkacur@redhat.com>
Subject: [PATCH] rt-tests: makefile: undefine PYLIB if empty
Date: Mon, 19 Oct 2020 15:37:54 -0400	[thread overview]
Message-ID: <20201019193754.14578-1-jkacur@redhat.com> (raw)

The makefile will run a shell command to determine the location of the
python libraries. If an error occurs, for example if the system doesn't
have python installed on it, undefine PYLIB

This prevents undesired side effects such as installing man pages for
utilities that will not be installed and does not interfere with other
conditionals such as if test -n "${PYLIB]"

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index 5f34075a4aa1..24895b7f9697 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,11 @@ LDFLAGS ?=
 
 PYLIB  ?= $(shell python3 -c 'import distutils.sysconfig;  print (distutils.sysconfig.get_python_lib())')
 
+# Check for errors, such as python3 not available
+ifeq (${PYLIB},)
+	undefine PYLIB
+endif
+
 MANPAGES = src/cyclictest/cyclictest.8 \
 	   src/pi_tests/pi_stress.8 \
 	   src/ptsematest/ptsematest.8 \
-- 
2.26.2


                 reply	other threads:[~2020-10-19 19:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20201019193754.14578-1-jkacur@redhat.com \
    --to=jkacur@redhat.com \
    --cc=anders.roxell@linaro.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=williams@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.