[syslinux] Makefiles: includes and rule prerequisites

H. Peter Anvin hpa at zytor.com
Sat Jan 18 15:18:53 PST 2014


On 01/18/2014 12:58 PM, Gene Cumm wrote:
> 1) mk/syslinux.mk runs a shell to make a temp file gcc_ok.$$$$.tmp
> (perhaps in the wrong directory) while several Makefiles have an
> include rule for *.tmp which I believe is causing some occasional
> parallel build issues.
> 
> make[3]: Entering directory `/home/gene/s/g/bios/memdump'
> gcc_ok.6333.tmp:1: warning: NUL character seen; rest of line ignored
> gcc_ok.6333.tmp:1: *** missing separator.  Stop.
> make[3]: Leaving directory `/home/gene/s/g/bios/memdump'
> make[2]: *** [memdump] Error 2
> 

Oops.  My bad.

> 
> 2) For recursive prerequisites, is it better to list the directory as
> a prerequisite (simple and current approach) or would it be better to
> have a more complex set of rules like the following:
> 
> --In com32/Makefile:
> lib/libcom32.c32 lib/libcom32min.a lib/libcom32core.a: lib
> libutil/libutil.c32: libutil
> 
> --In com32/rosh/Makefile:
> rosh.c32: lib/libcom32.c32 libutil/libutil.c32
> 

You *have* to use a PHONY target, e.g. the directory name.  Otherwise
you may end up with a dependency getting skipped simply due to the file
you test for existing since a previous build, it will then get rebuilt
later and all kinds of problems will happen.

	-hpa



More information about the Syslinux mailing list