This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v11] Add pretty printers for the NPTL lock types
- From: Martin Galvan <omgalvan dot 86 at gmail dot com>
- To: libc-alpha at sourceware dot org, siddhesh at sourceware dot org, joseph at codesourcery dot com
- Date: Mon, 12 Dec 2016 17:54:48 -0300
- Subject: Re: [PATCH v11] Add pretty printers for the NPTL lock types
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1612081855170.9769@digraph.polyomino.org.uk>
Ok, I smoke-tested this natively on Ubuntu (AMD64) and it works fine. Could you please test it for cross-builds as well?
I'm attaching the patch here; please let me know if a separate thread is required. Thanks!
ChangeLog:
2016-12-12 Martin Galvan <omgalvan.86@gmail.com>
* Rules (python-flags, python-invoke): New.
($(test-printers-out)): Use $(python-flags).
---
Rules | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Rules b/Rules
index de58a64..a7f845b 100644
--- a/Rules
+++ b/Rules
@@ -257,6 +257,12 @@ ifneq "$(strip $(tests-printers))" ""
# inside Makeconfig.
PYTHON := python
+# Invoke Python using -B to avoid generating .pyc files on the source dir,
+# so that we can keep it read-only.
+python-flags := -B
+
+python-invoke := $(PYTHON) $(python-flags)
+
# Static pattern rule for building the test programs for the pretty printers.
$(tests-printers-programs): %: %.o $(tests-printers-libs) \
$(sort $(filter $(common-objpfx)lib%,$(link-libc-static-tests))) \
@@ -274,7 +280,7 @@ py-env := PYTHONPATH=$(py-const-dir):$(..)scripts:$${PYTHONPATH}
$(tests-printers-out): $(objpfx)%.out: $(objpfx)% %.py %.c $(pretty-printers) \
$(..)scripts/test_printers_common.py
$(test-wrapper-env) $(py-env) \
- $(PYTHON) $*.py $*.c $(objpfx)$* $(pretty-printers) > $@; \
+ $(python-invoke) $*.py $*.c $(objpfx)$* $(pretty-printers) > $@; \
$(evaluate-test)
endif
--
2.7.4