gen_makefile.py: set nargs=? for --jobs

Allow calling gen_makefile.py with --jobs without any argument, and
behave the same as if --jobs was not passed. This fixes calling
gen_makefile.py initially without --jobs, and then running "make regen"
which will cause gen_makefile.py to get called with --jobs with no
argument.
master
Oliver Smith 4 months ago
parent 74ef7bf547
commit 51b8061749
  1. 2
      gen_makefile.py

@ -84,7 +84,7 @@ parser.add_argument('-p', '--push-url', dest='push_url', default='',
parser.add_argument('-o', '--output', dest='output', default='Makefile',
help='''Makefile filename (default: 'Makefile').''')
parser.add_argument('-j', '--jobs', dest='jobs', default='$(nproc)',
parser.add_argument('-j', '--jobs', dest='jobs', default='$(nproc)', nargs='?', const='$(nproc)',
help='''-j option to pass to 'make'.''')
parser.add_argument('-I', '--sudo-make-install', dest='sudo_make_install',

Loading…
Cancel
Save