I'm having a problem building gawk for mingw64. I'm not using
configure, as that assumes a POSIX-like environment such as msys or
cygwin). Rather, gawk has a customised build process for PC/mingw. You
copy some customised files from the pc subdirectory, including a
makefile and a config.h, and then run make.

What I'm trying to do is to modify this build process to allow it to
be packaged. So I've made the code get its paths relative to the exe
(using the msys2 pathtools library), and modified how the default path
is set. I'm setting a prefix=/mingw64 argument to make, which I'm then
using to set defines -DBINDIR="\"$(prefix)/bin\"" and a default path,
in the CFLAGS. Then I make the default path relative (using BINDIR as
the root). It's not the most straightforward process, but it's
relatively clean.

The problem is that it appears that by the time the BINDIR and DEFPATH
macros are seen in the source code, their values are Windows-style
paths (C:\Work\Scratch\msys2\...), which completely breaks the path
correction code which expects Unix-style paths.

I'm guessing that this is caused by some part of the msys
infrastructure "helpfully" converting paths. But I've no idea where,
nor how to stop it doing so. Can anyone help?

I could hard-code the values in the source, but if I do that, I can't
make a viable PKGBUILD spec, as that requires the ability to specify
the install directory at build time. (Hmm, actually I could - the
relocation code doesn't care if the arguments to
get_relocated_path_list are *accurate*, just that they are consistent.
But it's horribly ugly, and I'd still like to know what's going on
with the path translation code anyway).

Thanks,
Paul

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to