Skip to content

Commit 39082ef

Browse files
authored
Merge pull request #1015 from Unity-Technologies/buildscripts-lf
Use LF line endings on all perl build scripts
2 parents 280120d + 0c17414 commit 39082ef

19 files changed

+3081
-3081
lines changed

external/buildscripts/build.pl

Lines changed: 1810 additions & 1810 deletions
Large diffs are not rendered by default.
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
use Cwd;
2-
use Cwd 'abs_path';
3-
use Getopt::Long;
4-
use File::Basename;
5-
use File::Path;
6-
7-
my $currentdir = getcwd();
8-
9-
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
10-
my $monoroot = abs_path($monoroot);
11-
my $buildscriptsdir = "$monoroot/external/buildscripts";
12-
13-
my @passAlongArgs = ();
14-
foreach my $arg (@ARGV)
15-
{
16-
# Filter out --clean if someone uses it. We have to clean since we are doing two builds
17-
if (not $arg =~ /^--clean=/)
18-
{
19-
push @passAlongArgs, $arg;
20-
}
21-
}
22-
23-
print(">>> Building i386\n");
24-
system("perl", "$buildscriptsdir/build.pl", "--arch32=1", "--clean=1", "--classlibtests=0", @passAlongArgs) eq 0 or die ('failing building i386');
25-
26-
print(">>> Building x86_64\n");
1+
use Cwd;
2+
use Cwd 'abs_path';
3+
use Getopt::Long;
4+
use File::Basename;
5+
use File::Path;
6+
7+
my $currentdir = getcwd();
8+
9+
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
10+
my $monoroot = abs_path($monoroot);
11+
my $buildscriptsdir = "$monoroot/external/buildscripts";
12+
13+
my @passAlongArgs = ();
14+
foreach my $arg (@ARGV)
15+
{
16+
# Filter out --clean if someone uses it. We have to clean since we are doing two builds
17+
if (not $arg =~ /^--clean=/)
18+
{
19+
push @passAlongArgs, $arg;
20+
}
21+
}
22+
23+
print(">>> Building i386\n");
24+
system("perl", "$buildscriptsdir/build.pl", "--arch32=1", "--clean=1", "--classlibtests=0", @passAlongArgs) eq 0 or die ('failing building i386');
25+
26+
print(">>> Building x86_64\n");
2727
system("perl", "$buildscriptsdir/build.pl", "--clean=1", "--classlibtests=0", @passAlongArgs) eq 0 or die ('failing building x86_64');
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
use Cwd;
2-
use Cwd 'abs_path';
3-
use Getopt::Long;
4-
use File::Basename;
5-
use File::Path;
6-
7-
my $currentdir = getcwd();
8-
9-
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
10-
my $monoroot = abs_path($monoroot);
11-
my $buildscriptsdir = "$monoroot/external/buildscripts";
12-
13-
my @passAlongArgs = ();
14-
foreach my $arg (@ARGV)
15-
{
16-
# Filter out --clean if someone uses it. We have to clean since we are doing two builds
17-
if (not $arg =~ /^--clean=/)
18-
{
19-
push @passAlongArgs, $arg;
20-
}
21-
}
22-
23-
print(">>> Building i686\n");
24-
system("perl", "$buildscriptsdir/build_win_wrapper.pl", "--arch32=1", "--clean=1", "--classlibtests=0", @passAlongArgs) eq 0 or die ('failing building win32');
25-
26-
print(">>> Building x86_64\n");
1+
use Cwd;
2+
use Cwd 'abs_path';
3+
use Getopt::Long;
4+
use File::Basename;
5+
use File::Path;
6+
7+
my $currentdir = getcwd();
8+
9+
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
10+
my $monoroot = abs_path($monoroot);
11+
my $buildscriptsdir = "$monoroot/external/buildscripts";
12+
13+
my @passAlongArgs = ();
14+
foreach my $arg (@ARGV)
15+
{
16+
# Filter out --clean if someone uses it. We have to clean since we are doing two builds
17+
if (not $arg =~ /^--clean=/)
18+
{
19+
push @passAlongArgs, $arg;
20+
}
21+
}
22+
23+
print(">>> Building i686\n");
24+
system("perl", "$buildscriptsdir/build_win_wrapper.pl", "--arch32=1", "--clean=1", "--classlibtests=0", @passAlongArgs) eq 0 or die ('failing building win32');
25+
26+
print(">>> Building x86_64\n");
2727
system("perl", "$buildscriptsdir/build_win_wrapper.pl", "--clean=1", "--classlibtests=0", @passAlongArgs) eq 0 or die ('failing building x64');
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
use Cwd;
2-
use Cwd 'abs_path';
3-
use Getopt::Long;
4-
use File::Basename;
5-
use File::Path;
6-
7-
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
8-
my $monoroot = abs_path($monoroot);
9-
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10-
11-
my $build = 1;
12-
my $clean = 1;
13-
my $mcsOnly = 0;
14-
my $skipMonoMake = 0;
15-
16-
# Handy troubleshooting/niche options
17-
18-
# The prefix hack probably isn't needed anymore. Let's disable it by default and see how things go
19-
my $shortPrefix = 1;
20-
21-
GetOptions(
22-
"build=i"=>\$build,
23-
"clean=i"=>\$clean,
24-
"mcsOnly=i"=>\$mcsOnly,
25-
'skipmonomake=i'=>\$skipMonoMake,
26-
'shortprefix=i'=>\$shortPrefix,
27-
) or die ("illegal cmdline options");
28-
29-
system(
30-
"perl",
31-
"$buildScriptsRoot/build.pl",
32-
"--build=$build",
33-
"--clean=$clean",
34-
"--mcsonly=$mcsOnly",
35-
"--skipmonomake=$skipMonoMake",
36-
"--artifact=1",
37-
"--artifactscommon=1",
38-
"--buildusandboo=1",
39-
"--forcedefaultbuilddeps=1",
40-
"--shortprefix=$shortPrefix") eq 0 or die ("Failed building mono\n");
1+
use Cwd;
2+
use Cwd 'abs_path';
3+
use Getopt::Long;
4+
use File::Basename;
5+
use File::Path;
6+
7+
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
8+
my $monoroot = abs_path($monoroot);
9+
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10+
11+
my $build = 1;
12+
my $clean = 1;
13+
my $mcsOnly = 0;
14+
my $skipMonoMake = 0;
15+
16+
# Handy troubleshooting/niche options
17+
18+
# The prefix hack probably isn't needed anymore. Let's disable it by default and see how things go
19+
my $shortPrefix = 1;
20+
21+
GetOptions(
22+
"build=i"=>\$build,
23+
"clean=i"=>\$clean,
24+
"mcsOnly=i"=>\$mcsOnly,
25+
'skipmonomake=i'=>\$skipMonoMake,
26+
'shortprefix=i'=>\$shortPrefix,
27+
) or die ("illegal cmdline options");
28+
29+
system(
30+
"perl",
31+
"$buildScriptsRoot/build.pl",
32+
"--build=$build",
33+
"--clean=$clean",
34+
"--mcsonly=$mcsOnly",
35+
"--skipmonomake=$skipMonoMake",
36+
"--artifact=1",
37+
"--artifactscommon=1",
38+
"--buildusandboo=1",
39+
"--forcedefaultbuilddeps=1",
40+
"--shortprefix=$shortPrefix") eq 0 or die ("Failed building mono\n");
Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
use Cwd;
2-
use Cwd 'abs_path';
3-
use Getopt::Long;
4-
use File::Basename;
5-
use File::Path;
6-
7-
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
8-
my $monoroot = abs_path($monoroot);
9-
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10-
11-
my $build = 1;
12-
my $clean = 1;
13-
my $mcsOnly = 0;
14-
my $skipMonoMake = 0;
15-
16-
# Handy troubleshooting/niche options
17-
18-
# The prefix hack probably isn't needed anymore. Let's disable it by default and see how things go
19-
my $shortPrefix = 1;
20-
21-
# This script should not be ran on windows, if it is, kindly switch over to wsl
22-
if ($^O eq "MSWin32")
23-
{
24-
print(">>> Called from Windows. Switching over to wsl\n");
25-
my $monoRootInBash = `bash -c pwd`;
26-
chomp $monoRootInBash;
27-
print(">>> monoRootInBash = $monoRootInBash\n");
28-
my $cmdForBash = "$monoRootInBash/external/buildscripts/build_classlibs_wsl.pl @ARGV";
29-
system("bash", "-c", "\"perl $cmdForBash\"") eq 0 or die("\n");
30-
exit 0;
31-
}
32-
33-
GetOptions(
34-
"build=i"=>\$build,
35-
"clean=i"=>\$clean,
36-
"mcsOnly=i"=>\$mcsOnly,
37-
'skipmonomake=i'=>\$skipMonoMake,
38-
'shortprefix=i'=>\$shortPrefix,
39-
) or die ("illegal cmdline options");
40-
41-
system(
42-
"perl",
43-
"$buildScriptsRoot/build.pl",
44-
"--build=$build",
45-
"--clean=$clean",
46-
"--mcsonly=$mcsOnly",
47-
"--skipmonomake=$skipMonoMake",
48-
"--artifact=1",
49-
"--artifactscommon=1",
50-
"--buildusandboo=1",
51-
"--forcedefaultbuilddeps=1",
52-
"--windowssubsystemforlinux=1",
53-
"--shortprefix=$shortPrefix") eq 0 or die ("Failed building mono\n");
1+
use Cwd;
2+
use Cwd 'abs_path';
3+
use Getopt::Long;
4+
use File::Basename;
5+
use File::Path;
6+
7+
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
8+
my $monoroot = abs_path($monoroot);
9+
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10+
11+
my $build = 1;
12+
my $clean = 1;
13+
my $mcsOnly = 0;
14+
my $skipMonoMake = 0;
15+
16+
# Handy troubleshooting/niche options
17+
18+
# The prefix hack probably isn't needed anymore. Let's disable it by default and see how things go
19+
my $shortPrefix = 1;
20+
21+
# This script should not be ran on windows, if it is, kindly switch over to wsl
22+
if ($^O eq "MSWin32")
23+
{
24+
print(">>> Called from Windows. Switching over to wsl\n");
25+
my $monoRootInBash = `bash -c pwd`;
26+
chomp $monoRootInBash;
27+
print(">>> monoRootInBash = $monoRootInBash\n");
28+
my $cmdForBash = "$monoRootInBash/external/buildscripts/build_classlibs_wsl.pl @ARGV";
29+
system("bash", "-c", "\"perl $cmdForBash\"") eq 0 or die("\n");
30+
exit 0;
31+
}
32+
33+
GetOptions(
34+
"build=i"=>\$build,
35+
"clean=i"=>\$clean,
36+
"mcsOnly=i"=>\$mcsOnly,
37+
'skipmonomake=i'=>\$skipMonoMake,
38+
'shortprefix=i'=>\$shortPrefix,
39+
) or die ("illegal cmdline options");
40+
41+
system(
42+
"perl",
43+
"$buildScriptsRoot/build.pl",
44+
"--build=$build",
45+
"--clean=$clean",
46+
"--mcsonly=$mcsOnly",
47+
"--skipmonomake=$skipMonoMake",
48+
"--artifact=1",
49+
"--artifactscommon=1",
50+
"--buildusandboo=1",
51+
"--forcedefaultbuilddeps=1",
52+
"--windowssubsystemforlinux=1",
53+
"--shortprefix=$shortPrefix") eq 0 or die ("Failed building mono\n");
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
use Cwd;
2-
use Cwd 'abs_path';
3-
use Getopt::Long;
4-
use File::Basename;
5-
use File::Path;
6-
7-
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
8-
my $monoroot = abs_path($monoroot);
9-
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10-
11-
my $clean = 1;
12-
13-
GetOptions(
14-
"clean=i"=>\$clean,
15-
) or die ("illegal cmdline options");
16-
17-
18-
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=$clean", "--artifact=1", "--arch32=1", "--iphonecross=1", "--forcedefaultbuilddeps=1") eq 0 or die ("Failed building iphone cross compiler\n");
1+
use Cwd;
2+
use Cwd 'abs_path';
3+
use Getopt::Long;
4+
use File::Basename;
5+
use File::Path;
6+
7+
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
8+
my $monoroot = abs_path($monoroot);
9+
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10+
11+
my $clean = 1;
12+
13+
GetOptions(
14+
"clean=i"=>\$clean,
15+
) or die ("illegal cmdline options");
16+
17+
18+
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=$clean", "--artifact=1", "--arch32=1", "--iphonecross=1", "--forcedefaultbuilddeps=1") eq 0 or die ("Failed building iphone cross compiler\n");
Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
use Cwd;
2-
use Cwd 'abs_path';
3-
use Getopt::Long;
4-
use File::Basename;
5-
use File::Path;
6-
7-
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
8-
my $monoroot = abs_path($monoroot);
9-
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10-
11-
my $androidArch = "";
12-
my $clean = 1;
13-
my $windowsSubsystemForLinux = 0;
14-
15-
GetOptions(
16-
"androidarch=s"=>\$androidArch,
17-
"clean=i"=>\$clean,
18-
"windowssubsystemforlinux=i"=>\$windowsSubsystemForLinux,
19-
) or die ("illegal cmdline options");
20-
21-
# By default, build runtime for all the variants we need. But allow something to specify an individual variation to build
22-
if ($androidArch eq "")
23-
{
24-
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv5", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv5\n");
25-
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv6_vfp", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv6_vfp\n");
26-
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv7a", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv7a\n");
27-
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=x86", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for x86\n");
28-
}
29-
else
30-
{
31-
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=$clean", "--artifact=1", "--arch32=1", "--androidarch=$androidArch", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for $androidArch\n");
32-
}
1+
use Cwd;
2+
use Cwd 'abs_path';
3+
use Getopt::Long;
4+
use File::Basename;
5+
use File::Path;
6+
7+
my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../..");
8+
my $monoroot = abs_path($monoroot);
9+
my $buildScriptsRoot = "$monoroot/external/buildscripts";
10+
11+
my $androidArch = "";
12+
my $clean = 1;
13+
my $windowsSubsystemForLinux = 0;
14+
15+
GetOptions(
16+
"androidarch=s"=>\$androidArch,
17+
"clean=i"=>\$clean,
18+
"windowssubsystemforlinux=i"=>\$windowsSubsystemForLinux,
19+
) or die ("illegal cmdline options");
20+
21+
# By default, build runtime for all the variants we need. But allow something to specify an individual variation to build
22+
if ($androidArch eq "")
23+
{
24+
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv5", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv5\n");
25+
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv6_vfp", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv6_vfp\n");
26+
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=armv7a", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for armv7a\n");
27+
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=1", "--artifact=1", "--arch32=1", "--androidarch=x86", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for x86\n");
28+
}
29+
else
30+
{
31+
system("perl", "$buildScriptsRoot/build.pl", "--build=1", "--clean=$clean", "--artifact=1", "--arch32=1", "--androidarch=$androidArch", "--forcedefaultbuilddeps=1", "--windowssubsystemforlinux=$windowsSubsystemForLinux") eq 0 or die ("Failed building mono for $androidArch\n");
32+
}

0 commit comments

Comments
 (0)