svn commit: r312556 - in stable/11/sys/boot: arm/uboot common efi/loader i386/loader mips/beri/loader mips/uboot pc98/loader powerpc/kboot powerpc/ofw powerpc/ps3 powerpc/uboot sparc64/loader userb...
Ed Maste
emaste at FreeBSD.org
Fri Jan 20 21:10:39 UTC 2017
Author: emaste
Date: Fri Jan 20 21:10:37 2017
New Revision: 312556
URL: https://svnweb.freebsd.org/changeset/base/312556
Log:
MFC r310267: Deduplicate loader vers.c Makefile rules
The Makefile rule to create vers.c for loader version info was
previously duplicated in each of the various loader Makefiles.
Instead, share a common rule in Makefile.inc.
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/sys/boot/arm/uboot/Makefile
stable/11/sys/boot/common/Makefile.inc
stable/11/sys/boot/efi/loader/Makefile
stable/11/sys/boot/i386/loader/Makefile
stable/11/sys/boot/mips/beri/loader/Makefile
stable/11/sys/boot/mips/uboot/Makefile
stable/11/sys/boot/pc98/loader/Makefile
stable/11/sys/boot/powerpc/kboot/Makefile
stable/11/sys/boot/powerpc/ofw/Makefile
stable/11/sys/boot/powerpc/ps3/Makefile
stable/11/sys/boot/powerpc/uboot/Makefile
stable/11/sys/boot/sparc64/loader/Makefile
stable/11/sys/boot/userboot/userboot/Makefile
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/boot/arm/uboot/Makefile
==============================================================================
--- stable/11/sys/boot/arm/uboot/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/arm/uboot/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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}
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}
Modified: stable/11/sys/boot/common/Makefile.inc
==============================================================================
--- stable/11/sys/boot/common/Makefile.inc Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/common/Makefile.inc Fri Jan 20 21:10:37 2017 (r312556)
@@ -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}
Modified: stable/11/sys/boot/efi/loader/Makefile
==============================================================================
--- stable/11/sys/boot/efi/loader/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/efi/loader/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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
Modified: stable/11/sys/boot/i386/loader/Makefile
==============================================================================
--- stable/11/sys/boot/i386/loader/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/i386/loader/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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
Modified: stable/11/sys/boot/mips/beri/loader/Makefile
==============================================================================
--- stable/11/sys/boot/mips/beri/loader/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/mips/beri/loader/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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/
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}
Modified: stable/11/sys/boot/mips/uboot/Makefile
==============================================================================
--- stable/11/sys/boot/mips/uboot/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/mips/uboot/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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}
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}
Modified: stable/11/sys/boot/pc98/loader/Makefile
==============================================================================
--- stable/11/sys/boot/pc98/loader/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/pc98/loader/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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
Modified: stable/11/sys/boot/powerpc/kboot/Makefile
==============================================================================
--- stable/11/sys/boot/powerpc/kboot/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/powerpc/kboot/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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/li
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}
Modified: stable/11/sys/boot/powerpc/ofw/Makefile
==============================================================================
--- stable/11/sys/boot/powerpc/ofw/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/powerpc/ofw/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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/li
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}
Modified: stable/11/sys/boot/powerpc/ps3/Makefile
==============================================================================
--- stable/11/sys/boot/powerpc/ps3/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/powerpc/ps3/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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}
Modified: stable/11/sys/boot/powerpc/uboot/Makefile
==============================================================================
--- stable/11/sys/boot/powerpc/uboot/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/powerpc/uboot/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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/li
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}
Modified: stable/11/sys/boot/sparc64/loader/Makefile
==============================================================================
--- stable/11/sys/boot/sparc64/loader/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/sparc64/loader/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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/li
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}
Modified: stable/11/sys/boot/userboot/userboot/Makefile
==============================================================================
--- stable/11/sys/boot/userboot/userboot/Makefile Fri Jan 20 19:08:44 2017 (r312555)
+++ stable/11/sys/boot/userboot/userboot/Makefile Fri Jan 20 21:10:37 2017 (r312556)
@@ -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
More information about the svn-src-stable
mailing list