summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-10-24 01:29:53 -0700
committerGitHub <noreply@github.com>2017-10-24 01:29:53 -0700
commit87d332dcdbffe8ff60d99f74b1ad241c0967b055 (patch)
tree5237dbe65d2354c16cc71b0b5d13b1eb52b75d4e /Makefile.pre.in
parent1aa00ff383c43335e4a5044274617dbf59bc839e (diff)
downloadcpython-git-87d332dcdbffe8ff60d99f74b1ad241c0967b055.tar.gz
bpo-31810: Add smelly.py to check exported symbols (#4057)
* Add Tools/scripts/smelly.py: script checking if all symbols exported by libpython start with "Py" or "_Py". * Modify "make smelly" to run smelly.py: the command now fails with a non-zero exit code if libpython leaks a "smelly" symbol. * Travis CI now runs "make smelly"
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index e8df8f7355..6dacb872e0 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1659,10 +1659,9 @@ distclean: clobber
-o -name '*.bak' ')' \
-exec rm -f {} ';'
-# Check for smelly exported symbols (not starting with Py/_Py)
+# Check that all symbols exported by libpython start with "Py" or "_Py"
smelly: @DEF_MAKE_RULE@
- nm -p $(LIBRARY) | \
- sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \
+ $(RUNSHARED) ./$(BUILDPYTHON) Tools/scripts/smelly.py
# Find files with funny names
funny: