diff --git a/Makefile b/Makefile index 212027d..1714fed 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,15 @@ PACKAGE = emile VERSION = 0.4CVS +# build info + +WHO = $(shell whoami) +WHERE = $(shell hostname) +WHEN = $(shell LANG=C date) +ARCH = $(shell uname -m -o) + +SIGNATURE = $(PACKAGE)-$(VERSION) $(WHO)@$(WHERE)($(ARCH)) $(WHEN) + # tools to use ifneq ($(shell uname -m),m68k) @@ -55,14 +64,14 @@ vmlinuz: vmlinux.bin mv vmlinuz.out.gz vmlinuz first/first:: - $(MAKE) -C first OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) AS=$(AS) + $(MAKE) -C first OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) AS=$(AS) SIGNATURE="$(SIGNATURE)" second/second:: $(MAKE) -C second OBJCOPY=$(OBJCOPY) LD=$(LD) CC=$(CC) AS=$(AS) \ - VERSION=$(VERSION) KERNEL_ARCH=$(KERNEL_ARCH) + VERSION=$(VERSION) KERNEL_ARCH=$(KERNEL_ARCH) SIGNATURE="$(SIGNATURE)" tools:: - $(MAKE) -C tools all + $(MAKE) -C tools all VERSION=$(VERSION) SIGNATURE="$(SIGNATURE)" dump: floppy.img diff --git a/tools/Makefile b/tools/Makefile index 9d0e7e8..a93c3d2 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -6,6 +6,7 @@ PROGRAMS = emile-set-cmdline emile-first-info emile-first-tune emile-install +CPPFLAGS = -DSIGNATURE="\"$(SIGNATURE)\"" CFLAGS = -Wall all: $(PROGRAMS) diff --git a/tools/emile-first-info.c b/tools/emile-first-info.c index 719692a..1be9d1d 100644 --- a/tools/emile-first-info.c +++ b/tools/emile-first-info.c @@ -19,6 +19,7 @@ static void usage(int argc, char** argv) { fprintf(stderr, "Usage: %s \n", argv[0]); fprintf(stderr, "\n display first level boot block info\n"); + fprintf(stderr, "\nbuild: \n%s\n", SIGNATURE); } static void pprint(char *string) diff --git a/tools/emile-first-tune.c b/tools/emile-first-tune.c index 06d4a73..d81b76c 100644 --- a/tools/emile-first-tune.c +++ b/tools/emile-first-tune.c @@ -27,6 +27,7 @@ static void usage(int argc, char** argv) fprintf(stderr, " -o : set offset of second level in bytes\n"); fprintf(stderr, " -s : set size of second level in bytes\n"); fprintf(stderr, "Display current values if no flags provided\n"); + fprintf(stderr, "\nbuild: \n%s\n", SIGNATURE); } int first_tune( char* image, unsigned short tune_mask, int drive_num, diff --git a/tools/emile-install.c b/tools/emile-install.c index 25d05f3..e23ff1b 100644 --- a/tools/emile-install.c +++ b/tools/emile-install.c @@ -19,6 +19,7 @@ static void usage(int argc, char** argv) { fprintf(stderr, "Usage: %s -f -s -i -r -b \n", argv[0]); + fprintf(stderr, "\nbuild: \n%s\n", SIGNATURE); } static unsigned long get_size(char* file) diff --git a/tools/emile-set-cmdline.c b/tools/emile-set-cmdline.c index 989eaa4..0a44563 100644 --- a/tools/emile-set-cmdline.c +++ b/tools/emile-set-cmdline.c @@ -34,6 +34,7 @@ static void usage(int argc, char** argv) /* and when kernel will support floppy driver: * KERNEL_ARGS="vga=normal noinitrd load_ramdisk=1 prompt_ramdisk=1 ramdisk_size=16384 root=/dev/fd0 disksize=1.44 flavor=compact" */ + fprintf(stderr, "\nbuild: \n%s\n", SIGNATURE); } int set_cmdline(int readonly, char* image, char* cmdline)