Work around issue https://github.com/msys2/msys2-runtime/issues/208 by
converting from relative to absolute paths in the path lists using cygpath.

diff -urN texlive-source/texk/web2c/Makefile.am.orig texlive-source/texk/web2c/Makefile.am
--- texlive-source/texk/web2c/Makefile.am.orig	2023-05-02 17:26:43.000000000 +0200
+++ texlive-source/texk/web2c/Makefile.am	2024-07-01 17:56:04.403102900 +0200
@@ -150,8 +150,8 @@
 buildenv = TEXMFCNF=$(srcdir)/../kpathsea
 
 # Calling tangle & Co.
-tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TANGLE)
-tangleboot = $(tangle_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TANGLEBOOT)
+tangle = $(tangle_silent)WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)` $(buildenv) $(TANGLE)
+tangleboot = $(tangle_silent)WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)` $(buildenv) $(TANGLEBOOT)
 tangle_silent = $(tangle_silent_@AM_V@)
 tangle_silent_ = $(tangle_silent_@AM_DEFAULT_V@)
 tangle_silent_0 = @echo "  TANGLE  " $@; $(SHELL) ./silent-sh $@ #
@@ -163,7 +163,7 @@
 ctangle_silent_0 = @echo "  CTANGLE " $@; $(SHELL) ./silent-sh $@ #
 ctangle_silent_1 =
 #
-tie = $(tie_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TIE)
+tie = $(tie_silent)WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)` $(buildenv) $(TIE)
 tie_silent = $(tie_silent_@AM_V@)
 tie_silent_ = $(tie_silent_@AM_DEFAULT_V@)
 tie_silent_0 = @echo "  TIE     " $@; $(SHELL) ./silent-sh $@ #
@@ -172,7 +172,7 @@
 tie_m = $(tie) -m $@
 
 # Calling tangle & Co. via tangle-sh (several output files)
-texmf_tangle = WEBINPUTS=.:$(srcdir) AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE)
+texmf_tangle = WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)` AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE)
 
 # For trip, trap, and other tests
 DIFF = diff
diff -urN texlive-source/texk/web2c/alephdir/am/aleph.am.orig texlive-source/texk/web2c/alephdir/am/aleph.am
--- texlive-source/texk/web2c/alephdir/am/aleph.am.orig	2023-05-02 17:26:43.000000000 +0200
+++ texlive-source/texk/web2c/alephdir/am/aleph.am	2024-07-01 18:18:36.639902800 +0200
@@ -12,7 +12,7 @@
 endif ALEPH
 EXTRA_PROGRAMS += aleph
 
-al_tangle = WEBINPUTS=.:$(srcdir) AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(OTANGLE)
+al_tangle = WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)` AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(OTANGLE)
 
 # With --enable-ipc, Aleph may need to link with -lsocket.
 aleph_LDADD = $(LDADD) $(ipc_socketlibs)
diff -urN texlive-source/texk/web2c/omegaware/am/omegaware.am.orig texlive-source/texk/web2c/omegaware/am/omegaware.am
--- texlive-source/texk/web2c/omegaware/am/omegaware.am.orig	2023-05-02 17:26:43.000000000 +0200
+++ texlive-source/texk/web2c/omegaware/am/omegaware.am	2024-07-01 18:22:19.650570400 +0200
@@ -17,7 +17,7 @@
 	$(omegaware_programs:=.p) $(omegaware_programs:=-web2c)
 
 ow_tangle = WEBINPUTS=$(srcdir)/omegaware $(buildenv) $(TANGLE)
-ow_otangle = WEBINPUTS=.:$(srcdir)/omegaware $(buildenv) $(OTANGLE)
+ow_otangle = WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)`/omegaware $(buildenv) $(OTANGLE)
 
 nodist_odvicopy_SOURCES = odvicopy.c odvicopy.h
 odvicopy.c odvicopy.h: odvicopy-web2c
diff -urN texlive-source/texk/web2c/pdftexdir/am/pdftex.am.orig texlive-source/texk/web2c/pdftexdir/am/pdftex.am
--- texlive-source/texk/web2c/pdftexdir/am/pdftex.am.orig	2023-05-02 17:26:43.000000000 +0200
+++ texlive-source/texk/web2c/pdftexdir/am/pdftex.am	2024-07-01 18:24:14.593833300 +0200
@@ -24,7 +24,7 @@
 # Force Automake to use CXXLD for linking
 nodist_EXTRA_pdftex_SOURCES = dummy.cxx
 
-pdf_tangle = WEBINPUTS=.:$(srcdir)/pdftexdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE)
+pdf_tangle = WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)`/pdftexdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE)
 
 pdftex_CPPFLAGS = $(pdftex_cppflags)
 pdftex_CXXFLAGS = $(WARNING_CXXFLAGS)
diff -urN texlive-source/texk/web2c/pmpostdir/am/pmpost.am.orig texlive-source/texk/web2c/pmpostdir/am/pmpost.am
--- texlive-source/texk/web2c/pmpostdir/am/pmpost.am.orig	2023-05-02 17:26:43.000000000 +0200
+++ texlive-source/texk/web2c/pmpostdir/am/pmpost.am	2024-07-01 18:25:56.320255600 +0200
@@ -60,9 +60,9 @@
 endif WIN32
 
 # Creating one file: just one rule
-pmp_ctangle = $(ctangle_silent)CWEBINPUTS=.:$(srcdir)/pmpostdir $(ctangle)
+pmp_ctangle = $(ctangle_silent)CWEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)`/pmpostdir $(ctangle)
 # Creating several files: need stamp file and two rules with identical recipes
-pmp_ctangle_sh = CWEBINPUTS=.:$(srcdir)/pmpostdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(CTANGLE)
+pmp_ctangle_sh = CWEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)`/pmpostdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(CTANGLE)
 
 ## pMetaPost C sources
 nodist_pmpost_SOURCES = $(pmp_c_h) $(pmpmath_c_h) $(pmpmathbinary_c_h) \
diff -urN texlive-source/texk/web2c/ptexdir/am/ptex.am.orig texlive-source/texk/web2c/ptexdir/am/ptex.am
--- texlive-source/texk/web2c/ptexdir/am/ptex.am.orig	2023-05-02 17:26:43.000000000 +0200
+++ texlive-source/texk/web2c/ptexdir/am/ptex.am	2024-07-01 18:27:36.262842400 +0200
@@ -8,7 +8,7 @@
 ptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES)
 ptex_ldadd = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) $(ZLIB_LIBS)
 ptex_dependencies = libkanji.a $(pproglib) $(PTEXENC_DEPEND) $(ZLIB_DEPEND) $(default_dependencies)
-p_tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir)/ptexdir:$(srcdir) $(buildenv) $(TANGLE)
+p_tangle = $(tangle_silent)WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)`/ptexdir:`cygpath -ua $(srcdir)` $(buildenv) $(TANGLE)
 
 
 ## pTeX library
diff -urN texlive-source/texk/web2c/uptexdir/am/uptex.am.orig texlive-source/texk/web2c/uptexdir/am/uptex.am
--- texlive-source/texk/web2c/uptexdir/am/uptex.am.orig	2023-05-02 17:26:43.000000000 +0200
+++ texlive-source/texk/web2c/uptexdir/am/uptex.am	2024-07-01 18:28:53.067444000 +0200
@@ -8,7 +8,7 @@
 uptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES)
 uptex_ldadd = libukanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) $(ZLIB_LIBS)
 uptex_dependencies = libukanji.a $(pproglib) $(PTEXENC_DEPEND) $(ZLIB_DEPEND) $(default_dependencies)
-up_tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir)/uptexdir:$(srcdir) $(buildenv) $(TANGLE)
+up_tangle = $(tangle_silent)WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)`/uptexdir:`cygpath -ua $(srcdir)` $(buildenv) $(TANGLE)
 
 upweb_programs = upbibtex updvitype uppltotf uptftopl
 
diff -urN texlive-source/texk/web2c/xetexdir/am/xetex.am.orig texlive-source/texk/web2c/xetexdir/am/xetex.am
--- texlive-source/texk/web2c/xetexdir/am/xetex.am.orig	2023-05-02 17:26:43.000000000 +0200
+++ texlive-source/texk/web2c/xetexdir/am/xetex.am	2024-07-01 18:30:15.864686600 +0200
@@ -15,7 +15,7 @@
 # Force Automake to use CXXLD for linking
 nodist_EXTRA_xetex_SOURCES = dummy.cxx
 
-xe_tangle = WEBINPUTS=.:$(srcdir)/xetexdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(OTANGLE)
+xe_tangle = WEBINPUTS=`cygpath -ua .`:`cygpath -ua $(srcdir)`/xetexdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(OTANGLE)
 
 libxetex = libxetex.a
 
