bug in cygwin build of Make

Jason Pearce jason.pearce@ieee.org
Thu Jan 15 21:23:00 GMT 2004


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/


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /