Commit ac98f875 authored by Julien Muchembled's avatar Julien Muchembled

wip

parent 3e54ec0c
......@@ -62,15 +62,13 @@ Supported options
``make-options``
Extra ``KEY=VALUE`` options included in the invocation of the ``make``
program. Multiple options can be given on separate lines to increase
readability.
program for the build phase. Multiple options can be given on separate
lines to increase readability.
``make-targets``
``make-install-options``
Targets for the ``make`` command. Defaults to 'install'
which will be enough to install most software packages. You only
need to use this if you want to build alternate targets. Each
target must be given on a separate line.
Used instead of ``make-options`` for installation phase.
Defaults to 'install' + ``make-options``.
``configure-command``
......
......@@ -260,8 +260,12 @@ class Recipe(object):
return parts
make_cmd = self.options.get('make-binary', 'make').strip()
make_options = ' '.join(self.options.get('make-options', '').split())
make_targets = ' '.join(self.options.get('make-targets', 'install').split())
make_options = self.options.get('make-options', '').split()
try:
install_options = self.options['make-install-options'].split()
except KeyError:
install_options = make_options + \
self.options.get('make-targets', 'install').split()
configure_options = self.options.get('configure-options', '').split()
configure_cmd = self.options.get('configure-command', '').strip()
......@@ -351,14 +355,14 @@ class Recipe(object):
log.info('Executing pre-build')
self.run(pre_build_cmd)
self.run(('%s %s' % (make_cmd, make_options)) % self.options)
self.run(('%s %s' % (make_cmd, ' '.join(make_options))) % self.options)
pre_install_cmd = self.options.get('pre-install', '').strip() % self.options
if pre_install_cmd != '':
log.info('Executing pre-install')
self.run(pre_install_cmd)
self.run(('%s %s %s' % (make_cmd, make_options, make_targets)) % self.options)
self.run(('%s %s' % (make_cmd, ' '.join(make_install_options))) % self.options)
if 'post-make-hook' in self.options and len(self.options['post-make-hook'].strip()) > 0:
log.info('Executing post-make-hook')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment