aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/utils/make_preload
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/utils/make_preload')
-rwxr-xr-xerts/emulator/utils/make_preload12
1 files changed, 10 insertions, 2 deletions
diff --git a/erts/emulator/utils/make_preload b/erts/emulator/utils/make_preload
index d22f08f993..13019d4062 100755
--- a/erts/emulator/utils/make_preload
+++ b/erts/emulator/utils/make_preload
@@ -2,7 +2,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1999-2009. All Rights Reserved.
+# Copyright Ericsson AB 1999-2011. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -39,6 +39,7 @@ use File::Basename;
my $gen_rc = 0;
my $gen_old = 0;
my $windres = 0;
+my $msys = 0;
my $file;
my $progname = basename($0);
@@ -49,6 +50,8 @@ while (@ARGV && $ARGV[0] =~ /^-(\w+)/) {
$gen_rc = 1;
} elsif ($opt eq '-windres') {
$windres = 1;
+ } elsif ($opt eq '-msys') {
+ $msys = 1;
} elsif ($opt eq '-old') {
$gen_old = 1;
} else {
@@ -68,7 +71,12 @@ foreach $file (@ARGV) {
unless $file =~ /\.beam$/;
my $module = basename($file, ".beam");
if ($gen_rc) {
- my ($win_file) = split("\n", `(cygpath -d $file 2>/dev/null || cygpath -w $file)`);
+ my $win_file;
+ if ($msys) {
+ ($win_file) = split("\n", `(msys2win_path.sh $file)`);
+ } else {
+ ($win_file) = split("\n", `(cygpath -d $file 2>/dev/null || cygpath -w $file)`);
+ }
$win_file =~ s&\\&\\\\&g;
print "$num ERLANG_CODE \"$win_file\"\n";
push(@modules, " ", -s $file, "L, $num, ",