dk / Prima

prima.eu.org
Other
106 stars 27 forks source link

Makefile: Declare all files generated with utils/prima-gencls.pl #86

Closed ppisar closed 1 year ago

ppisar commented 1 year ago

Parallel make randomly fails with:

/usr/bin/perl -I. utils/prima-gencls.pl --inc --h -Iclass --tml class/Object.cls include/generic /usr/bin/perl -I. utils/prima-gencls.pl --inc --h -Iclass --tml class/Utils.cls include/generic make: No rule to make target 'include/generic/Types.inc', needed by 'api/thunks.o'. Stop. make: Waiting for unfinished jobs.... /usr/bin/perl -I. utils/prima-gencls.pl --inc --h -Iclass --tml class/Types.cls include/generic

Observe that api/thunks.c which includes include/generic/Types.inc is compiled before generating include/generic/Types.inc.

The cause is that Makefile does not declare that the inc files are generated by utils/prima-gencls.pl from cls files as can be verified with:

$ make -n api/thunks.o /usr/bin/perl -I. utils/prima-gencls.pl --inc --h -Iclass --tml class/Types.cls include/generic [...] make: *** No rule to make target 'include/generic/Types.inc', needed by 'api/thunks.o'. Stop.

This patch adds all the generated files to the targets produced by prima-gencls.pl script.