From: Michael Tremer Date: Wed, 11 Oct 2017 19:45:35 +0000 (+0100) Subject: Use our own versioning field to make upgrades easier X-Git-Tag: v2.0^0 X-Git-Url: http://git.ipfire.org/?p=oddments%2Fipfire-netboot.git;a=commitdiff_plain;h=97930a3e0b8583e64c220c7f7272d88315c17893 Use our own versioning field to make upgrades easier Signed-off-by: Michael Tremer --- diff --git a/.gitignore b/.gitignore index 04a0ff7..1d9eb74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /bin /bin-x86_64-efi +/ipfireboot.ipxe diff --git a/Makefile b/Makefile index 1c6e8c0..cfc3d18 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ +VERSION = 2.0 + SCRIPTS = $(CURDIR)/ipfireboot.ipxe MACHINE = $(shell uname -m) @@ -13,10 +15,14 @@ endif all: $(TARGETS) clean: - rm -rfv $(TARGETS) + rm -rfv $(SCRIPTS) $(TARGETS) make -C ipxe/src clean veryclean -$(TARGETS): config/branding.h config/general.h +%: %.in + sed -e "s/@VERSION@/$(VERSION)/g" \ + < $< > $@ + +$(TARGETS): $(SCRIPTS) config/branding.h config/general.h # Copy our configuration to the gPXE submodule cp -vf config/* ipxe/src/config/local/ diff --git a/ipfireboot.ipxe b/ipfireboot.ipxe.in similarity index 70% rename from ipfireboot.ipxe rename to ipfireboot.ipxe.in index e61e92d..9483d03 100644 --- a/ipfireboot.ipxe +++ b/ipfireboot.ipxe.in @@ -9,4 +9,4 @@ cpuid --ext 29 && set arch x86_64 || set arch i386 # Try to boot from DHCP. dhcp net0 -chain http://boot.ipfire.org/menu.gpxe?arch=${arch}&platform=${platform} +chain http://boot.ipfire.org/menu.gpxe?version=@VERSION@&arch=${arch}&platform=${platform}