Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: From: Paul Stodghill To: "Cygwin Mailing List (E-mail)" Subject: RE: Very weird MAKE/PYTHON/ASH problem. Date: Mon, 5 Jun 2000 05:53:35 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id LAA06245 I forgot to mention: I see this behavior with both the 1.1.1 cygwin1.dll and the 20000601 snapshot. > -----Original Message----- > From: Paul Stodghill [mailto:stodghil AT CS DOT Cornell DOT EDU] > Sent: Monday, June 05, 2000 5:40 AM > To: Cygwin Mailing List (E-mail) > Subject: Very weird MAKE/PYTHON/ASH problem. > > > I've got a very weird MAKE/PYTHON/ASH problem. > > Synopsis: Python running under Make cannot export a new PATH > value unless > SHELL variable in Make is overridden to something other than "sh.exe" > > "Huh?" I hear you say. > > Ok, Let's look at this one step at a time. Consider the > following Makefile: > > milhouse% cat Makefile > default: >   python foo.py > other: >   echo ${SHELL} > > And the following Python file. > > milhouse% cat foo.py > import os, os.path > > os.environ['PATH'] = "/some/junk" + os.pathsep + > os.environ['PATH'] > os.environ['PATHX'] = "fooness" > > os.system("printenv") > > > Now, typing "make" should print an environment in which /some/junk is > prepended to PATH, right? Wrong! > > milhouse% make | egrep '^PATH' > PATH=/home/stodghil/bib/bin:... > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH > PATHX=fooness > > What gives? I have no idea, but I discovered that overriding > Make's SHELL > variable seems to fix the problem. First, here is what Make's > SHELL variable > is initially set to > > milhouse% make other > echo sh.exe > sh.exe > > I tried setting SHELL to /bin/sh, /bin/bash, bash.exe, and > sh.exe. Of the > four, the first three work and the last fails. > > milhouse% make SHELL=/bin/sh | egrep '^PATH' > PATH=/some/junk:/home/stodghil/bib/bin:... > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH > PATHX=fooness > > milhouse% make SHELL=/bin/bash | egrep '^PATH' > PATH=/some/junk:/home/stodghil/bib/bin:... > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH > PATHX=fooness > > milhouse% make SHELL=bash.exe | egrep '^PATH' > PATH=/some/junk:/home/stodghil/bib/bin:... > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH > PATHX=fooness > > milhouse% make SHELL=sh.exe | egrep '^PATH' > PATH=/home/stodghil/bib/bin:... > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH > PATHX=fooness > > Does anyone have any idea what is going wrong? > > Thanks. > ---- > Paul Stodghill > 4128 Upson Hall, Dept of CS, Cornell Univ., Ithaca, NY 14853 > http://www.cs.cornell.edu/stodghil/ > Voice: 607-254-8838 Fax: 607-255-4428 > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com