Skip to content
This repository

Add option to choose make command #63

Closed
wants to merge 1 commit into from

2 participants

Marc Plano-Lesay Victor Nakoryakov
Marc Plano-Lesay

As not every system uses GNU make as default (see #60, it's the only issue with FreeBSD), add an option (--make-command, -c, [build]/make-command) to let the user choose the command to use. Still defaults as make.

Victor Nakoryakov
Owner

Fixed in 0.3.6

Marc Plano-Lesay Kernald deleted the branch
Damien Stuart damienstuart referenced this pull request from a commit in damienstuart/ino
Victor Nakoryakov nailxx closes #23, #28, #60, #63: add a feature to specify make tool e20946b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 19, 2013
Marc Plano-Lesay Kernald Add option to choose make command (fix #60) 1397ab6
This page is out of date. Refresh to see the latest.

Showing 2 changed files with 8 additions and 1 deletion. Show diff stats Hide diff stats

  1. +7 1 ino/commands/build.py
  2. +1 0  ino/environment.py
8 ino/commands/build.py
@@ -43,6 +43,8 @@ def setup_arg_parser(self, parser):
43 43 super(Build, self).setup_arg_parser(parser)
44 44 self.e.add_board_model_arg(parser)
45 45 self.e.add_arduino_dist_arg(parser)
  46 + parser.add_argument('-c', '--make-command', metavar='MAKE_COMMAND',
  47 + default=self.e.default_make_command, help='Make command')
46 48 parser.add_argument('-v', '--verbose', default=False, action='store_true',
47 49 help='Verbose make output')
48 50
@@ -72,6 +74,9 @@ def discover(self):
72 74 tool_key, ['hardware', 'tools', 'avr', 'bin'],
73 75 items=[tool_binary], human_name=tool_binary)
74 76
  77 + def register_make_command(self, make_command):
  78 + self.make_command = make_command
  79 +
75 80 def setup_flags(self, board_key):
76 81 board = self.e.board_model(board_key)
77 82 mcu = '-mmcu=' + board['build']['mcu']
@@ -135,7 +140,7 @@ def render_template(self, source, target, **ctx):
135 140
136 141 def make(self, makefile, **kwargs):
137 142 makefile = self.render_template(makefile + '.jinja', makefile, **kwargs)
138   - ret = subprocess.call(['make', '-f', makefile, 'all'])
  143 + ret = subprocess.call([self.make_command, '-f', makefile, 'all'])
139 144 if ret != 0:
140 145 raise Abort("Make failed with code %s" % ret)
141 146
@@ -203,6 +208,7 @@ def scan_dependencies(self):
203 208
204 209 def run(self, args):
205 210 self.discover()
  211 + self.register_make_command(args.make_command)
206 212 self.setup_flags(args.board_model)
207 213 self.create_jinja(verbose=args.verbose)
208 214 self.make('Makefile.sketch')
1  ino/environment.py
@@ -67,6 +67,7 @@ class Environment(dict):
67 67 if platform.system() == 'Darwin':
68 68 arduino_dist_dir_guesses.insert(0, '/Applications/Arduino.app/Contents/Resources/Java')
69 69
  70 + default_make_command = 'make'
70 71 default_board_model = 'uno'
71 72 ino = sys.argv[0]
72 73

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.