This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bug in cygwin build of Make

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/
perl ${CVSVIEW}/etc/ -v ${CVSVIEW}/doc/mem_map.csv bus_pack-pkg.vhd

Even though it now working, is there a better way of doing this?


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

Hope this helps,
-- Robert

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]