Hi Simon, On 10/16/17, Simon Sobisch <simonsobi...@web.de> wrote: [...] > Running without `make -j` always work but using parallel builds sometime > break with the mentioned error. [...] > ~~~ > gcc -O2 -pipe -finline-functions -fsigned-char -Wall -Wwrite-strings > -Wmissing-prototypes -Wno-format-y2k -U_FORTIFY_SOURCE > -Wl,-z,relro,-z,now,-O1 /home/simon/gnucobol/cobc/../cobc/cobc.c -o > ../cobc/cobc > /home/simon/gnucobol/cobc/../cobc/cobc.c:26:10: fatal error: config.h: > No such file or directory > #include "config.h" > ^~~~~~~~~~ > compilation terminated.
I took a quick look at your project. The problem is likely this bit from cobc/Makefile.am: COBC = $(top_builddir)/cobc/cobc$(EXEEXT) cobc.1: [...] $(COBC) The problem is that this COBC macro does not match the Automake generated target name. When it gets pulled in as a prerequisite for cobc.1 and the file does not already exist, the built-in GNU make rule applies, which produces cobc from cobc.c. This is the wrong rule, so the compilation fails. The prerequisites in make rules typically should match the target names exactly. In this case, it should be: cobc.1: [...] cobc$(EXEEXT) Hope that helps, Nick