This is the mail archive of the
cygwin
mailing list for the Cygwin project.
cygpath does not work properly in Makefile
- From: Gökçe Aydos <goekce at uni-bremen dot de>
- To: cygwin at cygwin dot com
- Date: Mon, 21 Jul 2014 11:44:27 +0200
- Subject: cygpath does not work properly in Makefile
- Authentication-results: sourceware.org; auth=none
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