delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/03/19:57:52

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 3 Apr 2001 19:53:42 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: How to (dynamically) control Unix/Dos PATH-like variable tran slation
Message-ID: <20010403195342.A1588@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <E1B42CFD544FD31193EE0000E87C5CE799B4AC AT mailserver2 DOT mqsoftware DOT com> <Pine DOT LNX DOT 4 DOT 21 DOT 0104031748050 DOT 936-100000 AT ann DOT ied DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <Pine.LNX.4.21.0104031748050.936-100000@ann.ied.com>; from honza@ied.com on Tue, Apr 03, 2001 at 06:06:24PM -0400

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019