[syslinux] [PATCH 1/4] efi: Don't unnecessarily rebuild syslinux.so
Celelibi
celelibi at gmail.com
Mon Sep 14 13:25:09 PDT 2015
2015-09-14 7:17 UTC+02:00, Geert Stappers via Syslinux <syslinux at zytor.com>:
> On Mon, Sep 14, 2015 at 05:50:56AM +0200, celelibi--- via Syslinux wrote:
>> From: Sylvain Gault <sylvain.gault at gmail.com>
>>
>> OBJ directory creation changed from a .PHONY target to a real target
>> used through an order-only dependency.
>>
>> A target depending on another target marked .PHONY is always rebuilt,
>> thus forcing all the .o files to be rebuilt everytime.
>>
>> Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com>
>> --- a/efi/Makefile
>> +++ b/efi/Makefile
>> @@ -60,11 +60,10 @@ DATE := $(shell sh $(SRC)/../gen-id.sh $(VERSION)
>> $(HEXDATE))
>> endif
>> CFLAGS += -DDATE_STR='"$(DATE)"'
>>
>> -.PHONY: subdirs
>> -subdirs:
>> - mkdir -p $(ARCH)
>> +$(OBJ)/$(ARCH):
>> + mkdir -p $@
>>
>> -$(OBJS): subdirs
>> +$(OBJS): | $(OBJ)/$(ARCH)
>
> What does the | do?
The prerequisites after the | are "order-only". Which means that make
only test for existence and not for the date. The date is meaningless
for a directory as it is modified everytime a file is rebuilt. Thus,
of $(OBJS) would have a regular dependency on it, every .o would have
to be rebuilt every time one file is rebuilt.
This is a typical use for the order-only dependencies.
https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
>
>
>
>> # The targets to build in this directory
>> BTARGET = syslinux.efi
Celelibi
More information about the Syslinux
mailing list