Skip to content

Commit c4e1b65

Browse files
authored
Merge pull request #7432 from jjhursey/automake-jobs
Add a -j option to autogen.pl to set AUTOMAKE_JOBS
2 parents c8ed75b + f01df73 commit c4e1b65

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

autogen.pl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
my $include_arg = 0;
5757
my $exclude_arg = 0;
5858
my $force_arg = 0;
59+
my $automake_jobs;
5960

6061
# Include/exclude lists
6162
my $include_list;
@@ -1131,6 +1132,7 @@ sub in_tarball {
11311132
"include=s" => \$include_arg,
11321133
"exclude=s" => \$exclude_arg,
11331134
"force|f" => \$force_arg,
1135+
"jobs|j=i" => \$automake_jobs,
11341136
);
11351137

11361138
if (!$ok || $help_arg) {
@@ -1153,7 +1155,8 @@ sub in_tarball {
11531155
--exclude | -e Comma-separated list of framework or framework-component
11541156
to be excluded from the build
11551157
--force | -f Run even if invoked from the source tree of an expanded
1156-
distribution tarball\n";
1158+
distribution tarball
1159+
--jobs | -j # Value to set for AUTOMAKE_JOBS\n";
11571160
my_exit($ok ? 0 : 1);
11581161
}
11591162

@@ -1185,6 +1188,13 @@ sub in_tarball {
11851188
$project_name_short = "open-pal";
11861189
}
11871190

1191+
my_die "Invalid value for --jobs $automake_jobs. Must be greater than 0."
1192+
if (defined $automake_jobs && $automake_jobs <= 0);
1193+
1194+
if (defined $automake_jobs) {
1195+
$ENV{'AUTOMAKE_JOBS'} = $automake_jobs;
1196+
}
1197+
11881198
#---------------------------------------------------------------------------
11891199

11901200
$m4 = "dnl

0 commit comments

Comments
 (0)