diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-11-26 22:25:34 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-12-04 10:11:13 +0100 |
commit | 529456bf2f1628a246f110672e1639390a065009 (patch) | |
tree | efea594c862eca874c23d2e0d5614769fc8bcf44 /com32/hdt | |
parent | bfbd7a8fa1dd49ea0955bb336140d5cf1691c2f1 (diff) | |
download | syslinux-529456bf2f1628a246f110672e1639390a065009.tar.gz |
hdt: Auto generating versions for menu mode
Impact: visual
The menu mode now display the current version
Diffstat (limited to 'com32/hdt')
-rw-r--r-- | com32/hdt/Makefile | 6 | ||||
-rw-r--r-- | com32/hdt/floppy/hdt.cfg | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/com32/hdt/Makefile b/com32/hdt/Makefile index 3c023964..b5a32af7 100644 --- a/com32/hdt/Makefile +++ b/com32/hdt/Makefile @@ -26,6 +26,7 @@ MODULES = hdt.c32 TESTFILES = OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) +VERSION = $(shell $(SED) -n 's/\#define VERSION \"\(.*\)\"/\1/p' hdt.h) KERNEL_VERSION ?= $(shell uname -r) MODULES_ALIAS_FILE ?= /lib/modules/$(KERNEL_VERSION)/modules.alias @@ -48,6 +49,7 @@ hdt.elf : $(OBJS) $(LIBS) $(C_LIBS) hdt.img: hdt.c32 $(FLOPPY_DIR)/hdt.cfg $(FLOPPY_DIR)/mtools.conf $(topdir)/mtools/syslinux $(REBOOT_COM32) $(MENU_COM32) rm -f hdt.img + $(SED) -e 's/%VERSION%/$(VERSION)/g' $(FLOPPY_DIR)/hdt.cfg > $(FLOPPY_DIR)/syslinux.cfg MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MFORMAT) -v HDT -f 1440 -C a: $(topdir)/mtools/syslinux hdt.img -[ ! -f $(GZ_PCI_IDS_FILE) ] && cp /usr/share/hwdata/pci.ids $(PCI_IDS_FILE) && $(GZIPPROG) $(PCI_IDS_FILE) @@ -58,7 +60,7 @@ hdt.img: hdt.c32 $(FLOPPY_DIR)/hdt.cfg $(FLOPPY_DIR)/mtools.conf $(topdir)/mtool MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(MENU_COM32) a: MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(REBOOT_COM32) a: @ [ -f $(GZ_PCI_IDS_FILE) ] && MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(GZ_PCI_IDS_FILE) a:pci.ids || printf "\nThe $(GZ_PCI_IDS_FILE) file is missing and can be downloaded from http://pciids.sourceforge.net and gzipped in\nthe ./com32/hdt/$(FLOPPY_DIR) directory of the extracted Syslinux source.\n\n" - MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(FLOPPY_DIR)/hdt.cfg a:syslinux.cfg + MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(FLOPPY_DIR)/syslinux.cfg a: MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(ART_DIR)/backgnd.png a: hdt.img.gz: hdt.img @@ -70,7 +72,7 @@ hdt.iso: hdt.c32 $(topdir)/core/isolinux.bin $(FLOPPY_DIR)/hdt.cfg rm -f hdt.iso mkdir -p $(ISO_DIR)/$(ISOLINUX_DIR) cp $(topdir)/core/isolinux.bin $(ISO_DIR)/$(ISOLINUX_DIR) - cp $(FLOPPY_DIR)/hdt.cfg $(ISO_DIR)/$(ISOLINUX_DIR)/isolinux.cfg + $(SED) -e 's/%VERSION%/$(VERSION)/g' $(FLOPPY_DIR)/hdt.cfg > $(ISO_DIR)/$(ISOLINUX_DIR)/isolinux.cfg cp hdt.c32 $(ISO_DIR)/$(ISOLINUX_DIR) cp $(REBOOT_COM32) $(ISO_DIR)/$(ISOLINUX_DIR) cp $(MENU_COM32) $(ISO_DIR)/$(ISOLINUX_DIR) diff --git a/com32/hdt/floppy/hdt.cfg b/com32/hdt/floppy/hdt.cfg index 010d1372..6b0c97d5 100644 --- a/com32/hdt/floppy/hdt.cfg +++ b/com32/hdt/floppy/hdt.cfg @@ -1,7 +1,8 @@ -DEFAULT menu.c32 +UI menu.c32 +DEFAULT hdt PROMPT 0 TIMEOUT 50 -MENU TITLE Hardware Detection Tool (HDT) +MENU TITLE Hardware Detection Tool (HDT) version %VERSION% MENU MARGIN 0 MENU ROWS 15 MENU TABMSG |