This worked like a charm. While the full path is needed later (when invoking help2man) it should not be used as prerequisite.
Thank you very much! Simon Am 16.10.2017 um 22:19 schrieb Nick Bowler: > 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 >