From 32846ca23a8de129975551b32b86302688a41de1 Mon Sep 17 00:00:00 2001 From: marius Date: Sat, 5 Aug 2017 12:33:00 +0000 Subject: [PATCH] MFC: r306375 Add a WITHOUT_DIALOG src.conf(5) knob. It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup). git-svn-id: svn://svn.freebsd.org/base/stable/10@322094 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- Makefile.inc1 | 10 ++++++---- gnu/usr.bin/Makefile | 6 +++++- lib/Makefile | 6 +++++- share/mk/bsd.own.mk | 5 +++++ tools/build/mk/OptionalObsoleteFiles.inc | 21 +++++++++++++++++++++ tools/build/options/WITHOUT_DIALOG | 2 ++ usr.bin/Makefile | 6 +++++- usr.sbin/Makefile | 9 +++++++-- 8 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 tools/build/options/WITHOUT_DIALOG diff --git a/Makefile.inc1 b/Makefile.inc1 index 885aaba46..eb45db428 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1713,13 +1713,17 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_cddl_lib_libzfs_core} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ - ${_secure_lib_libssh} ${_secure_lib_libssl} \ - gnu/lib/libdialog + ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_GNUCXX} != no _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/lib/libstdc++__L: lib/msun__L .endif +.if ${MK_DIALOG} != "no" +_prebuild_libs+= gnu/lib/libdialog +gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _prebuild_libs+= lib/libc++ .endif @@ -1851,8 +1855,6 @@ _lib_libypclnt= lib/libypclnt lib/libradius__L: lib/libmd__L .endif -gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw__L - .for _lib in ${_prereq_libs} ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index 1eb57aa81..adf8f18b4 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -4,7 +4,7 @@ SUBDIR= ${_binutils} \ ${_cc} \ - dialog \ + ${_dialog} \ diff \ diff3 \ ${_dtc} \ @@ -26,6 +26,10 @@ _groff= groff .endif .endif +.if ${MK_DIALOG} != "no" +_dialog= dialog +.endif + .if ${MK_GPL_DTC} != "no" _dtc= dtc .endif diff --git a/lib/Makefile b/lib/Makefile index 57bfc65dd..7ff9289f1 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -40,7 +40,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libdevctl \ libdevinfo \ libdevstat \ - libdpv \ + ${_libdpv} \ libdwarf \ libedit \ ${_libefi} \ @@ -164,6 +164,10 @@ _libbsnmp= libbsnmp _clang= clang .endif +.if ${MK_DIALOG} != "no" +_libdpv= libdpv +.endif + .if ${MK_FILE} != "no" _libmagic= libmagic .endif diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 3ccb01a75..1d7152a31 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -288,6 +288,7 @@ __DEFAULT_YES_OPTIONS = \ CRYPT \ CTM \ CXX \ + DIALOG \ DICT \ DYNAMICROOT \ ED_CRYPTO \ @@ -551,6 +552,10 @@ MK_CLANG:= no MK_GROFF:= no .endif +.if ${MK_DIALOG} == "no" +MK_BSDINSTALL:= no +.endif + .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index c8bee6859..2365f4de4 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1057,6 +1057,27 @@ OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus .endif +.if ${MK_DIALOG} == no +OLD_FILES+=usr/bin/dialog +OLD_FILES+=usr/bin/dpv +OLD_FILES+=usr/lib/libdialog.a +OLD_FILES+=usr/lib/libdialog.so +OLD_FILES+=usr/lib/libdialog.so.8 +OLD_FILES+=usr/lib/libdialog_p.a +OLD_FILES+=usr/lib/libdpv.a +OLD_FILES+=usr/lib/libdpv.so +OLD_FILES+=usr/lib/libdpv.so.1 +OLD_FILES+=usr/lib/libdpv_p.a +OLD_FILES+=usr/sbin/bsdconfig +OLD_FILES+=usr/sbin/tzsetup +OLD_FILES+=usr/share/man/man1/dialog.1.gz +OLD_FILES+=usr/share/man/man1/dpv.1.gz +OLD_FILES+=usr/share/man/man3/dialog.3.gz +OLD_FILES+=usr/share/man/man3/dpv.3.gz +OLD_FILES+=usr/share/man/man8/tzsetup.8.gz +OLD_FILES+=usr/share/man/man8/bsdconfig.8.gz +.endif + .if ${MK_FMTREE} == no OLD_FILES+=usr/sbin/fmtree OLD_FILES+=usr/share/man/man8/fmtree.8.gz diff --git a/tools/build/options/WITHOUT_DIALOG b/tools/build/options/WITHOUT_DIALOG new file mode 100644 index 000000000..f5bc50849 --- /dev/null +++ b/tools/build/options/WITHOUT_DIALOG @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to not build dialog(1), dialog(1,3), and dpv(1,3). diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 25a8e41c5..455e354fe 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -37,7 +37,7 @@ SUBDIR= alias \ ctlstat \ cut \ dirname \ - dpv \ + ${_dpv} \ du \ elf2aout \ elfdump \ @@ -227,6 +227,10 @@ SUBDIR+= calendar _clang= clang .endif +.if ${MK_DIALOG} != "no" +_dpv= dpv +.endif + .if ${MK_EE} != "no" SUBDIR+= ee .endif diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 48d728651..b3e8c8af1 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -6,7 +6,7 @@ SUBDIR= adduser \ arp \ binmiscctl \ - bsdconfig \ + ${_bsdconfig} \ camdd \ cdcontrol \ chkgrp \ @@ -89,7 +89,7 @@ SUBDIR= adduser \ tcpdump \ traceroute \ trpt \ - tzsetup \ + ${_tzsetup} \ uefisign \ ugidfw \ vigr \ @@ -152,6 +152,11 @@ SUBDIR+= ctm SUBDIR+= cxgbetool .endif +.if ${MK_DIALOG} != "no" +_bsdconfig= bsdconfig +_tzsetup= tzsetup +.endif + .if ${MK_FLOPPY} != "no" SUBDIR+= fdcontrol SUBDIR+= fdformat -- 2.42.0