Use 'mount -' to get cygdrive mountpoint rather than assuming /cygdrive.

Bug #158920 r=bryner
This commit is contained in:
seawood%netscape.com 2003-04-02 06:22:59 +00:00
Родитель d9ba4b21b7
Коммит 6b34851d99
4 изменённых файлов: 19 добавлений и 6 удалений

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

@ -7,11 +7,17 @@ shift
if test -z "$prog"; then
exit 0
fi
mountpoint=`mount -p | grep ^/ | awk '{ print $1 }'`
if test -z "$mountpoint"; then
print "Cannot determine cygwin mount points. Exiting"
exit 1
fi
mountpoint=`echo $mountpoint | sed 's|/$||'`
if test "$prog" = "-up"; then
prog=$1
shift
args=`echo $* | sed -e 's|-I\(.\):|-I/cygdrive/\1|g;'`
args=`echo $* | sed -e "s|-I\([a-zA-Z]\):/|-I${mountpoint}/\1/|g;"`
else
args=`echo $* | sed -e 's|/cygdrive/\(.\)/|\1:/|g;'`
args=`echo $* | sed -e "s|${mountpoint}/\([a-zA-Z]\)/|\1:/|g;"`
fi
exec $prog $args

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

@ -94,7 +94,11 @@ export:: $(TARGETS) $(HEADERS)
# Create mini-SDK directory for NSPR
ifndef MOZ_NATIVE_NSPR
_ABS_DIST=$(shell cd $(DIST) && pwd)
ifeq ($(OS_ARCH),WINNT)
_ABS_DIST = $(shell cd $(DIST) && cygpath -w `pwd` | sed -s 's|\\|/|g')
else
_ABS_DIST = $(shell cd $(DIST) && pwd)
endif
libs::
$(RM) -rf $(DIST)/sdk/nspr
$(MAKE) -C $(DEPTH)/nsprpub real_install prefix=$(_ABS_DIST)/sdk/nspr exec_prefix=$(_ABS_DIST)/sdk/nspr bindir=$(_ABS_DIST)/sdk/nspr/bin includedir=$(_ABS_DIST)/sdk/nspr/include libdir=$(_ABS_DIST)/sdk/nspr/lib datadir=$(_ABS_DIST)/sdk/nspr/share DESTDIR=

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

@ -2,7 +2,10 @@
# make-jars [-f] [-v] [-l] [-d <chromeDir>] [-s <srcdir>] < <jar.mn>
if ($^O ne "cygwin") {
my $cygwin_mountprefix = "";
if ($^O eq "cygwin") {
$cygwin_mountprefix = `mount -p | grep ^/ | awk '{print $1}'`;
} else {
# we'll be pulling in some stuff from the script directory
require FindBin;
import FindBin;
@ -353,7 +356,7 @@ sub EnsureFileInDir
my $preproc_file = $file;
if ($^O eq 'cygwin' && $file =~ /^[a-zA-Z]:/) {
# convert to a cygwin path
$preproc_file =~ s|^([a-zA-Z]):|/cygdrive/\1|;
$preproc_file =~ s|^([a-zA-Z]):|$cygwin_mountprefix/\1|;
}
if ($vms) {
# use a temporary file otherwise cmd is too long for system()

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

@ -81,7 +81,7 @@ else
TESTS_FILE=$TEMP\\$$-tests.txt
TESTS_FILE=`cygpath -w $TESTS_FILE`
fi
MOZ_TEST_BASE=`echo $MOZ_TEST_BASE | sed -e"s,cygdrive/\(.\),\1:,"`
MOZ_TEST_BASE=`cygpath -w $MOZ_TEST_BASE | sed -e 's|\\|/|g'`
cp /dev/null $TESTS_FILE
for FILE in `ls file_list.txt file_list[0-9].txt 2> /dev/null`; do