Use a central Makefile

This allows running "make clean", or "make all" without using the
setup.py.
This commit is contained in:
Laurent Bachelier 2013-03-02 13:45:48 +01:00
commit 79a90be331
2 changed files with 20 additions and 8 deletions

18
Makefile Normal file
View file

@ -0,0 +1,18 @@
core := weboob/tools/application/qt
applications := qboobmsg qhavedate qwebcontentedit qflatboob
ifeq ($(WIN32),)
applications += qvideoob
endif
directories := $(core) $(applications:%=weboob/applications/%/ui)
.PHONY: clean all $(directories)
all: target := all
all: $(directories)
clean: target := clean
clean: $(directories)
$(directories):
$(MAKE) -C $@ $(target)

View file

@ -52,13 +52,7 @@ def build_qt():
print >>sys.stderr, 'Install missing component(s) (see above) or disable Qt applications (with --no-qt).' print >>sys.stderr, 'Install missing component(s) (see above) or disable Qt applications (with --no-qt).'
sys.exit(1) sys.exit(1)
subprocess.check_call([make, '-C', 'weboob/applications/qboobmsg/ui', 'PYUIC=%s' % pyuic4]) subprocess.check_call([make, 'all', 'PYUIC=%s%s' % (pyuic4, ' WIN32=1' if sys.platform == 'win32' else '')])
subprocess.check_call([make, '-C', 'weboob/applications/qhavedate/ui', 'PYUIC=%s' % pyuic4])
subprocess.check_call([make, '-C', 'weboob/applications/qwebcontentedit/ui', 'PYUIC=%s' % pyuic4])
subprocess.check_call([make, '-C', 'weboob/applications/qflatboob/ui', 'PYUIC=%s' % pyuic4])
subprocess.check_call([make, '-C', 'weboob/tools/application/qt', 'PYUIC=%s' % pyuic4])
if sys.platform != 'win32':
subprocess.check_call([make, '-C', 'weboob/applications/qvideoob/ui', 'PYUIC=%s' % pyuic4])
class Options(object): class Options(object):
@ -150,7 +144,7 @@ if options.xdg:
setup( setup(
name='weboob', name='weboob',
version = '0.f', version='0.f',
description='Weboob, Web Outside Of Browsers', description='Weboob, Web Outside Of Browsers',
long_description=open('README').read(), long_description=open('README').read(),
author='Romain Bignon', author='Romain Bignon',