#!/bin/sh # # This file is in the public domain. ident='$FreeBSD$' # # show settings | options # show() { mode=$1; shift case ${mode} in settings) yes_prefix=WITH no_prefix=WITHOUT ;; options) yes_prefix=WITHOUT no_prefix=WITH ;; *) echo "internal error" >/dev/stderr exit 1 ;; esac make "$@" -f ../../../share/mk/bsd.own.mk SRCCONF=/dev/null -V_ -dg1 | grep ^MK_ |sort | while read var _ val; do opt=${var#MK_} case ${val} in yes) echo ${yes_prefix}_${opt} ;; no) echo ${no_prefix}_${opt} ;; *) echo "make showconfig broken" >/dev/stderr exit 1 ;; esac done } main() { trap 'rm -f _config _config2 _deps' exit ident=${ident#$} ident=${ident% $} fbsdid='$FreeBSD$' cat <_config show options | while read opt; do if [ -f ${opt} ]; then cat </dev/stderr fi show settings -D${opt} |sort >_config2 comm -13 _config _config2 |grep -v "^${opt}$" >_deps if [ -s _deps ]; then cat <