From 8299b37f854e0b217d1b296185991fa5e3dcb0d4 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 2 Feb 2018 06:32:26 +0000 Subject: [PATCH] Centralize several variables. MK_CTF, MK_SSP, MK_PROFILE, NO_PIC, and INTERNALLIB are always the same, so set them in defs.mk. MAN= is common, so set it here too. This removes a lot of boring repetition from the Makefiles that added almost no value. --- stand/defs.mk | 7 +++++++ stand/efi/boot1/Makefile | 5 ----- stand/efi/fdt/Makefile | 1 - stand/efi/libefi/Makefile | 1 - stand/efi/loader/Makefile | 4 ---- stand/fdt/Makefile | 1 - stand/ficl/Makefile | 1 - stand/geli/Makefile | 5 ----- stand/i386/boot0/Makefile | 1 - stand/i386/btx/btx/Makefile | 1 - stand/i386/btx/btxldr/Makefile | 1 - stand/i386/btx/lib/Makefile | 1 - stand/i386/cdboot/Makefile | 1 - stand/i386/kgzldr/Makefile | 1 - stand/i386/libfirewire/Makefile | 1 - stand/i386/libi386/Makefile | 1 - stand/i386/loader/Makefile | 3 --- stand/i386/mbr/Makefile | 1 - stand/i386/pmbr/Makefile | 1 - stand/libsa/Makefile | 5 ----- stand/mips/beri/boot2/Makefile | 2 -- stand/mips/beri/loader/Makefile | 3 --- stand/ofw/libofw/Makefile | 1 - stand/powerpc/boot1.chrp/Makefile | 2 -- stand/powerpc/kboot/Makefile | 2 -- stand/powerpc/ofw/Makefile | 2 -- stand/powerpc/uboot/Makefile | 1 - stand/sparc64/boot1/Makefile | 1 - stand/sparc64/loader/Makefile | 2 -- stand/uboot/fdt/Makefile | 1 - stand/uboot/lib/Makefile | 1 - stand/usb/Makefile.test | 1 - stand/userboot/test/Makefile | 4 ---- stand/userboot/userboot/Makefile | 5 ----- stand/zfs/Makefile | 1 - 35 files changed, 7 insertions(+), 65 deletions(-) diff --git a/stand/defs.mk b/stand/defs.mk index 79e52690a599..1596c9de5b06 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -7,6 +7,13 @@ WARNS?=1 .if !defined(__BOOT_DEFS_MK__) __BOOT_DEFS_MK__=${MFILE} +MK_CTF= no +MK_SSP= no +MK_PROFILE= no +NO_PIC= +MAN= +INTERNALLIB= + BOOTSRC= ${SRCTOP}/stand EFISRC= ${BOOTSRC}/efi EFIINC= ${EFISRC}/include diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index 2acefb348d64..02ca94705361 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -1,12 +1,7 @@ # $FreeBSD$ -MAN= - .include -MK_SSP= no -MK_FORTH= no - PROG= boot1.sym INTERNALPROG= WARNS?= 6 diff --git a/stand/efi/fdt/Makefile b/stand/efi/fdt/Makefile index 6bae4390f37c..8166f481dc99 100644 --- a/stand/efi/fdt/Makefile +++ b/stand/efi/fdt/Makefile @@ -5,7 +5,6 @@ .PATH: ${LDRSRC} LIB= efi_fdt -INTERNALLIB= WARNS?= 6 SRCS= efi_fdt.c diff --git a/stand/efi/libefi/Makefile b/stand/efi/libefi/Makefile index f5cf71ea7c6d..5adc5b2a3b0f 100644 --- a/stand/efi/libefi/Makefile +++ b/stand/efi/libefi/Makefile @@ -7,7 +7,6 @@ .endif LIB= efi -INTERNALLIB= WARNS?= 2 SRCS= delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \ diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index c960632febee..574cdc00cb4b 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -MAN= - LOADER_NET_SUPPORT?= yes LOADER_MSDOS_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes @@ -10,8 +8,6 @@ LOADER_EXT2FS_SUPPORT?= no .include -MK_SSP= no - PROG= loader.sym INTERNALPROG= WARNS?= 3 diff --git a/stand/fdt/Makefile b/stand/fdt/Makefile index 3e13441719ec..b4767edad4b6 100644 --- a/stand/fdt/Makefile +++ b/stand/fdt/Makefile @@ -5,7 +5,6 @@ .PATH: ${SYSDIR}/contrib/libfdt/ LIB= fdt -INTERNALLIB= # Vendor sources of libfdt. SRCS+= fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c \ diff --git a/stand/ficl/Makefile b/stand/ficl/Makefile index a3aad2c053a6..1e64ae045060 100644 --- a/stand/ficl/Makefile +++ b/stand/ficl/Makefile @@ -20,7 +20,6 @@ PROG= testmain .include .else LIB= ficl -INTERNALLIB= .include .endif diff --git a/stand/geli/Makefile b/stand/geli/Makefile index ce54f82a0a2e..24faf125e531 100644 --- a/stand/geli/Makefile +++ b/stand/geli/Makefile @@ -1,16 +1,11 @@ # $FreeBSD$ # libgeliboot -MAN= DO32=1 .include -MK_SSP= no LIB= geliboot -INTERNALLIB= -MK_PROFILE= no -NO_PIC= # Our password input method SRCS+= pwgets.c diff --git a/stand/i386/boot0/Makefile b/stand/i386/boot0/Makefile index 39c0072e6638..82eb9eefee76 100644 --- a/stand/i386/boot0/Makefile +++ b/stand/i386/boot0/Makefile @@ -3,7 +3,6 @@ PROG?= boot0 STRIP= BINMODE=${NOBINMODE} -MAN= SRCS= ${PROG}.S # Additional options that you can specify with make OPTS="..." diff --git a/stand/i386/btx/btx/Makefile b/stand/i386/btx/btx/Makefile index f42e20d83b33..8afe98fe1156 100644 --- a/stand/i386/btx/btx/Makefile +++ b/stand/i386/btx/btx/Makefile @@ -4,7 +4,6 @@ PROG= btx INTERNALPROG= -MAN= SRCS= btx.S .if defined(BOOT_BTX_NOHANG) diff --git a/stand/i386/btx/btxldr/Makefile b/stand/i386/btx/btxldr/Makefile index 32795975b7ad..6a112768f0b6 100644 --- a/stand/i386/btx/btxldr/Makefile +++ b/stand/i386/btx/btxldr/Makefile @@ -4,7 +4,6 @@ PROG= btxldr INTERNALPROG= -MAN= SRCS= btxldr.S CFLAGS+=-DLOADER_ADDRESS=${LOADER_ADDRESS} diff --git a/stand/i386/btx/lib/Makefile b/stand/i386/btx/lib/Makefile index 8de62555c9dc..2988f4297660 100644 --- a/stand/i386/btx/lib/Makefile +++ b/stand/i386/btx/lib/Makefile @@ -4,7 +4,6 @@ PROG= crt0.o INTERNALPROG= -MAN= SRCS= btxcsu.S btxsys.s btxv86.s CFLAGS+=-I${BOOTSRC}/i386/common LDFLAGS+=-Wl,-r diff --git a/stand/i386/cdboot/Makefile b/stand/i386/cdboot/Makefile index 7acd4046d816..093ec49ec77a 100644 --- a/stand/i386/cdboot/Makefile +++ b/stand/i386/cdboot/Makefile @@ -5,7 +5,6 @@ PROG= cdboot STRIP= BINMODE=${NOBINMODE} -MAN= SRCS= ${PROG}.S CFLAGS+=-I${BOOTSRC}/i386/common diff --git a/stand/i386/kgzldr/Makefile b/stand/i386/kgzldr/Makefile index 5a03b83e5e49..82136f97c9e5 100644 --- a/stand/i386/kgzldr/Makefile +++ b/stand/i386/kgzldr/Makefile @@ -6,7 +6,6 @@ PROG= kgzldr.o STRIP= BINMODE=${LIBMODE} BINDIR= ${LIBDIR} -MAN= SRCS= start.s boot.c inflate.c lib.c crt.s sio.s CFLAGS= -Os diff --git a/stand/i386/libfirewire/Makefile b/stand/i386/libfirewire/Makefile index f6e594f83d2e..6a34efd0acb3 100644 --- a/stand/i386/libfirewire/Makefile +++ b/stand/i386/libfirewire/Makefile @@ -3,7 +3,6 @@ .include LIB= firewire -INTERNALLIB= .PATH: ${SYSDIR}/dev/dcons ${SYSDIR}/dev/firewire SRCS+= firewire.c fwohci.c dconsole.c diff --git a/stand/i386/libi386/Makefile b/stand/i386/libi386/Makefile index f54052cd89d6..6825d1747711 100644 --- a/stand/i386/libi386/Makefile +++ b/stand/i386/libi386/Makefile @@ -5,7 +5,6 @@ HAVE_GELI= yes .include LIB= i386 -INTERNALLIB= SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile index ca0d822d8902..7fb653259b2b 100644 --- a/stand/i386/loader/Makefile +++ b/stand/i386/loader/Makefile @@ -14,11 +14,8 @@ LOADER_BZIP2_SUPPORT?= yes .include -MK_SSP= no - LOADER?= loader PROG= ${LOADER}.sym -MAN= INTERNALPROG= NEWVERSWHAT?= "bootstrap loader" x86 VERSION_FILE= ${.CURDIR}/../loader/version diff --git a/stand/i386/mbr/Makefile b/stand/i386/mbr/Makefile index 9bfa0bd38fa0..26018ffb1378 100644 --- a/stand/i386/mbr/Makefile +++ b/stand/i386/mbr/Makefile @@ -3,7 +3,6 @@ PROG= mbr STRIP= BINMODE=${NOBINMODE} -MAN= SRCS= ${PROG}.s # MBR flags: 0x80 -- try packet interface (also known as EDD or LBA) diff --git a/stand/i386/pmbr/Makefile b/stand/i386/pmbr/Makefile index 1bfe0ee11ab2..bfd6209f0406 100644 --- a/stand/i386/pmbr/Makefile +++ b/stand/i386/pmbr/Makefile @@ -3,7 +3,6 @@ PROG= pmbr STRIP= BINMODE=${NOBINMODE} -MAN= SRCS= ${PROG}.s ORG= 0x600 diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 580ecfa40ff9..1081caee3dc7 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -6,17 +6,12 @@ # quite large. # -MK_PROFILE= no -MK_SSP= no - .include -INTERNALLIB= LIBSA_CPUARCH?=${MACHINE_CPUARCH} LIBC_SRC= ${SRCTOP}/lib/libc LIB?= sa -NO_PIC= # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c abort.c assert.c bcd.c environment.c getopt.c gets.c \ diff --git a/stand/mips/beri/boot2/Makefile b/stand/mips/beri/boot2/Makefile index ce09b6e3efe8..f4b433ce488a 100644 --- a/stand/mips/beri/boot2/Makefile +++ b/stand/mips/beri/boot2/Makefile @@ -43,8 +43,6 @@ SRCS= relocate.S \ cfi.c \ sdcard.c -MAN= - AFLAGS= -G0 CFLAGS+= -I${LDRSRC} \ diff --git a/stand/mips/beri/loader/Makefile b/stand/mips/beri/loader/Makefile index 46b927fddff2..f5a75563745f 100644 --- a/stand/mips/beri/loader/Makefile +++ b/stand/mips/beri/loader/Makefile @@ -38,9 +38,6 @@ LOADER_BZIP2_SUPPORT?= yes .include -MK_SSP= no -MAN= - PROG?= loader NEWVERSWHAT= "BERI loader" ${MACHINE_CPUARCH} INSTALLFLAGS= -b diff --git a/stand/ofw/libofw/Makefile b/stand/ofw/libofw/Makefile index 6818e2705f23..80ca993d3785 100644 --- a/stand/ofw/libofw/Makefile +++ b/stand/ofw/libofw/Makefile @@ -3,7 +3,6 @@ .include LIB= ofw -INTERNALLIB= SRCS= devicename.c elf_freebsd.c ofw_console.c ofw_copy.c ofw_disk.c \ ofw_memory.c ofw_module.c ofw_net.c ofw_reboot.c \ diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile index d865248ff986..8fbc1e597119 100644 --- a/stand/powerpc/boot1.chrp/Makefile +++ b/stand/powerpc/boot1.chrp/Makefile @@ -9,8 +9,6 @@ INSTALLFLAGS= -b FILES= boot1.hfs SRCS= boot1.c ashldi3.c syncicache.c -MAN= - CFLAGS+=-I${LDRSRC} LDFLAGS=-nostdlib -static -Wl,-N diff --git a/stand/powerpc/kboot/Makefile b/stand/powerpc/kboot/Makefile index e91421dde1b5..9b2048845ce2 100644 --- a/stand/powerpc/kboot/Makefile +++ b/stand/powerpc/kboot/Makefile @@ -11,8 +11,6 @@ LOADER_GZIP_SUPPORT?= yes LOADER_BZIP2_SUPPORT?= no .include -MK_SSP= no -MAN= PROG= loader.kboot NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH} diff --git a/stand/powerpc/ofw/Makefile b/stand/powerpc/ofw/Makefile index e24b7af30222..db3c23b887fc 100644 --- a/stand/powerpc/ofw/Makefile +++ b/stand/powerpc/ofw/Makefile @@ -11,8 +11,6 @@ LOADER_GZIP_SUPPORT?= yes LOADER_BZIP2_SUPPORT?= no .include -MK_SSP= no -MAN= PROG= loader NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH} diff --git a/stand/powerpc/uboot/Makefile b/stand/powerpc/uboot/Makefile index 623c464784bc..d40fdc9dcfa9 100644 --- a/stand/powerpc/uboot/Makefile +++ b/stand/powerpc/uboot/Makefile @@ -14,7 +14,6 @@ LOADER_BZIP2_SUPPORT?= no PROG= ubldr NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} INSTALLFLAGS= -b -MAN= # Architecture-specific loader code SRCS= start.S conf.c vers.c diff --git a/stand/sparc64/boot1/Makefile b/stand/sparc64/boot1/Makefile index 97bfa6735c6f..7dbd297152eb 100644 --- a/stand/sparc64/boot1/Makefile +++ b/stand/sparc64/boot1/Makefile @@ -4,7 +4,6 @@ PROG= boot1.elf INTERNALPROG= -MAN= FILES?= boot1 SRCS= _start.s boot1.c CLEANFILES+=${FILES} boot1.aout diff --git a/stand/sparc64/loader/Makefile b/stand/sparc64/loader/Makefile index 5b7c09a0a7fa..742172506b05 100644 --- a/stand/sparc64/loader/Makefile +++ b/stand/sparc64/loader/Makefile @@ -13,8 +13,6 @@ LOADER_BZIP2_SUPPORT?= no LOADER_DEBUG?= no .include -MK_SSP= no -MAN= PROG?= loader NEWVERSWHAT?= "bootstrap loader" sparc64 diff --git a/stand/uboot/fdt/Makefile b/stand/uboot/fdt/Makefile index d88789d29264..b1e9f8e756d5 100644 --- a/stand/uboot/fdt/Makefile +++ b/stand/uboot/fdt/Makefile @@ -5,7 +5,6 @@ .PATH: ${LDRSRC} LIB= uboot_fdt -INTERNALLIB= WARNS?= 2 SRCS= uboot_fdt.c diff --git a/stand/uboot/lib/Makefile b/stand/uboot/lib/Makefile index 5e8a5f41821a..19e4d3a346ab 100644 --- a/stand/uboot/lib/Makefile +++ b/stand/uboot/lib/Makefile @@ -5,7 +5,6 @@ .PATH: ${LDRSRC} LIB= uboot -INTERNALLIB= WARNS?= 2 SRCS= console.c copy.c devicename.c elf_freebsd.c glue.c diff --git a/stand/usb/Makefile.test b/stand/usb/Makefile.test index decee690b707..4d7a0733c224 100644 --- a/stand/usb/Makefile.test +++ b/stand/usb/Makefile.test @@ -32,7 +32,6 @@ .PATH: ${.CURDIR} PROG= usbloader -MAN= SRCS= CFLAGS+= -Wall diff --git a/stand/userboot/test/Makefile b/stand/userboot/test/Makefile index e40a7bc0f389..7c88f264aef4 100644 --- a/stand/userboot/test/Makefile +++ b/stand/userboot/test/Makefile @@ -1,10 +1,6 @@ # $FreeBSD$ - -MAN= - .include -MK_SSP= no PROG= test INTERNALPROG= diff --git a/stand/userboot/userboot/Makefile b/stand/userboot/userboot/Makefile index 5946257cf3f5..43f0104a9e23 100644 --- a/stand/userboot/userboot/Makefile +++ b/stand/userboot/userboot/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -MAN= - LOADER_MSDOS_SUPPORT?= yes LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= no @@ -9,10 +7,7 @@ LOADER_EXT2FS_SUPPORT?= no .include -MK_SSP= no - SHLIB_NAME= userboot.so -MK_CTF= no STRIP= LIBDIR= /boot diff --git a/stand/zfs/Makefile b/stand/zfs/Makefile index e86c84b02fc0..3116b32a6f0e 100644 --- a/stand/zfs/Makefile +++ b/stand/zfs/Makefile @@ -3,7 +3,6 @@ .include LIB= zfsboot -INTERNALLIB= .PATH: ${ZFSSRC} SRCS+= zfs.c skein.c skein_block.c