Print a copyright string in memdisk; clean up the handling of dates
authorhpa <hpa>
Thu, 13 Dec 2001 07:34:25 +0000 (07:34 +0000)
committerhpa <hpa>
Thu, 13 Dec 2001 07:34:25 +0000 (07:34 +0000)
somewhat.

Makefile
memdisk/Makefile
memdisk/setup.c

index d764825..1f10169 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,16 @@ OBSOLETE = pxelinux.bin
 # Things to install in /usr/bin
 INSTALL_BIN = syslinux gethostip ppmtolss16 lss16toppm
 
+# The DATE is set on the make command line when building binaries for
+# official release.  Otherwise, substitute a hex string that is pretty much
+# guaranteed to be unique to be unique from build to build.
+ifndef HEXDATE
+HEXDATE := $(shell perl now.pl ldlinux.asm pxelinux.asm isolinux.asm)
+endif
+ifndef DATE
+DATE    := $(HEXDATE)
+endif
+
 all:   $(BTARGET) $(ITARGET) samples memdisk
        ls -l $(BTARGET) $(ITARGET) memdisk/memdisk
 
@@ -60,16 +70,6 @@ samples:
 memdisk:
        $(MAKE) -C memdisk all
 
-# The DATE is set on the make command line when building binaries for
-# official release.  Otherwise, substitute a hex string that is pretty much
-# guaranteed to be unique to be unique from build to build.
-ifndef HEXDATE
-HEXDATE := $(shell perl now.pl ldlinux.asm pxelinux.asm)
-endif
-ifndef DATE
-DATE    := $(HEXDATE)
-endif
-
 ldlinux.bin: ldlinux.asm
        $(NASM) -f bin -dVERSION="'$(VERSION)'" -dDATE_STR="'$(DATE)'" \
                -dHEXDATE="$(HEXDATE)" \
index 70d6f69..9dfa9b6 100644 (file)
 ##
 ## -----------------------------------------------------------------------
 
+VERSION := $(shell cat ../version)
+
 CC      = gcc
 CFLAGS  = -Wall -O2 -fomit-frame-pointer -march=i386 \
-         -malign-functions=0 -malign-jumps=0 -malign-loops=0
+         -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
+         -DVERSION=\"$(VERSION)\" -DDATE=\"$(DATE)\"
 LDFLAGS = 
 AS      = as
 LD     = ld
index 1d1c2d5..04c2aaa 100644 (file)
@@ -15,6 +15,8 @@
 #include "e820.h"
 #include "conio.h"
 
+#define COPYYEAR "2001"
+
 extern const char _binary_memdisk_bin_start[], _binary_memdisk_bin_end[];
 extern const char _binary_memdisk_bin_size[]; /* Weird, I know */
 
@@ -392,7 +394,8 @@ uint32_t setup(void)
   int total_size;
 
   /* Show signs of life */
-  puts("Memdisk: Hello, World!\n");
+  puts("MEMDISK " VERSION " " DATE
+       "  Copyright " COPYYEAR " H. Peter Anvin\n");
 
   if ( !shdr->ramdisk_image || !shdr->ramdisk_size ) {
     puts("MEMDISK: No ramdisk image specified!\n");