diff options
author | seawood%netscape.com <devnull@localhost> | 2002-06-17 18:13:35 +0000 |
---|---|---|
committer | seawood%netscape.com <devnull@localhost> | 2002-06-17 18:13:35 +0000 |
commit | f08ca2429d326d6600b045f4b39dc2a07cf4c581 (patch) | |
tree | 045a9fd756e07ee824671e21b0baa55b4548d3bf | |
parent | 7c312e2d3dbf20dd909f1a861763e535ddd7247e (diff) | |
download | nspr-hg-f08ca2429d326d6600b045f4b39dc2a07cf4c581.tar.gz |
Fixing win32 gmake builds lack of debugging information problem by working around a combination MSVC & cygwin make deficiencies:
* We must use the full path to the source file when calling MSVC so that debugging information shows up in the object files.
* Because of cygwin's use of /cygdrive when using full paths, we must use a cygwin-wrapper script in some cases to allow native win32 programs to use a fully qualified cygwin path.
* We have to call configure using the full path so that $(srcdir) contains the
full path in the Makefiles. The rules have been changed for win32 so that it
always use $(srcdir)/$*.{c,cpp} as the sourcefile name even when the file is in
the cwd. This works around both the /cygdrive issue and the msvc's path info
optimization.
* We still use the wrapper when calling rc.exe & nsinstall. nsinstall
frequently takes multiple args and is called all over the tree so changing each
calling site is going to be expensive. (I'll have to check the logs again but
I think the rc wrapping can go.)
* nspr & ldap still use the wrappers for all native win32 progs. Neither nspr
nor ldap uses the acoutput-fast.pl script to speed up the substitution of
@srcdir@ into their Makefiles so, makefile substitution will break if we use
dos-paths.
* In the handful of directories where we copy srcfiles from another directory
in lieu of using VPATHs, we have to now copy those files to $(srcdir) so that
the default rules can find them.
Bug #141834 r=leaf,wtc,dmose,mcs
-rwxr-xr-x | build/cygwin-wrapper | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/build/cygwin-wrapper b/build/cygwin-wrapper new file mode 100755 index 00000000..c510a7d7 --- /dev/null +++ b/build/cygwin-wrapper @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Stupid wrapper to avoid win32 dospath/cygdrive issues +# +prog=$1 +shift +if test -z "$prog"; then + exit 0 +fi +if test "$prog" = "-up"; then + prog=$1 + shift + args=`echo $* | sed -e 's|-I\(.\):|-I/cygdrive/\1|g;'` +else + args=`echo $* | sed -e 's|/cygdrive/\(.\)/|\1:/|g;'` +fi +exec $prog $args |