Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <400704BA.5070205@ieee.org> Date: Thu, 15 Jan 2004 21:23:06 +0000 From: Jason Pearce User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031208 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: bug in cygwin build of Make References: <1074191085 DOT 513 DOT ezmlm AT cygwin DOT com> In-Reply-To: <1074191085.513.ezmlm@cygwin.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This indeed solves the problem and thanks for explaining the default shell issue. I actually thought that bash was used under cygwin, and I often construct syntax in a bash shell before using it in a makefile. It usually works but you've pointed out why there will be subtle differences. BTW the example I sent was obviously a cut down to illustrate the problem. I actually construct a variable that points to the root directory of the checked out CVS view (or a default an environment variable if that directory is not under CVS yet), that enables me to specify the "absolute path" to my scripts (or other) directories. Like this: CVSVIEW = $(shell if [ -e CVS/Repository ]; then echo ${CURDIR} | sed -e "s|`cat CVS/Repository | sed -e "s|^[^/]*||"`||"; else echo $$CVSVIEW; fi) bus_pack-pkg.vhd : ${CVSVIEW}/doc/mem_map.csv ${CVSVIEW}/etc/bus_pack.pl perl ${CVSVIEW}/etc/bus_pack.pl -v ${CVSVIEW}/doc/mem_map.csv bus_pack-pkg.vhd Even though it now working, is there a better way of doing this? Jason >JP> dir1/Makefile: >JP> -------------- >JP> VARIABLE = $(shell echo $$PWD) >JP> >JP> sources : >JP> @echo VARIABLE set to ${VARIABLE} > >The GNU make variable CURDIR is set by make to the current working >directory of the executing make. This is probably the variable you >want. > >Hope this helps, > -- Robert > -- 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/