Author: imp
Date: Tue Oct 10 01:31:44 2017
New Revision: 324460
URL: https://svnweb.freebsd.org/changeset/base/324460

Log:
  Rather than laying whack-a-mole with including the path to stand.h,
  always include it. Remove places where we explicitly include it. This
  also helps reduce the 'cut-and-paste' factor of these Makefiles.
  
  Sponsored by: Netflix

Modified:
  head/sys/boot/Makefile.ficl
  head/sys/boot/Makefile.inc
  head/sys/boot/arm/uboot/Makefile
  head/sys/boot/common/Makefile.inc
  head/sys/boot/efi/fdt/Makefile
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/loader/Makefile
  head/sys/boot/fdt/Makefile
  head/sys/boot/i386/libfirewire/Makefile
  head/sys/boot/i386/libi386/Makefile
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/mips/beri/boot2/Makefile
  head/sys/boot/mips/beri/loader/Makefile
  head/sys/boot/mips/uboot/Makefile
  head/sys/boot/ofw/libofw/Makefile
  head/sys/boot/powerpc/kboot/Makefile
  head/sys/boot/powerpc/ofw/Makefile
  head/sys/boot/powerpc/ps3/Makefile
  head/sys/boot/powerpc/uboot/Makefile
  head/sys/boot/sparc64/loader/Makefile
  head/sys/boot/uboot/fdt/Makefile
  head/sys/boot/uboot/lib/Makefile
  head/sys/boot/userboot/userboot/Makefile
  head/sys/boot/zfs/Makefile

Modified: head/sys/boot/Makefile.ficl
==============================================================================
--- head/sys/boot/Makefile.ficl Tue Oct 10 00:32:21 2017        (r324459)
+++ head/sys/boot/Makefile.ficl Tue Oct 10 01:31:44 2017        (r324460)
@@ -27,7 +27,7 @@ CFLAGS+=      -m32 -mcpu=powerpc -I.
 .endif
 
 CFLAGS+=       -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \
-               -I${FICLDIR}/../common -I${SASRC}
+               -I${FICLDIR}/../common
 
 .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
 .if !exists(machine)

Modified: head/sys/boot/Makefile.inc
==============================================================================
--- head/sys/boot/Makefile.inc  Tue Oct 10 00:32:21 2017        (r324459)
+++ head/sys/boot/Makefile.inc  Tue Oct 10 01:31:44 2017        (r324460)
@@ -13,6 +13,8 @@ LIBSA32=${OBJTOP}/sys/boot/libstand32/libstand.a
 # stand along library compiled for userboot
 LIBSAU=${OBJTOP}/sys/boot/userboot/libstand/libstand.a
 
+CFLAGS+=-I${SASRC}
+
 SSP_CFLAGS=
 
 .if ${MACHINE_CPUARCH} == "arm"

Modified: head/sys/boot/arm/uboot/Makefile
==============================================================================
--- head/sys/boot/arm/uboot/Makefile    Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/arm/uboot/Makefile    Tue Oct 10 01:31:44 2017        
(r324460)
@@ -112,8 +112,6 @@ LIBUBOOT=   ${.OBJDIR}/../../uboot/lib/libuboot.a
 CFLAGS+=       -I${.CURDIR}/../../uboot/lib
 CFLAGS+=       -I${.OBJDIR}/../../uboot/lib
 
-CFLAGS+=       -I${SASRC}
-
 CFLAGS+=       -fPIC
 
 # clang doesn't understand %D as a specifier to printf

Modified: head/sys/boot/common/Makefile.inc
==============================================================================
--- head/sys/boot/common/Makefile.inc   Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/common/Makefile.inc   Tue Oct 10 01:31:44 2017        
(r324460)
@@ -70,7 +70,6 @@ CFLAGS+=      -DBOOT_PROMPT_123
 
 .if defined(LOADER_INSTALL_SUPPORT)
 SRCS+= install.c
-CFLAGS+=-I${SASRC}
 .endif
 
 CLEANFILES+=   vers.c

Modified: head/sys/boot/efi/fdt/Makefile
==============================================================================
--- head/sys/boot/efi/fdt/Makefile      Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/efi/fdt/Makefile      Tue Oct 10 01:31:44 2017        
(r324460)
@@ -17,8 +17,6 @@ CFLAGS+=      -mgeneral-regs-only
 CFLAGS+=       -msoft-float
 .endif
 
-CFLAGS+=       -I${SASRC}
-
 # EFI library headers
 CFLAGS+=       -I${.CURDIR}/../include
 CFLAGS+=       -I${.CURDIR}/../include/${MACHINE}

Modified: head/sys/boot/efi/libefi/Makefile
==============================================================================
--- head/sys/boot/efi/libefi/Makefile   Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/efi/libefi/Makefile   Tue Oct 10 01:31:44 2017        
(r324460)
@@ -37,7 +37,6 @@ CFLAGS+= -fPIC -mno-red-zone
 .endif
 CFLAGS+= -I${.CURDIR}/../include
 CFLAGS+= -I${.CURDIR}/../include/${MACHINE}
-CFLAGS+= -I${SASRC}
 .if ${MK_ZFS} != "no"
 CFLAGS+=       -I${.CURDIR}/../../zfs
 CFLAGS+=       -I${.CURDIR}/../../../cddl/boot/zfs

Modified: head/sys/boot/efi/loader/Makefile
==============================================================================
--- head/sys/boot/efi/loader/Makefile   Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/efi/loader/Makefile   Tue Oct 10 01:31:44 2017        
(r324460)
@@ -36,10 +36,6 @@ CWARNFLAGS.zfs.c+=   -Wno-array-bounds
 CWARNFLAGS.zfs.c+=     -Wno-missing-prototypes
 .endif
 
-.if defined(LOADER_NET_SUPPORT)
-CFLAGS+=       -I${SASRC}
-.endif
-
 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201
 CWARNFLAGS.self_reloc.c+=      -Wno-error=maybe-uninitialized
 .endif

Modified: head/sys/boot/fdt/Makefile
==============================================================================
--- head/sys/boot/fdt/Makefile  Tue Oct 10 00:32:21 2017        (r324459)
+++ head/sys/boot/fdt/Makefile  Tue Oct 10 01:31:44 2017        (r324460)
@@ -12,7 +12,6 @@ SRCS+=                fdt.c fdt_ro.c fdt_wip.c fdt_sw.c 
fdt_rw.c fdt
 # Loader's fdt commands extension sources.
 SRCS+=         fdt_loader_cmd.c fdt_overlay.c
 
-CFLAGS+=       -I${SASRC}
 CFLAGS+=       -I${.CURDIR}/../../contrib/libfdt/ -I${.CURDIR}/../common/
 
 CFLAGS+=       -ffreestanding

Modified: head/sys/boot/i386/libfirewire/Makefile
==============================================================================
--- head/sys/boot/i386/libfirewire/Makefile     Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/i386/libfirewire/Makefile     Tue Oct 10 01:31:44 2017        
(r324460)
@@ -10,7 +10,6 @@ SRCS+=                dcons.c fwcrom.c
 CFLAGS+=       -D_BOOT
 
 CFLAGS+=       -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
-CFLAGS+=       -I${SASRC}
 CFLAGS+=       -I${.CURDIR}/../btx/lib
 CFLAGS+=       -I${.CURDIR}/../libi386
 

Modified: head/sys/boot/i386/libi386/Makefile
==============================================================================
--- head/sys/boot/i386/libi386/Makefile Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/i386/libi386/Makefile Tue Oct 10 01:31:44 2017        
(r324460)
@@ -59,8 +59,6 @@ CFLAGS+=      -I${.CURDIR}/../../ficl -I${.CURDIR}/../../fi
                -I${.CURDIR}/../btx/lib \
                -I${.CURDIR}/../../../contrib/dev/acpica/include \
                -I${.CURDIR}/../../.. -I.
-# the location of libstand
-CFLAGS+=       -I${SASRC}
 
 # Handle FreeBSD specific %b and %D printf format specifiers
 CFLAGS+= ${FORMAT_EXTENSIONS}

Modified: head/sys/boot/i386/loader/Makefile
==============================================================================
--- head/sys/boot/i386/loader/Makefile  Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/i386/loader/Makefile  Tue Oct 10 01:31:44 2017        
(r324460)
@@ -28,10 +28,6 @@ CFLAGS+=     -DLOADER_ZFS_SUPPORT
 LIBZFSBOOT=    ${.OBJDIR}/../../zfs/libzfsboot.a
 .endif
 
-.if defined(LOADER_NET_SUPPORT)
-CFLAGS+=       -I${SASRC}
-.endif
-
 .if defined(LOADER_TFTP_SUPPORT)
 CFLAGS+=       -DLOADER_TFTP_SUPPORT
 .endif

Modified: head/sys/boot/mips/beri/boot2/Makefile
==============================================================================
--- head/sys/boot/mips/beri/boot2/Makefile      Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/mips/beri/boot2/Makefile      Tue Oct 10 01:31:44 2017        
(r324460)
@@ -57,9 +57,6 @@ CFLAGS=               -ffreestanding                  \
                -msoft-float                    \
                -g
 
-# where to get libstand from
-CFLAGS+=       -I${SASRC}
-
 LDFLAGS=       -nostdlib                       \
                -static                         \
                -Wl,-N                          \

Modified: head/sys/boot/mips/beri/loader/Makefile
==============================================================================
--- head/sys/boot/mips/beri/loader/Makefile     Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/mips/beri/loader/Makefile     Tue Oct 10 01:31:44 2017        
(r324460)
@@ -107,9 +107,6 @@ LDFLAGS=    -nostdlib                               \
                -L${.CURDIR}                            \
                -e __start
 
-# where to get libstand from
-CFLAGS+=       -I${SASRC}
-
 DPADD=         ${LIBFICL} ${LIBSA}
 LDADD=         ${LIBFICL} ${LIBSA}
 

Modified: head/sys/boot/mips/uboot/Makefile
==============================================================================
--- head/sys/boot/mips/uboot/Makefile   Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/mips/uboot/Makefile   Tue Oct 10 01:31:44 2017        
(r324460)
@@ -115,9 +115,6 @@ LIBUBOOT=   ${.OBJDIR}/../../uboot/lib/libuboot.a
 CFLAGS+=       -I${.CURDIR}/../../uboot/lib
 CFLAGS+=       -I${.OBJDIR}/../../uboot/lib
 
-# where to get libstand from
-CFLAGS+=       -I${SASRC}
-
 # clang doesn't understand %D as a specifier to printf
 #NO_WERROR.clang=
 #NO_WERROR=

Modified: head/sys/boot/ofw/libofw/Makefile
==============================================================================
--- head/sys/boot/ofw/libofw/Makefile   Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/ofw/libofw/Makefile   Tue Oct 10 01:31:44 2017        
(r324460)
@@ -9,8 +9,6 @@ SRCS=   devicename.c elf_freebsd.c ofw_console.c ofw_cop
 .PATH: ${.CURDIR}/../../zfs
 SRCS+=  devicename_stubs.c
 
-CFLAGS+=       -I${SASRC}
-
 # Pick up the bootstrap header for some interface items
 CFLAGS+=       -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
 

Modified: head/sys/boot/powerpc/kboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/kboot/Makefile        Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/powerpc/kboot/Makefile        Tue Oct 10 01:31:44 2017        
(r324460)
@@ -93,9 +93,6 @@ CFLAGS+= -Wa,-mppc64bridge
 #.PATH:                ${.CURDIR}/../../ofw/common
 #.include      "${.CURDIR}/../../ofw/common/Makefile.inc"
 
-# where to get libstand from
-CFLAGS+=       -I${SASRC}
-
 DPADD=         ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32}
 LDADD=         ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32}
 

Modified: head/sys/boot/powerpc/ofw/Makefile
==============================================================================
--- head/sys/boot/powerpc/ofw/Makefile  Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/powerpc/ofw/Makefile  Tue Oct 10 01:31:44 2017        
(r324460)
@@ -91,9 +91,6 @@ LDFLAGS=      -nostdlib -static -T ${.CURDIR}/ldscript.powe
 LIBOFW=                ${.OBJDIR}/../../ofw/libofw/libofw.a
 CFLAGS+=       -I${.CURDIR}/../../ofw/libofw
 
-# where to get libstand from
-CFLAGS+=       -I${SASRC}
-
 DPADD=         ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32}
 LDADD=         ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32}
 

Modified: head/sys/boot/powerpc/ps3/Makefile
==============================================================================
--- head/sys/boot/powerpc/ps3/Makefile  Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/powerpc/ps3/Makefile  Tue Oct 10 01:31:44 2017        
(r324460)
@@ -90,9 +90,6 @@ LDFLAGS=      -nostdlib -static -T ${.CURDIR}/ldscript.powe
 #.PATH:                ${.CURDIR}/../../ofw/common
 #.include      "${.CURDIR}/../../ofw/common/Makefile.inc"
 
-# where to get libstand from
-CFLAGS+=       -I${SASRC}
-
 DPADD=         ${LIBFICL} ${LIBOFW} ${LIBSA32}
 LDADD=         ${LIBFICL} ${LIBOFW} ${LIBSA32}
 

Modified: head/sys/boot/powerpc/uboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/uboot/Makefile        Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/powerpc/uboot/Makefile        Tue Oct 10 01:31:44 2017        
(r324460)
@@ -96,9 +96,6 @@ LIBUBOOT=     ${.OBJDIR}/../../uboot/lib/libuboot.a
 CFLAGS+=       -I${.CURDIR}/../../uboot/lib
 CFLAGS+=       -I${.OBJDIR}/../../uboot/lib
 
-# where to get libstand from
-CFLAGS+=       -I${SASRC}
-
 DPADD=         ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
 LDADD=         ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32}
 

Modified: head/sys/boot/sparc64/loader/Makefile
==============================================================================
--- head/sys/boot/sparc64/loader/Makefile       Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/sparc64/loader/Makefile       Tue Oct 10 01:31:44 2017        
(r324460)
@@ -79,9 +79,6 @@ LDFLAGS=      -static
 LIBOFW=                ${.OBJDIR}/../../ofw/libofw/libofw.a
 CFLAGS+=       -I${.CURDIR}/../../ofw/libofw/
 
-# where to get libstand from
-CFLAGS+=       -I${SASRC}
-
 # Need sys/ for crypto/intake.h
 CFLAGS+=       -I${SRCTOP}/sys
 

Modified: head/sys/boot/uboot/fdt/Makefile
==============================================================================
--- head/sys/boot/uboot/fdt/Makefile    Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/uboot/fdt/Makefile    Tue Oct 10 01:31:44 2017        
(r324460)
@@ -12,8 +12,6 @@ SRCS=         uboot_fdt.c
 
 CFLAGS+=       -ffreestanding -msoft-float
 
-CFLAGS+=       -I${SASRC}
-
 # U-Boot library headers
 CFLAGS+=       -I${.CURDIR}/../lib
 

Modified: head/sys/boot/uboot/lib/Makefile
==============================================================================
--- head/sys/boot/uboot/lib/Makefile    Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/uboot/lib/Makefile    Tue Oct 10 01:31:44 2017        
(r324460)
@@ -13,8 +13,6 @@ SRCS+=        module.c net.c reboot.c time.c
 
 CFLAGS+=       -ffreestanding -msoft-float
 
-CFLAGS+=       -I${SASRC}
-
 .if !defined(LOADER_NO_DISK_SUPPORT)
 SRCS+= disk.c
 CFLAGS+= -DLOADER_DISK_SUPPORT

Modified: head/sys/boot/userboot/userboot/Makefile
==============================================================================
--- head/sys/boot/userboot/userboot/Makefile    Tue Oct 10 00:32:21 2017        
(r324459)
+++ head/sys/boot/userboot/userboot/Makefile    Tue Oct 10 01:31:44 2017        
(r324460)
@@ -32,7 +32,6 @@ CFLAGS+=      -Wall
 CFLAGS+=       -I${.CURDIR}/..
 CFLAGS+=       -I${.CURDIR}/../../common
 CFLAGS+=       -I${.CURDIR}/../../..
-CFLAGS+=       -I${SASRC}
 CFLAGS+=       -ffreestanding -I.
 
 CWARNFLAGS.main.c += -Wno-implicit-function-declaration

Modified: head/sys/boot/zfs/Makefile
==============================================================================
--- head/sys/boot/zfs/Makefile  Tue Oct 10 00:32:21 2017        (r324459)
+++ head/sys/boot/zfs/Makefile  Tue Oct 10 01:31:44 2017        (r324460)
@@ -12,7 +12,6 @@ CFLAGS+=      -DSKEIN_LOOP=111
 
 CFLAGS+=       -DBOOTPROG=\"zfsloader\"
 CFLAGS+=       -I${.CURDIR}/../common -I${.CURDIR}/../.. -I.
-CFLAGS+=       -I${SASRC}
 CFLAGS+=       -I${.CURDIR}/../../cddl/boot/zfs
 CFLAGS+=       -I${.CURDIR}/../../crypto/skein
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to