From f987297fc922c229de89a065ed138a26ae66c8c8 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 27 Sep 2016 18:08:38 +0000 Subject: [PATCH] Add a WITHOUT_DIALOG src.conf(5) knob It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup). Reviewed by: dteske Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7969 --- Makefile.inc1 | 10 ++++++---- gnu/usr.bin/Makefile | 3 ++- lib/Makefile | 3 ++- share/mk/src.opts.mk | 5 +++++ tools/build/mk/OptionalObsoleteFiles.inc | 21 +++++++++++++++++++++ tools/build/options/WITHOUT_DIALOG | 2 ++ usr.bin/Makefile | 2 +- usr.sbin/Makefile | 4 ++-- 8 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 tools/build/options/WITHOUT_DIALOG diff --git a/Makefile.inc1 b/Makefile.inc1 index 29ec4262251f..8393e865893f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2032,8 +2032,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_cddl_lib_libctf} \ lib/libutil lib/libpjdlog ${_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++ @@ -2041,6 +2040,11 @@ gnu/lib/libstdc++__L: lib/msun__L gnu/lib/libsupc++__L: gnu/lib/libstdc++__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 @@ -2190,8 +2194,6 @@ lib/libproc__L: gnu/lib/libsupc++__L .endif .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 63cbd0b629a6..6ba9ef2e1fe3 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -4,7 +4,6 @@ SUBDIR= ${_binutils} \ ${_cc} \ - dialog \ diff \ diff3 \ ${_dtc} \ @@ -49,6 +48,8 @@ _gdb= gdb _cc= cc .endif +SUBDIR.${MK_DIALOG}+= dialog + SUBDIR_PARALLEL= .include diff --git a/lib/Makefile b/lib/Makefile index 16f746803305..841018406328 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -46,7 +46,6 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ ${_libdevdctl} \ libdevinfo \ libdevstat \ - libdpv \ libdwarf \ libedit \ ${_libelftc} \ @@ -197,6 +196,8 @@ _libelftc= libelftc _libpe= libpe .endif +SUBDIR.${MK_DIALOG}+= libdpv + .if ${MK_FILE} != "no" _libmagic= libmagic .endif diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 21c7c5967576..2a08b8344e52 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -76,6 +76,7 @@ __DEFAULT_YES_OPTIONS = \ CTM \ CUSE \ CXX \ + DIALOG \ DICT \ DMAGENT \ DYNAMICROOT \ @@ -328,6 +329,10 @@ MK_GNUCXX:= no MK_TESTS:= 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 4edd5f7c2c87..a4525313af7c 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1340,6 +1340,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 000000000000..f5bc50849466 --- /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 5a6911d02dda..58bcfa07f64b 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -36,7 +36,6 @@ SUBDIR= alias \ ctlstat \ cut \ dirname \ - dpv \ du \ elf2aout \ elfdump \ @@ -200,6 +199,7 @@ SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BSD_CPIO}+= cpio SUBDIR.${MK_CALENDAR}+= calendar SUBDIR.${MK_CLANG}+= clang +SUBDIR.${MK_DIALOG}+= dpv SUBDIR.${MK_EE}+= ee SUBDIR.${MK_FILE}+= file SUBDIR.${MK_FINGER}+= finger diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 67499a10b5c6..d9fc76a68294 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -6,7 +6,6 @@ SUBDIR= adduser \ arp \ binmiscctl \ - bsdconfig \ camdd \ cdcontrol \ chkgrp \ @@ -89,7 +88,6 @@ SUBDIR= adduser \ tcpdump \ traceroute \ trpt \ - tzsetup \ uefisign \ ugidfw \ vigr \ @@ -123,6 +121,8 @@ SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd SUBDIR.${MK_CTM}+= ctm +SUBDIR.${MK_DIALOG}+= tzsetup +SUBDIR.${MK_DIALOG}+= bsdconfig SUBDIR.${MK_FLOPPY}+= fdcontrol SUBDIR.${MK_FLOPPY}+= fdformat SUBDIR.${MK_FLOPPY}+= fdread