aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-05-16 10:29:03 +0800
committerAaron LI <aaronly.me@outlook.com>2017-05-16 10:30:40 +0800
commit859b505afa1ea78b16c1d558ae59784dde3eb036 (patch)
treeb48e416b7e0254b2600603786351758dd62b30f1
parent30487211beca87da37a00a4c89e438c42dabe6f6 (diff)
downloadfg21sim-859b505afa1ea78b16c1d558ae59784dde3eb036.tar.bz2
Makefile: Improve venv (can locate at other directory)
Also update copyright information.
-rw-r--r--Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 0416565..bf87eea 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Weitian LI <liweitianux@live.com>
+# Copyright (c) 2016-2017 Weitian LI <weitian@aaronly.me>
# MIT license
#
# Makefile for "fg21sim"
@@ -6,7 +6,7 @@
# Credit: http://blog.bottlepy.org/2012/07/16/virtualenv-and-makefiles.html
#
-# The name (also the directory) of the virtualenv
+# Path to the virtualenv
VENV ?= venv
@@ -15,7 +15,7 @@ default:
@echo "| Make Utility for fg21sim |"
@echo "+-------------------------------------------------------------+"
@echo "Available targets:"
- @echo " + venv"
+ @echo " + venv [VENV=<venv>]"
@echo " create virtualenv '${VENV}' and install the dependencies"
@echo " + devbuild"
@echo " (build and) install the package to the virtualenv"
@@ -27,17 +27,17 @@ default:
# Create virtualenv and install/update the dependencies
venv: ${VENV}/bin/activate
${VENV}/bin/activate: requirements.txt
- test -d ./${VENV} || python3 -m venv ${VENV}
- ./${VENV}/bin/pip3 install -r requirements.txt
+ test -d ${VENV} || python3 -m venv ${VENV}
+ ${VENV}/bin/pip3 install -r requirements.txt
touch ${VENV}/bin/activate
# Install this package to the virtualenv
devbuild: venv
- ./${VENV}/bin/python3 setup.py install
+ ${VENV}/bin/python3 setup.py install
# Run the tests
test: devbuild
- ./${VENV}/bin/python3 setup.py test
+ ${VENV}/bin/python3 setup.py test
# One liner to get the value of any makefile variable