Skip to content

Commit

Permalink
Move loader help file definitions to being 100% inside of loader.mk.
Browse files Browse the repository at this point in the history
HELP_FILES is a loader only thing, so move it to loader.mk. Only
generate the help file if HELP_FILES is defined. Adjust Makefiles to
new convention. Fix a few cases where ${.CURDIR}/ was missing
resulting in missing bits from the help files.

Sponsored by: Netflix
  • Loading branch information
bsdimp committed Dec 18, 2017
1 parent b549627 commit 25c2f4c
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 21 deletions.
2 changes: 1 addition & 1 deletion stand/arm/uboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SRCS= start.S conf.c self_reloc.c vers.c
CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized
.endif

HELP_FILES+= help.uboot ${BOOTSRC}/fdt/help.fdt
HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt

# Always add MI sources
.include "${BOOTSRC}/loader.mk"
Expand Down
4 changes: 0 additions & 4 deletions stand/defs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,4 @@ ${_ILINKS}:
${ECHO} ${.TARGET:T} "->" $$path ; \
ln -fhs $$path ${.TARGET:T}

# For loader implementations, we generate a loader.help file. This can be suppressed by
# setting HELP_FILES to nothing.
HELP_FILES= ${LDRSRC}/help.common

.endif # __BOOT_DEFS_MK__
1 change: 0 additions & 1 deletion stand/efi/loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE}
.endif

# Always add MI sources
HELP_FILES=
.include "${BOOTSRC}/loader.mk"

FILES+= loader.efi
Expand Down
4 changes: 1 addition & 3 deletions stand/i386/loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ LIBFIREWIRE= ${BOOTOBJ}/i386/libfirewire/libfirewire.a
.endif

.if exists(${.CURDIR}/help.i386)
HELP_FILES+= help.i386
.else
HELP_FILES=
HELP_FILES= ${.CURDIR}/help.i386
.endif

# Always add MI sources
Expand Down
2 changes: 2 additions & 0 deletions stand/loader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ vers.c: ${LDRSRC}/newvers.sh ${VERSION_FILE}
${NEWVERSWHAT}

.if !empty(HELP_FILES)
HELP_FILES+= ${LDRSRC}/help.common

CLEANFILES+= loader.help
FILES+= loader.help

Expand Down
2 changes: 1 addition & 1 deletion stand/mips/beri/loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ SRCS+= altera_jtag_uart.c \
# Since we don't have a backward compatibility issue, default to this on BERI.
CFLAGS+= -DBOOT_PROMPT_123

HELP_FILES+= ${.CURDIR}/help.mips
HELP_FILES= ${.CURDIR}/help.mips

# Always add MI sources
.include "${BOOTSRC}/loader.mk"
Expand Down
2 changes: 1 addition & 1 deletion stand/mips/uboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ UBLDR_LOADADDR?= 0xffffffff80800000
# Architecture-specific loader code
SRCS= start.S conf.c vers.c

HELP_FILES+= help.uboot ${BOOTSRC}/fdt/help.fdt
HELP_FILES= ${.CURDIR}/help.uboot ${BOOTSRC}/fdt/help.fdt

# Always add MI sources
.include "${BOOTSRC}/loader.mk"
Expand Down
3 changes: 0 additions & 3 deletions stand/powerpc/kboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ SRCS+= ucmpdi2.c
CFLAGS+= -mcpu=powerpc64

# Always add MI sources
HELP_FILES= # Disable
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern

Expand All @@ -45,6 +44,4 @@ CFLAGS+= -Wa,-mppc64bridge
DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}

HELP_FILES+= ${FDTSRC}/help.fdt

.include <bsd.prog.mk>
2 changes: 1 addition & 1 deletion stand/powerpc/ofw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SRCS+= ucmpdi2.c
SRCS+= ofwfdt.c
.endif

HELP_FILES+= ${FDTSRC}/help.fdt
HELP_FILES= ${FDTSRC}/help.fdt

# Always add MI sources
.include "${BOOTSRC}/loader.mk"
Expand Down
1 change: 0 additions & 1 deletion stand/powerpc/ps3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ SRCS+= ucmpdi2.c
CFLAGS+= -mcpu=powerpc64

# Always add MI sources
HELP_FILES= # Disable
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern

Expand Down
1 change: 0 additions & 1 deletion stand/powerpc/uboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ SRCS= start.S conf.c vers.c
SRCS+= ucmpdi2.c

# Always add MI sources
HELP_FILES= # Disable
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern

Expand Down
4 changes: 1 addition & 3 deletions stand/sparc64/loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ CFLAGS+= -DLOADER_DEBUG
.endif

.if exists(${.CURDIR}/help.sparc64)
HELP_FILES+= help.sparc64
.else
HELP_FILES=
HELP_FILES= ${.CURDIR}/help.sparc64
.endif

# Always add MI sources
Expand Down
1 change: 0 additions & 1 deletion stand/userboot/userboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
.endif

# Always add MI sources
HELP_FILES= # Disable
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.
DPADD+= ${LIBFICL} ${LIBZFSBOOT} ${LIBSA}
Expand Down

0 comments on commit 25c2f4c

Please sign in to comment.