mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 20:42:49 +00:00
#include now expects unix-like paths on all platforms
This commit is contained in:
parent
072f884f66
commit
05be4136df
@ -74,7 +74,7 @@ package main;
|
||||
|
||||
sub include {
|
||||
my($stack, $filename) = @_;
|
||||
my $fullFilename = $stack->{'variables'}->{'DIRECTORY'} . internalise($filename);
|
||||
my $fullFilename = $stack->{'variables'}->{'DIRECTORY'} . $filename;
|
||||
$fullFilename =~ s|^.*//||os; # strip everything up to a double slash
|
||||
if ($fullFilename !~ m|^(.*/)?(.+)$|os) { # extract the directory and file portions
|
||||
die "Not a valid filename: $filename\n";
|
||||
@ -158,23 +158,6 @@ sub nativise {
|
||||
}
|
||||
}
|
||||
|
||||
sub internalise {
|
||||
my $filename = shift;
|
||||
if ($^O eq 'linux' or
|
||||
$^O eq 'cygwin') {
|
||||
return $filename;
|
||||
} elsif ($^O eq 'MSWin32') {
|
||||
$filename =~ s|\\|/|gos;
|
||||
$filename =~ s|^(.):/|/$1/|gos;
|
||||
return $filename;
|
||||
} elsif ($^O eq 'MacOS') {
|
||||
$filename =~ s|/|:|gos;
|
||||
return $filename;
|
||||
} else {
|
||||
die("Platform '$^O' not recognised. Contact ian\@hixie.ch.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
########################################################################
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user