From: H. Peter Anvin Date: Mon, 7 Jul 2008 22:32:21 +0000 (-0700) Subject: Share the gen-id stuff between core and memdisk X-Git-Tag: syslinux-3.71-pre6~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=852d962ee2d0a51bf7aa3c6f0b1fdecbef1a3efd;p=profile%2Fivi%2Fsyslinux.git Share the gen-id stuff between core and memdisk Both core and memdisk wants to use the gen-id stuff, so let it. --- diff --git a/core/Makefile b/core/Makefile index f5b9b4e..a04a84f 100644 --- a/core/Makefile +++ b/core/Makefile @@ -69,10 +69,10 @@ ALLSRC = $(NASMSRC) $(NASMHDR) $(CSRC) $(CHDR) $(OTHERSRC) # 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 $(SRCS)) +HEXDATE := $(shell $(PERL) ../now.pl $(SRCS)) endif ifndef DATE -DATE := $(shell sh gen-id.sh $(HEXDATE)) +DATE := $(shell sh ../gen-id.sh $(HEXDATE)) endif all: $(BTARGET) diff --git a/core/config.inc b/core/config.inc index 9ff7b85..8dd9ca6 100644 --- a/core/config.inc +++ b/core/config.inc @@ -46,9 +46,7 @@ MAX_FKEYS equ 12 ; Number of F-key help files ; ; Version number definitinons ; -%ifndef DEPEND ; Generated file %include "../version.gen" -%endif ; ; Copyright year... diff --git a/core/gen-id.sh b/gen-id.sh similarity index 100% rename from core/gen-id.sh rename to gen-id.sh diff --git a/memdisk/Makefile b/memdisk/Makefile index 005ab1d..073d32c 100644 --- a/memdisk/Makefile +++ b/memdisk/Makefile @@ -38,6 +38,18 @@ NINCLUDE = OBJCOPY = objcopy PERL = perl +SRCS = $(wildcard *.asm *.c *.h) + +# 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 $(SRCS)) +endif +ifndef DATE +DATE := $(shell sh ../gen-id.sh $(HEXDATE)) +endif + # Important: init.o16 must be first!! OBJS16 = init.o16 init32.o OBJS32 = start32.o setup.o msetup.o e820func.o conio.o memcpy.o memset.o \ diff --git a/memdisk/memdisk16.asm b/memdisk/memdisk16.asm index d73ddc5..d43404e 100644 --- a/memdisk/memdisk16.asm +++ b/memdisk/memdisk16.asm @@ -19,6 +19,8 @@ ;; com32.inc in the main SYSLINUX distribution. ;; +%include '../version.gen' + MY_CS equ 0x0800 ; Segment address to use CS_BASE equ (MY_CS << 4) ; Corresponding address @@ -79,7 +81,7 @@ b_edx dd 0 ; EDX for boot sector invocation section .rodata memdisk_version: - db "MEMDISK ", VERSION, " ", DATE, 0 + db "MEMDISK ", VERSION_STR, " ", DATE, 0 ;; ----------------------------------------------------------------------- ;; End kernel image header diff --git a/core/now.pl b/now.pl similarity index 100% rename from core/now.pl rename to now.pl