delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/14/16:55:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 14 Jan 2004 16:55:27 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: bug in cygwin build of Make
Message-ID: <20040114215527.GB5176@redhat.com>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <400506B3 DOT 6000902 AT ieee DOT org>
Mime-Version: 1.0
In-Reply-To: <400506B3.6000902@ieee.org>
User-Agent: Mutt/1.4.1i
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

On Wed, Jan 14, 2004 at 09:06:59AM +0000, Jason Pearce wrote:
>I have discovered a problem in cygwin's Make.
>
>I am calling a sub-make that goes to another directory. That bit works 
>fine, but the Makefiles have a variable set from a shell command. That 
>shell seems to be spawned from the wrong directory. I have created a 
>small example illustrating the problem
>
>dir2/Makefile:
>---------------
>VARIABLE = $(shell echo $$PWD)
>
>target :
>   ${MAKE} -C ../dir1 sources
>   @echo VARIABLE set to ${VARIABLE}

You can't rely on PWD being set correctly.  Use something like
$(shell pwd) instead.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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