Re: TRANSFORM_TO_DOS_PATH problems


Subject: Re: TRANSFORM_TO_DOS_PATH problems
From: Michael D. Pritchett (mpritchett@attglobal.net)
Date: Tue Mar 06 2001 - 13:50:21 CST


----- Original Message -----
From: Rob Campbell <rob.campbell@att.net>
Sent: Tuesday, March 06, 2001 10:48 PM

Paul -

I used to have a lot of troubles getting the make system to work on my NT
box. But I kept at it until I got it finally working. The
TRANSFORM_TO_DOS_PATH was my idea to localize the required path changes for
the Win system in to single variable. Hopefully, I can help you understand
it.

> I'm trying to compile Abiword 0.7.12 on my Windows NT system with no
> success. I'm using 0.7.12 because it was the stable version when I
started
> this process. Before I get into the details of my problem, let me ask:
Does
> the build process for NT that is described on the web site not "JUST WORK"
> for anyone else, or is it just me? I did a clean install of Visual C++ 5,
> installed a recent (< 1 month old) version of cygwin in c:\cygwin, and
tried
> to build with the sources in both c:\ and c:\cygwin; no dice. Did you
have
> to make any changes to your environment variables or to the makefiles to
get
> AbiWord to compile?
>

After tweaking the system, I got it JUST WORK for me. I no longer have an
NT box available, but the system still JUST WORKS for my Win98 box. I build
from clean checkouts with no changes to any variables.

> My first problem seems to be with TRANSFORM_TO_DOS_PATH. As this snippet
> from make's output shows:
>
> fatal error C1083: Cannot open compiler generated file:
> 'c:\cygwinabi-0.7.12\src
> \WIN32_1.1.8_i386_OBJ\obj\expat\gennmtab.obj': No such file or
directory
>
> there is an error in the translation of the AbiWord installation
directory.
> It should be "c:\cygwin\abi-0.7.12". I typed "make -p" and plowed through
> hundreds of lines of variable definitions to see what the problem was.
Some
> of the things I noted:
>
> (1) "ABI_XX_ROOT=c:/cygwinabi-0.7.12", which is the same kind of error.
> (2) ABI_INCS is defined relative to $(ABI_XX_ROOT), so it is also wrong.
> (3) TRANSFORM_TO_DOS_PATH=sed 's|/|$(CYGWIN_ROOT)|'
> | sed 's|/|$(CYGWIN_ROOT)|g'
> | sed 's|/|\\\\|g'
>
> I added extra spaces above to make TRANSFORM_TO_DOS_PATH legible. It took
> me a little while to figure out that the '|' characters inside the sed
> expression are used as separators, as opposed to '/', as noted in the man
> page. Does anyone know what the 'g' does?

Adding spaces are file, returns (enters) are not. Newlines will cause other
errors.

'g' is defined as 'global' so that the substitution occurs across all
matches. This is necessary with transforming more than one path.

>
> ABI_XX_ROOT is assigned the value:
>
> echo $(ABI_ROOT) | $(TRANSFORM_TO_DOS_PATH)|sed 's|\\\\|/|g'
>
> ABI_ROOT is defined as "c:/abi-0.7.12" and CYGWIN_ROOT is "c:/cygwin".
> Using these definitions, the same commands can be typed at the bash
command
> line. When I do so, the output is:
>
> c:c:c:/cygwincygwinabi-0.7.12
>

Okay, from what you are saying above, ABI_ROOT is not inside the
CYGWIN_ROOT. So from a BASH prompt under the abi directory if you type pwd
you should get something like /cygdrive/c/abi-0.7.12. Now obviously this is
not something with want. c:\abi-0.7.12. Somehow the definition of you
TRANSFORM_TO_DOS_PATH is incorrect and you should be getting:

TRANSFORM_TO_DOS_PATH = sed 's|/cygdrive/\([a-zA-Z]\)|\1:|g' | sed
's|/|\\\\|g'

If you can't figure out the logic that causes the bad definition, one quick
work-around is to hardwire it in abi_defs.mk after TRANSFORM_TO_DOS_PATH is
defined. This will redefine it appropriately and at least get you going.

Note I have tried to get MSVC6 project files from Mike Nordell to work with
MSVC5, but haven't been successful. My original MSVC5 project files are out
of date, otherwise I would send them to you.

If you have any other questions, or need addtional help, don't hesitate to
ask!

Cheers!

Michael D. Pritchett



This archive was generated by hypermail 2b25 : Tue Mar 06 2001 - 14:03:51 CST