Commit ac98f875 authored by Julien Muchembled's avatar Julien Muchembled

wip

parent 3e54ec0c
...@@ -62,15 +62,13 @@ Supported options ...@@ -62,15 +62,13 @@ Supported options
``make-options`` ``make-options``
Extra ``KEY=VALUE`` options included in the invocation of the ``make`` Extra ``KEY=VALUE`` options included in the invocation of the ``make``
program. Multiple options can be given on separate lines to increase program for the build phase. Multiple options can be given on separate
readability. lines to increase readability.
``make-targets`` ``make-install-options``
Targets for the ``make`` command. Defaults to 'install' Used instead of ``make-options`` for installation phase.
which will be enough to install most software packages. You only Defaults to 'install' + ``make-options``.
need to use this if you want to build alternate targets. Each
target must be given on a separate line.
``configure-command`` ``configure-command``
......
...@@ -260,8 +260,12 @@ class Recipe(object): ...@@ -260,8 +260,12 @@ class Recipe(object):
return parts return parts
make_cmd = self.options.get('make-binary', 'make').strip() make_cmd = self.options.get('make-binary', 'make').strip()
make_options = ' '.join(self.options.get('make-options', '').split()) make_options = self.options.get('make-options', '').split()
make_targets = ' '.join(self.options.get('make-targets', 'install').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_options = self.options.get('configure-options', '').split()
configure_cmd = self.options.get('configure-command', '').strip() configure_cmd = self.options.get('configure-command', '').strip()
...@@ -351,14 +355,14 @@ class Recipe(object): ...@@ -351,14 +355,14 @@ class Recipe(object):
log.info('Executing pre-build') log.info('Executing pre-build')
self.run(pre_build_cmd) 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 pre_install_cmd = self.options.get('pre-install', '').strip() % self.options
if pre_install_cmd != '': if pre_install_cmd != '':
log.info('Executing pre-install') log.info('Executing pre-install')
self.run(pre_install_cmd) 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: if 'post-make-hook' in self.options and len(self.options['post-make-hook'].strip()) > 0:
log.info('Executing post-make-hook') 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