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/