Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2014 05:59:29 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r275661 - in projects/building-blocks: lib share/examples share/man/man4 share/mk sys/conf sys/modules tools/build/options
Message-ID:  <201412100559.sBA5xTNn060344@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Dec 10 05:59:29 2014
New Revision: 275661
URL: https://svnweb.freebsd.org/changeset/base/275661

Log:
  Move MK_BHYVE/MK_HYPERV to architecture specific sections in Makefiles
  instead of introducing an architecture specific section in src.opts.mk
  
  Make it clear in the documentation that the options only affect certain
  architectures to reduce user confusion if the knobs are tweaked
  
  A better method for abstracting this out will be done in the future in a
  different commit
  
  Discussed with/Requested by: imp

Modified:
  projects/building-blocks/lib/Makefile
  projects/building-blocks/share/examples/Makefile
  projects/building-blocks/share/man/man4/Makefile
  projects/building-blocks/share/mk/src.opts.mk
  projects/building-blocks/sys/conf/kern.opts.mk
  projects/building-blocks/sys/modules/Makefile
  projects/building-blocks/tools/build/options/WITHOUT_BHYVE
  projects/building-blocks/tools/build/options/WITH_HYPERV

Modified: projects/building-blocks/lib/Makefile
==============================================================================
--- projects/building-blocks/lib/Makefile	Wed Dec 10 04:54:43 2014	(r275660)
+++ projects/building-blocks/lib/Makefile	Wed Dec 10 05:59:29 2014	(r275661)
@@ -173,10 +173,6 @@ _libngatm=	libngatm
 _libauditd=	libauditd
 .endif
 
-.if ${MK_BHYVE} != "no"
-_libvmmapi=	libvmmapi
-.endif
-
 .if ${MK_BLUETOOTH} != "no"
 _libbluetooth=	libbluetooth
 _libsdp=	libsdp
@@ -261,28 +257,6 @@ _libypclnt=	libypclnt
 _libevent=	libevent
 .endif
 
-.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-_libsmb=	libsmb
-_libvgl=	libvgl
-_libproc=	libproc
-_librtld_db=	librtld_db
-.endif
-
-.if ${MACHINE_CPUARCH} == "mips"
-_libproc=	libproc
-_librtld_db=	librtld_db
-.endif
-
-.if ${MACHINE_CPUARCH} == "powerpc"
-_libproc=	libproc
-_librtld_db=	librtld_db
-_libsmb=	libsmb
-.endif
-
-.if ${MACHINE_CPUARCH} == "sparc64"
-_libsmb=	libsmb
-.endif
-
 .if ${MK_OPENSSL} != "no"
 _libmp=		libmp
 .endif
@@ -326,6 +300,34 @@ _libusbhid=	libusbhid
 _libusb=	libusb
 .endif
 
+.if ${MACHINE_CPUARCH} == "amd64"
+.if ${MK_BHYVE} != "no"
+_libvmmapi=	libvmmapi
+.endif
+.endif
+
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+_libsmb=	libsmb
+_libvgl=	libvgl
+_libproc=	libproc
+_librtld_db=	librtld_db
+.endif
+
+.if ${MACHINE_CPUARCH} == "mips"
+_libproc=	libproc
+_librtld_db=	librtld_db
+.endif
+
+.if ${MACHINE_CPUARCH} == "powerpc"
+_libproc=	libproc
+_librtld_db=	librtld_db
+_libsmb=	libsmb
+.endif
+
+.if ${MACHINE_CPUARCH} == "sparc64"
+_libsmb=	libsmb
+.endif
+
 .if !defined(LIBRARIES_ONLY)
 afterinstall:
 	${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include

Modified: projects/building-blocks/share/examples/Makefile
==============================================================================
--- projects/building-blocks/share/examples/Makefile	Wed Dec 10 04:54:43 2014	(r275660)
+++ projects/building-blocks/share/examples/Makefile	Wed Dec 10 05:59:29 2014	(r275661)
@@ -184,11 +184,6 @@ NO_OBJ=
 # in environments where it's not possible to keep /sys publicly readable)
 SHARED?=	copies
 
-.if ${MK_BHYVE} != "no"
-LDIRS+=		bhyve
-XFILES+=	bhyve/vmrun.sh
-.endif
-
 .if ${MK_HAST} != "no"
 LDIRS+=		hast
 XFILES+=	hast/ucarp.sh \
@@ -219,6 +214,13 @@ XFILES+=	libusb20/Makefile \
 		libusb20/control.c
 .endif
 
+.if ${MACHINE_CPUARCH} == "amd64"
+.if ${MK_BHYVE} != "no"
+LDIRS+=		bhyve
+XFILES+=	bhyve/vmrun.sh
+.endif
+.endif
+
 beforeinstall: ${SHARED} etc-examples
 .ORDER: ${SHARED} etc-examples
 

Modified: projects/building-blocks/share/man/man4/Makefile
==============================================================================
--- projects/building-blocks/share/man/man4/Makefile	Wed Dec 10 04:54:43 2014	(r275660)
+++ projects/building-blocks/share/man/man4/Makefile	Wed Dec 10 05:59:29 2014	(r275661)
@@ -729,6 +729,10 @@ MLINKS+=qlxge.4 if_qlxge.4
 MLINKS+=qlxgb.4 if_qlxgb.4
 MLINKS+=qlxgbe.4 if_qlxgbe.4
 MLINKS+=sfxge.4 if_sfxge.4
+
+.if ${MK_BHYVE} != "no"
+_bhyve.4=	bhyve.4
+.endif
 .endif
 
 .if ${MACHINE_CPUARCH} == "mips"
@@ -739,10 +743,6 @@ _nvram2env.4=	nvram2env.4
 SUBDIR=	man4.${MACHINE_CPUARCH}
 .endif
 
-.if ${MK_BHYVE} != "no"
-_bhyve.4=	bhyve.4
-.endif
-
 .if ${MK_CCD} != "no"
 _ccd.4=		ccd.4
 .endif

Modified: projects/building-blocks/share/mk/src.opts.mk
==============================================================================
--- projects/building-blocks/share/mk/src.opts.mk	Wed Dec 10 04:54:43 2014	(r275660)
+++ projects/building-blocks/share/mk/src.opts.mk	Wed Dec 10 05:59:29 2014	(r275661)
@@ -53,6 +53,7 @@ __DEFAULT_YES_OPTIONS = \
     AUDIT \
     AUTHPF \
     AUTOFS \
+    BHYVE \
     BINUTILS \
     BINUTILS_BOOTSTRAP \
     BLUETOOTH \
@@ -101,6 +102,7 @@ __DEFAULT_YES_OPTIONS = \
     GROFF \
     HAST \
     HTML \
+    HYPERV \
     ICONV \
     INET \
     INET6 \
@@ -234,20 +236,6 @@ __DEFAULT_NO_OPTIONS+=CLANG_IS_CC CLANG 
 __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
 .endif
 
-# bhyve is only supported on amd64
-.if ${__T} == "amd64"
-__DEFAULT_YES_OPTIONS+=BHYVE
-.else
-MK_BHYVE:=      no
-.endif
-
-# hyperv is only supported on amd64 and i386/i386
-.if ${__T} == "amd64" || (${__T} == "i386" && ${__TT} == "i386")
-__DEFAULT_YES_OPTIONS+=HYPERV
-.else
-MK_HYPERV:=	no
-.endif
-
 .include <bsd.mkopt.mk>
 
 #

Modified: projects/building-blocks/sys/conf/kern.opts.mk
==============================================================================
--- projects/building-blocks/sys/conf/kern.opts.mk	Wed Dec 10 04:54:43 2014	(r275660)
+++ projects/building-blocks/sys/conf/kern.opts.mk	Wed Dec 10 05:59:29 2014	(r275661)
@@ -24,11 +24,13 @@
 
 __DEFAULT_YES_OPTIONS = \
     AUTOFS \
+    BHYVE \
     BLUETOOTH \
     CCD \
     CDDL \
     CRYPT \
     FORMAT_EXTENSIONS \
+    HYPERV \
     ISCSI \
     INET \
     INET6 \
@@ -69,20 +71,6 @@ __TT=${TARGET}
 __TT=${MACHINE}
 .endif
 
-# bhyve is only supported on amd64
-.if ${__T} == "amd64"
-__DEFAULT_YES_OPTIONS+=BHYVE
-.else
-MK_BHYVE:=      no
-.endif
-
-# hyperv is only supported on amd64 and i386/i386
-.if ${__T} == "amd64" || (${__T} == "i386" && ${__TT} == "i386")
-__DEFAULT_YES_OPTIONS+=HYPERV
-.else
-MK_HYPERV:=	no
-.endif
-
 # expanded inline from bsd.mkopt.mk to avoid share/mk dependency
 
 # Those that default to yes

Modified: projects/building-blocks/sys/modules/Makefile
==============================================================================
--- projects/building-blocks/sys/modules/Makefile	Wed Dec 10 04:54:43 2014	(r275660)
+++ projects/building-blocks/sys/modules/Makefile	Wed Dec 10 05:59:29 2014	(r275661)
@@ -388,10 +388,6 @@ SUBDIR=	\
 _autofs=	autofs
 .endif
 
-.if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
-_vmm=		vmm
-.endif
-
 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
 .if exists(${.CURDIR}/../opencrypto)
 _crypto=	crypto
@@ -402,10 +398,6 @@ _random=	random
 .endif
 .endif
 
-.if ${MK_HYPERV} != "no" || defined(ALL_MODULES)
-_hyperv=	hyperv
-.endif
-
 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
 	defined(ALL_MODULES)
 _carp=		carp
@@ -505,6 +497,9 @@ _et=		et
 _exca=		exca
 _ext2fs=	ext2fs
 _filemon=	filemon
+.if ${MK_HYPERV} != "no" || defined(ALL_MODULES)
+_hyperv=	hyperv
+.endif
 _i2c=		i2c
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
 _ibcore=        ibcore
@@ -625,6 +620,10 @@ _qlxge=		qlxge
 _qlxgb=		qlxgb
 _qlxgbe=	qlxgbe
 _sfxge=		sfxge
+
+.if ${MK_BHYVE} != "no" || defined(ALL_MODULES)
+_vmm=		vmm
+.endif
 .endif
 
 .if ${MACHINE_CPUARCH} == "i386"

Modified: projects/building-blocks/tools/build/options/WITHOUT_BHYVE
==============================================================================
--- projects/building-blocks/tools/build/options/WITHOUT_BHYVE	Wed Dec 10 04:54:43 2014	(r275660)
+++ projects/building-blocks/tools/build/options/WITHOUT_BHYVE	Wed Dec 10 05:59:29 2014	(r275661)
@@ -2,3 +2,5 @@
 Set to not build or install
 .Xr bhyve 8 ,
 associated utilities, and examples.
+.Pp
+This option only affects amd64/amd64

Modified: projects/building-blocks/tools/build/options/WITH_HYPERV
==============================================================================
--- projects/building-blocks/tools/build/options/WITH_HYPERV	Wed Dec 10 04:54:43 2014	(r275660)
+++ projects/building-blocks/tools/build/options/WITH_HYPERV	Wed Dec 10 05:59:29 2014	(r275661)
@@ -1,2 +1,4 @@
 .\" $FreeBSD$
 Set to build and install HyperV utilities.
+.Pp
+This option only affects amd64/amd64 and i386/i386



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412100559.sBA5xTNn060344>