From 04031e9ae2866272e7a5d945f92af4baa4539536 Mon Sep 17 00:00:00 2001 From: "Stephane E. Potvin" Date: Wed, 13 Jun 2007 02:08:04 +0000 Subject: [PATCH] Options spring cleanup: - Add and document the KVM and KVM_SUPPORT options that are needed for the ifmcstats(3) makefile - Garbage collect unused variables - Add missing inclusion of bsd.own.mk where needed Approved by: kan (mentor) Reviewed by: ru --- lib/libarchive/test/Makefile | 1 - share/mk/bsd.own.mk | 2 ++ sys/modules/ip_mroute_mod/Makefile | 6 ++++-- tools/build/options/WITHOUT_KVM | 5 +++++ tools/build/options/WITHOUT_KVM_SUPPORT | 4 ++++ usr.bin/Makefile | 2 -- usr.sbin/ifmcstat/Makefile | 6 ++++-- 7 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 tools/build/options/WITHOUT_KVM create mode 100644 tools/build/options/WITHOUT_KVM_SUPPORT diff --git a/lib/libarchive/test/Makefile b/lib/libarchive/test/Makefile index 4163e0f9fb63..7f9d115b93db 100644 --- a/lib/libarchive/test/Makefile +++ b/lib/libarchive/test/Makefile @@ -48,7 +48,6 @@ SRCS= ${TESTS} \ CLEANFILES+= list.h -MK_MAN=no NO_MAN=yes PROG=libarchive_test diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 81c074003493..f6148cb3780e 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -325,6 +325,7 @@ WITH_IDEA= IPFILTER \ IPX \ KERBEROS \ + KVM \ LIB32 \ LIBPTHREAD \ LIBTHR \ @@ -449,6 +450,7 @@ MK_GDB:= no INET6 \ IPX \ KERBEROS \ + KVM \ PAM .if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT) .error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set. diff --git a/sys/modules/ip_mroute_mod/Makefile b/sys/modules/ip_mroute_mod/Makefile index 99eaf60b4718..5b3330fd513c 100644 --- a/sys/modules/ip_mroute_mod/Makefile +++ b/sys/modules/ip_mroute_mod/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .PATH: ${.CURDIR}/../../netinet ${.CURDIR}/../../netinet6 KMOD= ip_mroute @@ -8,7 +10,7 @@ SRCS= ip_mroute.c SRCS+= opt_inet.h opt_mac.h opt_mrouting.h SRCS+= opt_inet6.h -.if !defined(MK_INET6_SUPPORT) || ${MK_INET6_SUPPORT} != "no" +.if ${MK_INET6_SUPPORT} != "no" SRCS+= ip6_mroute.c .endif @@ -17,7 +19,7 @@ opt_inet.h: echo "#define INET 1" > ${.TARGET} opt_mrouting.h: echo "#define MROUTING 1" > ${.TARGET} -.if !defined(MK_INET6_SUPPORT) || ${MK_INET6_SUPPORT} != "no" +.if ${MK_INET6_SUPPORT} != "no" opt_inet6.h: echo "#define INET6 1" > ${.TARGET} .endif diff --git a/tools/build/options/WITHOUT_KVM b/tools/build/options/WITHOUT_KVM new file mode 100644 index 000000000000..121186a958a8 --- /dev/null +++ b/tools/build/options/WITHOUT_KVM @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build the +.Nm libkvm +library as a part of the base system. +.Sy "The option has no effect yet." diff --git a/tools/build/options/WITHOUT_KVM_SUPPORT b/tools/build/options/WITHOUT_KVM_SUPPORT new file mode 100644 index 000000000000..16c91a78e039 --- /dev/null +++ b/tools/build/options/WITHOUT_KVM_SUPPORT @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build some programs without optional +.Nm libkvm +support. diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 0b5e2f4b3539..75c6af754d03 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -9,8 +9,6 @@ # Moved to secure: bdes # -.include - SUBDIR= alias \ apply \ asa \ diff --git a/usr.sbin/ifmcstat/Makefile b/usr.sbin/ifmcstat/Makefile index 1f8c2a58dd0d..62de0b9485a0 100644 --- a/usr.sbin/ifmcstat/Makefile +++ b/usr.sbin/ifmcstat/Makefile @@ -1,17 +1,19 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ +.include + PROG= ifmcstat MAN= ifmcstat.8 BINMODE= 550 WARNS?= 2 -.if !defined(MK_INET6_SUPPORT) || ${MK_INET6_SUPPORT} != "no" +.if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DINET6 .endif -.if !defined(MK_KVM_SUPPORT) || ${MK_KVM_SUPPORT} != "no" +.if ${MK_KVM_SUPPORT} != "no" CFLAGS+=-DWITH_KVM DPADD= ${LIBKVM} LDADD= -lkvm