summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2022-07-05 03:50:21 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2022-07-05 03:50:21 +0200
commitbe85beb5227c3288a44711abeda140f10ed6c5f4 (patch)
treecae44ecdad6b3d03ad97a781c845c2e08923af02 /Makefile
parent072e3bfcf2dfc45288dd00de816f2940e5d5f2bc (diff)
downloadpsutil-be85beb5227c3288a44711abeda140f10ed6c5f4.tar.gz
refactor Makefile a bit
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8954e72f..1234fc6a 100644
--- a/Makefile
+++ b/Makefile
@@ -44,10 +44,11 @@ BUILD_OPTS = `$(PYTHON) -c \
print('--parallel %s' % cpus if cpus > 1 else '')"`
# In not in a virtualenv, add --user options for install commands.
INSTALL_OPTS = `$(PYTHON) -c \
- "import sys; print('' if hasattr(sys, 'real_prefix') else '--user')"`
+ "import sys; print('' if hasattr(sys, 'real_prefix') or hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix else '--user')"`
TEST_PREFIX = PYTHONWARNINGS=always PSUTIL_DEBUG=1
-all: help
+# if make is invoked with no arg, default to `make help`
+.DEFAULT_GOAL := help
# ===================================================================
# Install
@@ -75,9 +76,7 @@ clean: ## Remove all build files.
docs/_build/ \
htmlcov/
-_:
-
-build: _ ## Compile (in parallel) without installing.
+build: ## Compile (in parallel) without installing.
@# "build_ext -i" copies compiled *.so files in ./psutil directory in order
@# to allow "import psutil" when using the interactive interpreter from
@# within this directory.