summaryrefslogtreecommitdiff
path: root/com32/hdt/Makefile
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-11-26 22:25:34 +0100
committerErwan Velu <erwan.velu@free.fr>2009-12-04 10:11:13 +0100
commit529456bf2f1628a246f110672e1639390a065009 (patch)
treeefea594c862eca874c23d2e0d5614769fc8bcf44 /com32/hdt/Makefile
parentbfbd7a8fa1dd49ea0955bb336140d5cf1691c2f1 (diff)
downloadsyslinux-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/Makefile')
-rw-r--r--com32/hdt/Makefile6
1 files changed, 4 insertions, 2 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)