summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/boot/arm/uboot/Makefile5
-rw-r--r--sys/boot/common/Makefile.inc5
-rw-r--r--sys/boot/efi/loader/Makefile5
-rw-r--r--sys/boot/i386/loader/Makefile7
-rw-r--r--sys/boot/mips/beri/loader/Makefile6
-rw-r--r--sys/boot/mips/uboot/Makefile5
-rw-r--r--sys/boot/pc98/loader/Makefile6
-rw-r--r--sys/boot/powerpc/kboot/Makefile5
-rw-r--r--sys/boot/powerpc/ofw/Makefile5
-rw-r--r--sys/boot/powerpc/ps3/Makefile5
-rw-r--r--sys/boot/powerpc/uboot/Makefile5
-rw-r--r--sys/boot/sparc64/loader/Makefile7
-rw-r--r--sys/boot/userboot/userboot/Makefile5
13 files changed, 19 insertions, 52 deletions
diff --git a/sys/boot/arm/uboot/Makefile b/sys/boot/arm/uboot/Makefile
index 8b4b8ca..a83d0d6 100644
--- a/sys/boot/arm/uboot/Makefile
+++ b/sys/boot/arm/uboot/Makefile
@@ -90,7 +90,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I.
-CLEANFILES+= vers.c loader.help
+CLEANFILES+= loader.help
CFLAGS+= -ffreestanding -msoft-float
@@ -117,9 +117,6 @@ LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} -lstand
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-
loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
diff --git a/sys/boot/common/Makefile.inc b/sys/boot/common/Makefile.inc
index 480279d..8bd6c7d 100644
--- a/sys/boot/common/Makefile.inc
+++ b/sys/boot/common/Makefile.inc
@@ -70,3 +70,8 @@ CFLAGS+= -DBOOT_PROMPT_123
SRCS+= install.c
CFLAGS+=-I${.CURDIR}/../../../../lib/libstand
.endif
+
+CLEANFILES+= vers.c
+VERSION_FILE?= ${.CURDIR}/version
+vers.c: ${SRCTOP}/sys/boot/common/newvers.sh ${VERSION_FILE}
+ sh ${SRCTOP}/sys/boot/common/newvers.sh ${VERSION_FILE} ${NEWVERSWHAT}
diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile
index b36bfc1..ffa003e 100644
--- a/sys/boot/efi/loader/Makefile
+++ b/sys/boot/efi/loader/Makefile
@@ -110,13 +110,10 @@ FILESMODE_loader.efi= ${BINMODE}
LDSCRIPT= ${.CURDIR}/arch/${MACHINE}/ldscript.${MACHINE}
LDFLAGS+= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared
-CLEANFILES+= vers.c loader.efi
+CLEANFILES+= loader.efi
NEWVERSWHAT= "EFI loader" ${MACHINE}
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../efi/loader/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-
NM?= nm
OBJCOPY?= objcopy
diff --git a/sys/boot/i386/loader/Makefile b/sys/boot/i386/loader/Makefile
index 3f54454..c8d31b8 100644
--- a/sys/boot/i386/loader/Makefile
+++ b/sys/boot/i386/loader/Makefile
@@ -8,6 +8,7 @@ PROG= ${LOADER}.sym
MAN=
INTERNALPROG=
NEWVERSWHAT?= "bootstrap loader" x86
+VERSION_FILE= ${.CURDIR}/../loader/version
# architecture-specific loader code
SRCS= main.c conf.c vers.c
@@ -72,7 +73,7 @@ CFLAGS+= -I${.CURDIR}/../../.. -D_STAND
CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I.
-CLEANFILES= vers.c ${LOADER} ${LOADER}.bin loader.help
+CLEANFILES= ${LOADER} ${LOADER}.bin loader.help
CFLAGS+= -Wall
LDFLAGS= -static -Ttext 0x0
@@ -93,10 +94,6 @@ CFLAGS+= -I${.CURDIR}/../btx/lib
# Pick up ../Makefile.inc early.
.include <bsd.init.mk>
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
- ${NEWVERSWHAT}
-
${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-b ${BTXKERN} ${LOADER}.bin
diff --git a/sys/boot/mips/beri/loader/Makefile b/sys/boot/mips/beri/loader/Makefile
index d20c01f..77262f3 100644
--- a/sys/boot/mips/beri/loader/Makefile
+++ b/sys/boot/mips/beri/loader/Makefile
@@ -92,7 +92,7 @@ CFLAGS+= -I${.CURDIR}/../common
# Loader-specific MD headers
CFLAGS+= -I${.CURDIR}
-CLEANFILES+= vers.c loader.help
+CLEANFILES+= loader.help
# Generate code appropriate for the loader environment
CFLAGS+= -G0 \
@@ -114,10 +114,6 @@ LIBSTAND= ${.OBJDIR}/../../../../../lib/libstand/libstand.a
DPADD= ${LIBFICL} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBSTAND}
-vers.c: ${.CURDIR}/../../../common/newvers.sh ${.CURDIR}/version
- sh ${.CURDIR}/../../../common/newvers.sh ${.CURDIR}/version \
- ${NEWVERSWHAT}
-
loader.help: help.common help.mips
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../../common/merge_help.awk > ${.TARGET}
diff --git a/sys/boot/mips/uboot/Makefile b/sys/boot/mips/uboot/Makefile
index 6be362c..c5d06f0 100644
--- a/sys/boot/mips/uboot/Makefile
+++ b/sys/boot/mips/uboot/Makefile
@@ -99,7 +99,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I.
-CLEANFILES+= vers.c loader.help
+CLEANFILES+= loader.help
CFLAGS+= -ffreestanding -msoft-float -g
@@ -128,9 +128,6 @@ LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-
loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
diff --git a/sys/boot/pc98/loader/Makefile b/sys/boot/pc98/loader/Makefile
index 319600f..d75e8d0 100644
--- a/sys/boot/pc98/loader/Makefile
+++ b/sys/boot/pc98/loader/Makefile
@@ -8,6 +8,7 @@ LOADER?= loader
PROG= ${LOADER}.sym
INTERNALPROG=
NEWVERSWHAT= "bootstrap loader" pc98
+VERSION_FILE= ${.CURDIR}/../../i386/loader/version
# architecture-specific loader code
SRCS= main.c conf.c vers.c
@@ -48,7 +49,7 @@ CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I${.CURDIR}/../../i386
CFLAGS+= -I.
-CLEANFILES= vers.c ${LOADER} ${LOADER}.bin loader.help
+CLEANFILES= ${LOADER} ${LOADER}.bin loader.help
CFLAGS+= -Wall
LDFLAGS= -static -Ttext 0x0
@@ -69,9 +70,6 @@ CFLAGS+= -I${.CURDIR}/../btx/lib
# Pick up ../Makefile.inc early.
.include <bsd.init.mk>
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT}
-
${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-b ${BTXKERN} ${LOADER}.bin
diff --git a/sys/boot/powerpc/kboot/Makefile b/sys/boot/powerpc/kboot/Makefile
index c161a9c..ca46398 100644
--- a/sys/boot/powerpc/kboot/Makefile
+++ b/sys/boot/powerpc/kboot/Makefile
@@ -76,7 +76,7 @@ CFLAGS+= -mcpu=powerpc64
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
CFLAGS+= -I.
-CLEANFILES+= vers.c loader.help
+CLEANFILES+= loader.help
CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM
# load address. set in linker script
@@ -99,9 +99,6 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-
loader.help: help.common help.kboot ${.CURDIR}/../../fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
diff --git a/sys/boot/powerpc/ofw/Makefile b/sys/boot/powerpc/ofw/Makefile
index eccf3c5..5ce47cf 100644
--- a/sys/boot/powerpc/ofw/Makefile
+++ b/sys/boot/powerpc/ofw/Makefile
@@ -73,7 +73,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
CFLAGS+= -I.
-CLEANFILES+= vers.c loader.help
+CLEANFILES+= loader.help
CFLAGS+= -ffreestanding -msoft-float
# load address. set in linker script
@@ -97,9 +97,6 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSTAND}
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-
loader.help: help.common help.ofw ${.CURDIR}/../../fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
diff --git a/sys/boot/powerpc/ps3/Makefile b/sys/boot/powerpc/ps3/Makefile
index 0cbc166..b2f2ef6 100644
--- a/sys/boot/powerpc/ps3/Makefile
+++ b/sys/boot/powerpc/ps3/Makefile
@@ -76,7 +76,7 @@ CFLAGS+= -mcpu=powerpc64
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
CFLAGS+= -I.
-CLEANFILES+= vers.c loader.help
+CLEANFILES+= loader.help
CFLAGS+= -Wall -ffreestanding -msoft-float -DAIM
# load address. set in linker script
@@ -101,9 +101,6 @@ SC_DFLT_FONT=cp437
font.h:
uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-
loader.help: help.common help.ps3 ${.CURDIR}/../../fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
diff --git a/sys/boot/powerpc/uboot/Makefile b/sys/boot/powerpc/uboot/Makefile
index 681249a..6ff3acf 100644
--- a/sys/boot/powerpc/uboot/Makefile
+++ b/sys/boot/powerpc/uboot/Makefile
@@ -79,7 +79,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../..
CFLAGS+= -I.
-CLEANFILES+= vers.c ${PROG}.help
+CLEANFILES+= ${PROG}.help
CFLAGS+= -ffreestanding
@@ -102,9 +102,6 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND}
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-
loader.help: help.common help.uboot ${.CURDIR}/../../fdt/help.fdt
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
diff --git a/sys/boot/sparc64/loader/Makefile b/sys/boot/sparc64/loader/Makefile
index 2884cf0..5cdbdbb 100644
--- a/sys/boot/sparc64/loader/Makefile
+++ b/sys/boot/sparc64/loader/Makefile
@@ -6,6 +6,7 @@ MAN=
PROG?= loader
NEWVERSWHAT?= "bootstrap loader" sparc64
+VERSION_FILE= ${.CURDIR}/../loader/version
INSTALLFLAGS= -b
# Architecture-specific loader code
@@ -70,7 +71,7 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I.
-CLEANFILES+= vers.c loader.help
+CLEANFILES+= loader.help
LDFLAGS= -static
@@ -84,10 +85,6 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
- ${NEWVERSWHAT}
-
loader.help: help.common help.sparc64
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
diff --git a/sys/boot/userboot/userboot/Makefile b/sys/boot/userboot/userboot/Makefile
index ac3db42..043dbfb 100644
--- a/sys/boot/userboot/userboot/Makefile
+++ b/sys/boot/userboot/userboot/Makefile
@@ -39,11 +39,6 @@ LDFLAGS+= -nostdlib -Wl,-Bsymbolic
NEWVERSWHAT= "User boot" ${MACHINE_CPUARCH}
-vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
- sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
-
-CLEANFILES= vers.c
-
.if ${MK_FORTH} != "no"
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386
OpenPOWER on IntegriCloud