Mail Archives: cygwin/2001/04/03/19:57:52
On Tue, Apr 03, 2001 at 06:06:24PM -0400, Jan Vicherek wrote:
>
> Hi all,
>
> Here is the problem I have, and why do I think that the variable
>translation would be really useful:
>
> Products get installed on NT/W2k. These products use environment
>variables (ENVVARs), that point to files and directories, to determine
>context from which they are being called.
>
> I am constructing some platform-independent makefiles, which 1) invoke
>the installed programs and 2) pass ENVVARs containing pathnames to these
>to communicate the context and 3) pass cmd-line args containing pathnames
>to the invoked pgms.
>
> The makefile references the same variables. They do not contain all
>relative paths, but ofter contain absolute paths (c:\prod\app\cfg\...).
>
> It semms to me quite natural, that the ENVVARs (and cmd line params) get
>translated when crossing the Windows-Cygwin boundaries.
>
> It doesn't seem to me easy / easily maintainable to translate a variable
>and parse and translate cmd args to windows path using "cygpath" every
>time I make an invocation. But I find "cygpath" quite useful otherwise.
>
> I would welcome any suggestions on how to solve this !
>
> Would anybody have a suggestion for better solution than translating the
>ENVVARs and cmd line args ?
If you are using Cygwin programs, then set the environment variables
using UNIX paths.
If you are using non-Cygwin programs, then use Windows paths in the
environment variables.
I really don't understand the problem. Environment variables like HOME,
TMP, and PATH which have meaning in both a UNIX and Windows environment
obviously need to be translated.
Environment variables like LENNYSOFTWARE don't need to be translated.
If The "lenny" software is a Cygwin program then the LENNYSOFTWARE
environment variable should be set to a Cygwin path. If it is a Windows
native program then the environment variable should be set to a Windows
path.
If you are passing paths to a non-cygwin program then you need to either
use Windows paths in the Makefile (along with --win32) or use cygpath.
There is no alternative.
cgf
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -