From 51b8061749bf4373942b4eab5ed813ff1b1d4a2a Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 17 Aug 2022 12:05:53 +0200 Subject: [PATCH] =?UTF-8?q?gen=5Fmakefile.py:=20set=20nargs=3D=3F=20for=20?= =?UTF-8?q?--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. --- gen_makefile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen_makefile.py b/gen_makefile.py index b859112..6267888 100755 --- a/gen_makefile.py +++ b/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',