Skip to content

Commit

Permalink
HYPERV isn't available on all architectures, but just on by default
Browse files Browse the repository at this point in the history
for i386/amd64. Rather, it only works on i386/amd64 and should only be
built there. Rather than change the default based on which
architecutre, do things more directly by only building it on
i386/amd64 and having it always on. This is how we handle other
options that are relevant only for a few architectures.
  • Loading branch information
bsdimp committed Oct 16, 2014
1 parent cb2fc82 commit e33f69c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
7 changes: 3 additions & 4 deletions etc/devd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ FILES+= apple.conf

.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
FILES+= asus.conf
.if ${MK_HYPERV} != "no"
FILES+= hyperv.conf
.endif
.endif

.if ${MK_USB} != "no"
Expand All @@ -18,10 +21,6 @@ FILES+= uath.conf ulpt.conf usb.conf
FILES+= zfs.conf
.endif

.if ${MK_HYPERV} != "no"
FILES+= hyperv.conf
.endif

NO_OBJ=
FILESDIR= /etc/devd
FILESMODE= 644
Expand Down
7 changes: 2 additions & 5 deletions libexec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ SUBDIR= ${_atf} \
fingerd \
ftpd \
getty \
${_hyperv} \
${_mail.local} \
${_mknetid} \
${_pppoed} \
Expand Down Expand Up @@ -55,10 +54,6 @@ _dma= dma
_dma-mbox-create= dma-mbox-create
.endif

.if ${MK_HYPERV} != "no"
_hyperv= hyperv
.endif

.if ${MK_NIS} != "no"
_mknetid= mknetid
_ypxfr= ypxfr
Expand Down Expand Up @@ -95,4 +90,6 @@ _atf= atf
_tests= tests
.endif

.include <bsd.arch.inc.mk>

.include <bsd.subdir.mk>
5 changes: 5 additions & 0 deletions libexec/Makefile.amd64
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# $FreeBSD$

.if ${MK_HYPERV} != "no"
SUBDIR+= hyperv
.endif
5 changes: 5 additions & 0 deletions libexec/Makefile.i386
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# $FreeBSD$

.if ${MK_HYPERV} != "no"
SUBDIR+= hyperv
.endif
8 changes: 1 addition & 7 deletions share/mk/src.opts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ __DEFAULT_YES_OPTIONS = \
GPL_DTC \
GROFF \
HTML \
HYPERV \
ICONV \
INET \
INET6 \
Expand Down Expand Up @@ -211,13 +212,6 @@ __DEFAULT_NO_OPTIONS+=CLANG_IS_CC CLANG CLANG_BOOTSTRAP
__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
.endif

# HyperV is only available for x86 and amd64.
.if ${__T} == "amd64" || ${__T} == "i386"
__DEFAULT_YES_OPTIONS+=HYPERV
.else
__DEFAULT_NO_OPTIONS+=HYPERV
.endif

.include <bsd.mkopt.mk>

#
Expand Down

0 comments on commit e33f69c

Please sign in to comment.