Fix platform detection and workaround bug in cygwin perl's FindBin module.

Thanks to Adam Lock <adamlock@netscape.com> for the patch.
Bug #166105 r=cls a=asa
This commit is contained in:
seawood%netscape.com 2002-10-22 04:25:08 +00:00
Родитель 14eef3c97a
Коммит 4007ad4e1a
1 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -4,16 +4,28 @@
# Rest of program
# get requirements from the same dir as the script
use FindBin;
if ($^O ne "cygwin") {
# we'll be pulling in some stuff from the script directory
require FindBin;
import FindBin;
push @INC, $FindBin::Bin;
}
require GenerateManifest;
import GenerateManifest;
use Getopt::Long;
# Configuration
$win32 = ($^O eq "MSWin32") ? 1 : 0; # ActiveState Perl
$darwin = ($^O eq "darwin") ? 1 : 0; # MacOSX
$win32 = 0;
$darwin = 0;
for ($^O) {
if (/((MS)?win32)|cygwin/i) {
$win32 = 1;
}
elsif (/darwin/i) {
$darwin = 1;
}
}
if ($win32) {
$moz = "$ENV{'MOZ_SRC'}/mozilla";
if ($ENV{'MOZ_DEBUG'}) {