]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Ensure dependencies of version.c are always rebuilt as expected
authorMichael Brown <mcb30@ipxe.org>
Tue, 3 Feb 2026 10:16:14 +0000 (10:16 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 3 Feb 2026 10:20:10 +0000 (10:20 +0000)
The core/version.c file is built into multiple objects (since it
incorporates the build target name such as "snponly.efi"), and is
handled separately from the standard build rules.

Add the missing line (taken from the standard build rules template) to
ensure that the dependency file is itself updated when the
dependencies change.

In particular, this ensures that the dependencies for core/version.c
will be updated when switching named configurations.

Reported-by: Christian I. Nilsson <ChristianN@2PintSoftware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/Makefile.housekeeping

index f227fdd76df71726f22a543ae513718e3387a88a..1f1cae2580752e03b5730e9ae5bbb632dffd403c 100644 (file)
@@ -1255,6 +1255,7 @@ $(BIN)/version.%.o : core/version.c $(MAKEDEPS) $(version_DEPS) $(GIT_INDEX)
                -DVERSION="\"$(VERSION)\"" \
                -c $< -o $@
        $(Q)$(OBJCOPY) --prefix-symbols=$(SYMBOL_PREFIX) $@
+$(BIN)/deps/core/version.c.d : $(version_DEPS)
 
 # Build an intermediate object file from the objects required for the
 # specified target.