maybe_venved_python = ./bin/python
# Yes, build the virtualenv as a dependency!
maybe_venv_dep = ./bin/python
+# And to clean up!
+maybe_venv_clean = clean-virtualenv
else
# --without-virtualenv must have been passed in... don't build
maybe_venved_python = $(PYTHON)
# No need for commands to build virtualenv as a dependency!
maybe_venv_dep =
+# Nor to clean up!
+maybe_venv_clean =
endif
.PHONY: all install uninstall distclean info install-html html \
cp --no-clobber mediagoblin.example.ini mediagoblin.ini
# We just symlink the mediagoblin from the appropriate python version
+# Note, we DO clobber paste.ini ...
paste.ini:
-ifeq ($(USE_PYTHON3),yes)
- -ln -s paste.py3.ini paste.ini
+ifeq ($(USE_PYTHON3),true)
+ ln -s paste.py3.ini paste.ini
else
- -ln -s paste.py2.ini paste.ini
+ ln -s paste.py2.ini paste.ini
endif
# base-configs: paste.ini mediagoblin.example.ini
ifneq ($(VIRTUALENV),no)
./bin/python:
rm -f ./bin/python
- virtualenv --system-site-packages .
+ virtualenv --system-site-packages --python=$(PYTHON) .
./bin/python setup.py develop --upgrade
virtualenv: bin/python
# Clean up the output of configure
-distclean:
- rm -v $(srcdir)/config.log
- rm -v $(srcdir)/config.status
+distclean: $(maybe_venv_clean)
+ rm -vf $(srcdir)/config.log
+ rm -vf $(srcdir)/config.status
rm -rvf $(srcdir)/autom4te.cache
- rm -v $(srcdir)/aclocal.m4
- rm -v $(srcdir)/Makefile
- rm -v $(srcdir)/env
+ rm -vf $(srcdir)/aclocal.m4
+ rm -vf $(srcdir)/Makefile
# You can either use the setup.py sdist command or you can roll your own here