Date: Sun, 29 Oct 2017 05:27:22 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325094 - in head/sys/boot: . fdt ficl geli ofw/libofw uboot/fdt uboot/lib zfs Message-ID: <201710290527.v9T5RMaT072665@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Sun Oct 29 05:27:22 2017 New Revision: 325094 URL: https://svnweb.freebsd.org/changeset/base/325094 Log: Cleanup non-arch Makefiles Use SYSDIR, BOOTSRC, LDRSRC and FDTSRC in preference to relative paths. Also, use bsd.init.mk where needed. Sponsored by: Netflix Modified: head/sys/boot/fdt/Makefile head/sys/boot/ficl.mk head/sys/boot/ficl/Makefile head/sys/boot/geli/Makefile head/sys/boot/ofw/libofw/Makefile head/sys/boot/uboot/fdt/Makefile head/sys/boot/uboot/lib/Makefile head/sys/boot/zfs/Makefile Modified: head/sys/boot/fdt/Makefile ============================================================================== --- head/sys/boot/fdt/Makefile Sun Oct 29 05:26:59 2017 (r325093) +++ head/sys/boot/fdt/Makefile Sun Oct 29 05:27:22 2017 (r325094) @@ -14,7 +14,7 @@ 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${SYSDIR}/contrib/libfdt/ -I${BOOTSRC}/common/ +CFLAGS+= -I${SYSDIR}/contrib/libfdt/ -I${LDRSRC} CFLAGS+= -ffreestanding Modified: head/sys/boot/ficl.mk ============================================================================== --- head/sys/boot/ficl.mk Sun Oct 29 05:26:59 2017 (r325093) +++ head/sys/boot/ficl.mk Sun Oct 29 05:27:22 2017 (r325094) @@ -38,7 +38,7 @@ beforedepend ${OBJS}: machine .endif machine: .NOMETA - ln -sf ${.CURDIR}/../../i386/include machine + ln -sf ${SYSDIR}/i386/include machine CLEANFILES+= machine .endif Modified: head/sys/boot/ficl/Makefile ============================================================================== --- head/sys/boot/ficl/Makefile Sun Oct 29 05:26:59 2017 (r325093) +++ head/sys/boot/ficl/Makefile Sun Oct 29 05:27:22 2017 (r325094) @@ -1,7 +1,8 @@ # $FreeBSD$ # -.include "../ficl.mk" +.include <bsd.init.mk> +.include "${BOOTSRC}/ficl.mk" BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ prefix.c search.c stack.c tools.c vm.c words.c Modified: head/sys/boot/geli/Makefile ============================================================================== --- head/sys/boot/geli/Makefile Sun Oct 29 05:26:59 2017 (r325093) +++ head/sys/boot/geli/Makefile Sun Oct 29 05:27:22 2017 (r325094) @@ -40,7 +40,7 @@ SRCS+= md5c.c # AES implementation from sys/crypto .PATH: ${SYSDIR}/crypto/rijndael CFLAGS+= -I${SYSDIR} -CFLAGS+= -I${.CURDIR}/../common/ +CFLAGS+= -I${LDRSRC} # Remove asserts CFLAGS+= -DNDEBUG SRCS+= rijndael-alg-fst.c rijndael-api-fst.c rijndael-api.c Modified: head/sys/boot/ofw/libofw/Makefile ============================================================================== --- head/sys/boot/ofw/libofw/Makefile Sun Oct 29 05:26:59 2017 (r325093) +++ head/sys/boot/ofw/libofw/Makefile Sun Oct 29 05:27:22 2017 (r325094) @@ -6,11 +6,11 @@ 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 \ ofw_time.c openfirm.c -.PATH: ${.CURDIR}/../../zfs +.PATH: ${BOOTSRC}/zfs SRCS+= devicename_stubs.c # Pick up the bootstrap header for some interface items -CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. +CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I. CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "powerpc" @@ -24,7 +24,7 @@ CFLAGS+= -DDISK_DEBUG .endif machine: .NOMETA - ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine + ln -sf ${SYSDIR}/${MACHINE_CPUARCH}/include machine CLEANFILES+= machine Modified: head/sys/boot/uboot/fdt/Makefile ============================================================================== --- head/sys/boot/uboot/fdt/Makefile Sun Oct 29 05:26:59 2017 (r325093) +++ head/sys/boot/uboot/fdt/Makefile Sun Oct 29 05:27:22 2017 (r325094) @@ -1,8 +1,8 @@ # $FreeBSD$ -.include <src.opts.mk> +.include <bsd.init.mk> -.PATH: ${.CURDIR}/../../common +.PATH: ${LDRSRC} LIB= uboot_fdt INTERNALLIB= @@ -13,16 +13,16 @@ SRCS= uboot_fdt.c CFLAGS+= -ffreestanding -msoft-float # U-Boot library headers -CFLAGS+= -I${.CURDIR}/../lib +CFLAGS+= -I${UBOOTSRC}/lib # libfdt headers -CFLAGS+= -I${.CURDIR}/../../fdt +CFLAGS+= -I${FDTSRC} # Pick up the bootstrap header for some interface items -CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. +CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I. machine: .NOMETA - ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine + ln -sf ${SYSDIR}/${MACHINE_CPUARCH}/include machine CLEANFILES+= machine Modified: head/sys/boot/uboot/lib/Makefile ============================================================================== --- head/sys/boot/uboot/lib/Makefile Sun Oct 29 05:26:59 2017 (r325093) +++ head/sys/boot/uboot/lib/Makefile Sun Oct 29 05:27:22 2017 (r325094) @@ -1,8 +1,8 @@ # $FreeBSD$ -.include <src.opts.mk> +.include <bsd.init.mk> -.PATH: ${.CURDIR}/../../common +.PATH: ${LDRSRC} LIB= uboot INTERNALLIB= @@ -24,14 +24,14 @@ LOADER_FDT_SUPPORT= no .endif .if ${LOADER_FDT_SUPPORT} == "yes" -CFLAGS+= -DLOADER_FDT_SUPPORT -I${.CURDIR}/../../fdt +CFLAGS+= -DLOADER_FDT_SUPPORT -I${FDTSRC} .endif # Pick up FDT includes CFLAGS+= -I${SYSDIR}/contrib/libfdt/ # Pick up the bootstrap header for some interface items -CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. +CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I. .ifdef(BOOT_DISK_DEBUG) # Make the disk code more talkative @@ -39,7 +39,7 @@ CFLAGS+= -DDISK_DEBUG .endif machine: .NOMETA - ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine + ln -sf ${SYSDIR}/${MACHINE_CPUARCH}/include machine CLEANFILES+= machine Modified: head/sys/boot/zfs/Makefile ============================================================================== --- head/sys/boot/zfs/Makefile Sun Oct 29 05:26:59 2017 (r325093) +++ head/sys/boot/zfs/Makefile Sun Oct 29 05:27:22 2017 (r325094) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <bsd.init.mk> + LIB= zfsboot INTERNALLIB= @@ -8,12 +10,12 @@ SRCS+= zfs.c SRCS+= skein.c skein_block.c # Do not unroll skein loops, reduce code size CFLAGS+= -DSKEIN_LOOP=111 -.PATH: ${.CURDIR}/../../crypto/skein +.PATH: ${SYSDIR}/crypto/skein CFLAGS+= -DBOOTPROG=\"zfsloader\" -CFLAGS+= -I${.CURDIR}/../common -I${.CURDIR}/../.. -I. -CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs -CFLAGS+= -I${.CURDIR}/../../crypto/skein +CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I. +CFLAGS+= -I${SYSDIR}/cddl/boot/zfs +CFLAGS+= -I${SYSDIR}/crypto/skein .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -march=i386 @@ -27,7 +29,7 @@ CFLAGS+= -Wformat -Wall .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: .NOMETA - ln -sf ${.CURDIR}/../../i386/include machine + ln -sf ${SYSDIR}/i386/include machine .endif .include <bsd.stand.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710290527.v9T5RMaT072665>