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
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))

--
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

Reply via email to