bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATH doesn't reach cygwin/dos environment


From: Gabriel Zachmann
Subject: PATH doesn't reach cygwin/dos environment
Date: 9 Oct 2000 16:43:22 GMT
User-agent: slrn/0.9.5.4 (UNIX)

gmake behaves very strange when I try to export the variable PATH
to the environment.
(I live under Cygwin 1.1.4 right now with gmake 3.79)

Consider the following makefile:

--- makefile
    #!gmake -R

    SHELL := /bin/bash --noprofile --norc

    #export PATH := blub
    #export PATH := $(shell cygpath -w -p "$(WIN_PATHk")
    #export PATH := $(shell cygpath -w -p 
"$(WIN_PATH):$(MSVC_DIR)/VC98/Bin:$(MSVC_DIR)/Common/MSDev98/Bin")

    export QQ := $(shell cygpath -w -p 
"$(WIN_PATH):$(MSVC_DIR)/VC98/Bin:$(MSVC_DIR)/Common/MSDev98/Bin")

    q:
            set
    .PHONY: q
--- makefile

The following is the output from 'make q':

    set
    !::='::\'
    !F:='F:\cygwin\bin'
    ALLUSERSPROFILE='D:\Documents and Settings\All Users'
    APPDATA='D:\Documents and Settings\zach\Application Data'
    BASH=/bin/bash
    BASH_PATCHES=([0]="bash204-001" [1]="bash204-002" [2]="bash204-003" 
[3]="bash204-004A" [4]="bash204-005" [5]="bash204-006" [6]="bash204-007" 
[7]="earnie-001")
    BASH_VERSINFO=([0]="2" [1]="04" [2]="0" [3]="1" [4]="release" 
[5]="i586-pc-cygwin")
    BASH_VERSION='2.04.0(1)-release'
    CLASSPATH='D:\WINNT\System32\QTJava.zip'
    COMMONPROGRAMFILES='D:\Program Files\Common Files'
    COMPUTERNAME=ZULLI
    COMSPEC='D:\WINNT\system32\cmd.exe'
    CYGWIN=noenvcache
    DIRSTACK=()
    EUID=1931
    FIGNORE=old:bak
    GROUPS=()
    HISTFILESIZE=1000
    HISTSIZE=1000
    HOME=/home/zach
    HOMEDRIVE=D:
    HOMEPATH='\'
    HOSTNAME=ZULLI
    HOSTTYPE=i586
    IFS='
    '
    IGNOREEOF=1
    INTEL_DIR='/f/Program Files/Intel/compiler45'
    LESS='-a -n -e -i -M -x4'
    LESSCHARSET=latin1
    LOGONSERVER='\\NTSRV1'
    MACHTYPE=i586-pc-cygwin
    MAKEFLAGS=' --unix'
    MAKELEVEL=1
    MAKE_MODE=unix
    MFLAGS='- --unix'
    MSVC_DIR='/f/Program Files/Microsoft Visual Studio'
    NUMBER_OF_PROCESSORS=2
    OPTURR=1
    OPTIND=1
    OS=Windows_NT
    OS2LIBPATH='D:\WINNT\system32\os2\dll;'
    OSGCOMPEXT=_ICL
    OSTYPE=cygwin
    PAGER=less
    PATH=/usr/local/bin:/usr/bin:/usr/bin:/cygdrive/d/WINNT/system32
    PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
    PPID=5082
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER='x86 Family 6 Model 8 Stepping 1, GenuineIntel'
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0801
    PROGRAMFILES='D:\Program Files'
    PROMPT='$P$G'
    PS4='+ '
    PWD=/f/user/gab/vd3/kelvin/IM/IMController
    QQ='d:\WINNT\system32;d:\WINNT;d:\WINNT\System32\Wbem;f:\Program 
Files\Microsoft Visual Studio\VC98\Bin;f:\Program Files\Microsoft Visual 
Studio\Common\MSDev98\
    Bin'
    QTJAVA='D:\WINNT\System32\QTJava.zip'
    SHELL='/bin/bash --noprofile --norc'
    SHELLOPTS=braceexpand:hashall:interactive-comments
    SHLVL=2
    SYSTEMDRIVE=D:
    SYSTEMROOT='D:\WINNT'
    TEMP=/cygdrive/d/DOCUME~1/zach/LOCALS~1/Temp
    TERM=cygwin
    UID=1931
    USER=zach
    USERDOMAIN=IGD_FHG_DE
    USERNAME=zach
    USERPROFILE='D:\Documents and Settings\zach'
    WINDIR='D:\WINNT'
    
WIN_PATH=/cygdrive/d/WINNT/system32:/cygdrive/d/WINNT:/cygdrive/d/WINNT/System32
    /Wbem
    _=/bin/bash

Note the value of variable QQ and PATH.
Now, when the first 'export PATH' line in the mkaefile is active,
the value of PATH in the environment of the 'set' command is
    PATH=blub
which is what I expected.

When the second line of 'expotr PATH' is active, I get
    PATH=d:/WINNT/system32:d:/WINNT:d:/WINNT/System32/Wbem
which is still almost what I expected.
The bug here is that the directories are not separated by ;!

When the third line of 'export PATH' is active, I get
    PATH='/usr/local/bin:/usr/bin:/usr/bin:/cygdrive/d/WINNT/system?'
which is completely wrong!
It seems to be the original value as set by bash.
I suspect, that the PATH exported from gmake to bash is bogus (note the ?
at the end of PATH), and then bash decides to use its default.

Anyway, what am I doing wrong?
Is there a bug in gmake?

Confused,
Gab.

-- 
/---------------------------------------------------------------------\
| Paradigm is a word too often used by those                          |
| who would like to have a new idea                                   |
| but cannot think of one.                                            |
|                     (Mervyn King, Deputy Governor, Bank of England) |
|                                                                     |
| address@hidden          address@hidden        address@hidden |
| www.igd.fhg.de/~zach/    www.gab.cx        __@/'                    |
\---------------------------------------------------------------------/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]