[syslinux] Makefiles: includes and rule prerequisites

H. Peter Anvin hpa at zytor.com
Sat Jan 18 17:32:40 PST 2014


On 01/18/2014 05:23 PM, Gene Cumm wrote:
> 
> I wondered which was the error (the include or the gcc test rule)
> 

The include.  Fixed.

>>> 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.
> 
> I wasn't questioning the first 10 lines to build the directories
> recursively but the following lines of rules without recipes used to
> resolve dependencies.  In other words, can things be structured to
> work on building say %.o %.elf but stall buidling %.c32 until the
> dependent libraries are finished.
> 

I don't think that can be done with a recursive make.  A non-recursive
make infrastructure can do it, but we don't have one of those, really.

	-hpa



More information about the Syslinux mailing list