[U-Boot-Users] [PATCH] Remove $(VERSION_FILE) from PHONY Target List

Grant Erickson gerickson at nuovations.com
Sun Apr 13 08:20:49 CEST 2008


On 4/12/08 12:29 PM, Mike Frysinger wrote:
> On Friday 11 April 2008, Grant Erickson wrote:
>> When building against non-local, non-disk-backed file systems (e.g. NFS,
>> tmpfs), the u-boot build can iterate forever, attempting to re-generate
>> "include/autoconf.mk". This occurs because $(VERSION_FILE) (aka
>> ${ROOT}/u-boot/build/include/version_autogenerated.h) is always regarded as
>> out-of-date because it is in the .PHONY target list, even though it's a
>> real file and seems to need to be only created once and only once.
>> 
>> This patch removes $(VERSION_FILE) from the .PHONY target list and has been
>> verified to work with various flavors and builds of make-3.81 against NFS,
>> ext2fs, ext3fs and tmpfs file systems.
> 
> that statement is incorrect.  the version file is supposed to be checked
> everytime you run make as it depends on a whole lot of information which
> cannot be expressed in the makefile.  thus it needs to be a PHONY.
> 
> the latest git tree does the right thing: it doesnt actually replace the file
> unless it has changed which means nothing else will get regenerated unless
> the file actually changes.
> -mike

Mike,

Thanks for following up. The hypothesis (i.e. the version file is supposed
to be checked) is well supported by the code; however, the latest git code
as it stands neither seems to support the conclusion--namely $(VERSION_FILE)
should be in the PHONY target list--nor that it depends on a whole lot of
information. The contents of the file are simply:

    % cat include/version_autogenerated.h
    #define U_BOOT_VERSION "U-Boot 1.3.2"

and the only thing $(VERSION_FILE) depends on, implicitly, is the Makefile
itself.

At this point, the discussion is academic since, happily, the patch has been
implicitly accepted by token of already being in git and, presumably, 1.3.3
when it emerges.

Best,

Grant






More information about the U-Boot mailing list