cygpath does not work properly in Makefile

Marco Atzeri marco.atzeri@gmail.com
Mon Jul 21 11:23:00 GMT 2014


On 21/07/2014 11:44, Gökçe Aydos wrote:
> Hello,
>
> I want to convert absolute Unix paths to Windows paths using cygpath in
> a Makefile:
>
> FILES = lib1 ./relative.vhd \
>          lib2 /cygdrive/c/Windows/absolute.vhd
>
> convert_absolute_paths_to_windows_paths:
>      @echo 1: $(patsubst /%,$(shell cygpath -m /%),$(FILES))
>      @echo 2: $(shell cygpath -m $(FILES))
>
> The output is:
> 1: lib1 ./relative.vhd lib2 C:/cygwin64/cygdrive/c/Windows/absolute.vhd
> 2: lib1 relative.vhd lib2 C:/Windows/absolute.vhd
>
> The first line does not work properly (path prefixed with
> cygwin64/cygdrive), but the second one works. What could be the reason
> of this behavior?
>
> Kind Regards,
> Gökçe
>

I presume the make you are using is not cygwin one
as the first form is understandable only by cygwin programs

Regards
Marco




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



More information about the Cygwin mailing list