cygpath executed in makefile changes the path incorrectly

31 Views Asked by At

i have a make target in which i read the current path with PWD and extend it with a subdirectory. I want to convert the whole path from a UNIX format to a Windows format.

Makefile Code:

    ...
            absolute_path_pearl_src="$${PWD}/$${file}"; \
            absolute_path_pearl_src_win=$$(cygpath -w "$$absolute_path_pearl_src"); \
            printf "DEBUG1:\n$$absolute_path_pearl_src\n$$absolute_path_pearl_src_win\n"; \
    ..

Here is the sample output with my problem:

*DEBUG1:
/c/QNXWorkspaces/QDE_7.1-QNX6.6/cterm-pearl-2-cpp-migration-lib/extern/cterm-pearl-to-cpp-migration/PROG/MTERM/DIAG.P
C:\QNXWorkspaces\QDE_7.1-QNX6.6\cterm-pearl-2-cpp-migration-libtern\cterm-pearl-to-cpp-migration\PROG\MTERM\DIAG.P*

In place: /cterm-pearl-2-cpp-migration-**lib/extern**/c /ex is not recognized correctly and becomes: \cterm-pearl-2-cpp-migration-**libtern**\c

Can anyone help me what the error is or how I can convert the whole thing correctly?

0

There are 0 best solutions below