Various makefile fixes

- Actually use $(PYTHON) in virtualenv creation
 - Make paste.ini if need be
 - distclean is more forgiving if files aren't there
 - clean up virtualenvs also
This commit is contained in:
Christopher Allan Webber 2014-10-09 13:01:22 -05:00
parent ea2825fa10
commit 1da574c6c9

View File

@ -64,6 +64,8 @@ maybe_venved = ./bin/
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
@ -72,6 +74,8 @@ maybe_venved =
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 \
@ -88,11 +92,12 @@ mediagoblin.ini:
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
@ -108,7 +113,7 @@ i18n: $(maybe_venv_dep)
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
@ -143,13 +148,12 @@ clean:
# 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