I have a local noinst binary which is used before compilation to generate some c code.
I have so far just created the binary target as noinst_PROGRAMS and then depends on it in the target for creating the source file - something like: noinst_PROGRAMS = myprog myhelper myhelper_SOURCES = myhelper.cc myprog_SOURCES = myprog.cc $(top_builddir)/generated.cc $(top_builddir)/generated.cc: myhelper$(EXEEXT) ./myhelper$(EXEEXT) > $@ I am now trying to make the program compile on windows using msys2 and have noticed that the helper is created inside the .libs folder along with a wrapper script. A binary is also stored in the top_builddir but this has a different size than the one in .libs and doesn't appear to do anything when executed (the one in .libs works). On linux/bsd the utility is simply generated directly in the top_builddir and works. Note: In order to have the helper compile at all on windows I had to add the $(EXEEXT). So what is best practice when working with such a helper/utility? Kind regards Bent Bisballe Nyeng