[build] Allow for construction of a text file containing the version

Add a rule to construct bin/version.txt containing the version number,
to allow a GitHub Actions workflow to verify that a tagged release
embeds a version number that matches the tag.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-02-19 12:54:02 +00:00
parent 0cde7ce6df
commit 8fb90cb403
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -1094,6 +1094,11 @@ $(BIN)/NIC : $(AUTO_DEPS)
@perl -ne 'chomp; print "$$1\n" if /\# NIC\t(.*)$$/' $^ >> $@
CLEANUP += $(BIN)/NIC # Doesn't match the $(BIN)/*.* pattern
# Generate version number record
#
$(BIN)/version.txt : $(MAKEDEPS)
@$(ECHO) "$(VERSION)" > $@
# Analyse a target name (e.g. "bin/dfe538--prism2_pci.rom.tmp") and
# derive the variables:
#