define login id on build.onelab.eu depending on local id
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 16 Jun 2015 09:46:27 +0000 (11:46 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 16 Jun 2015 09:46:27 +0000 (11:46 +0200)
Makefile

index bafeed9..0354813 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,8 +68,15 @@ dist: MANIFEST
 ########## for uploading onto pypi
 # this assumes you have an entry 'pypi' in your .pypirc
 # see pypi documentation on how to create .pypirc
+LOCAL_ID=$(shell id)
+ifneq "$(LOCAL_ID)" "$(filter $(LOCAL_ID),parmen)"
+BUILD_ID=thierry
+else
+BUILD_ID=mario
+endif
+
 PYPI_TARGET=pypi
-PYPI_TARBALL_HOST=mario@build.onelab.eu
+PYPI_TARBALL_HOST=$(BUILD_ID)@build.onelab.eu
 PYPI_TARBALL_TOPDIR=/build/nepi
 
 VERSION=$(shell cat VERSION)
@@ -100,3 +107,13 @@ testpypi:
        #./setup.py sdist upload -r testpypi
        ./setup.py sdist
        twine upload dist/* -r testpypi
+
+#################### convenience, for debugging only
+# make +foo : prints the value of $(foo)
+# make ++foo : idem but verbose, i.e. foo=$(foo)
+++%: varname=$(subst +,,$@)
+++%:
+       @echo "$(varname)=$($(varname))"
++%: varname=$(subst +,,$@)
++%:
+       @echo "$($(varname))"