diff options
author | Rémi Flamary <remi.flamary@gmail.com> | 2016-10-24 14:18:27 +0200 |
---|---|---|
committer | Rémi Flamary <remi.flamary@gmail.com> | 2016-10-24 14:18:27 +0200 |
commit | 9c1d808ef2a45393dd1b8d8950411707b04617e7 (patch) | |
tree | 099f6c0673c6bffca046dee0f1b7f37e84effe47 | |
parent | cfdfd3d4d2791d45cde0bf4512c15039c725bd3e (diff) |
add makefile
-rw-r--r-- | Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4345854 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ + + +PYTHON=python + +help : + @echo "The following make targets are available:" + @echo " help - print this message" + @echo " build - build python package" + @echo " install - install python package (local user)" + @echo " sinstall - install python package (system with sudo)" + @echo " remove - remove the package (local user)" + @echo " sremove - remove the package (system with sudo)" + @echo " clean - remove any temporary files" + +build : + $(PYTHON) setup.py build + +install : + $(PYTHON) setup.py install --user + +sinstall : + sudo $(PYTHON) setup.py install + +remove : + $(PYTHON) setup.py install --user --record files.txt + tr '\n' '\0' < files.txt | xargs -0 rm -f -- + rm files.txt + +sremove : + $(PYTHON) setup.py install --record files.txt + tr '\n' '\0' < files.txt | sudo xargs -0 rm -f -- + rm files.txt |