1c5922fbfSRuslan Ermilov#!/bin/sh 2c5922fbfSRuslan Ermilov# 3c5922fbfSRuslan Ermilov# This file is in the public domain. 4c5922fbfSRuslan Ermilov 5c5922fbfSRuslan Ermilovident='$FreeBSD$' 6c5922fbfSRuslan Ermilov 7c5922fbfSRuslan Ermilov# 8c5922fbfSRuslan Ermilov# show settings | options 9c5922fbfSRuslan Ermilov# 10c5922fbfSRuslan Ermilovshow() 11c5922fbfSRuslan Ermilov{ 12c5922fbfSRuslan Ermilov 13c5922fbfSRuslan Ermilov mode=$1; shift 14c5922fbfSRuslan Ermilov case ${mode} in 15c5922fbfSRuslan Ermilov settings) 16c5922fbfSRuslan Ermilov yes_prefix=WITH 17c5922fbfSRuslan Ermilov no_prefix=WITHOUT 18c5922fbfSRuslan Ermilov ;; 19c5922fbfSRuslan Ermilov options) 20c5922fbfSRuslan Ermilov yes_prefix=WITHOUT 21c5922fbfSRuslan Ermilov no_prefix=WITH 22c5922fbfSRuslan Ermilov ;; 23c5922fbfSRuslan Ermilov *) 24c5922fbfSRuslan Ermilov echo "internal error" >/dev/stderr 25c5922fbfSRuslan Ermilov exit 1 26c5922fbfSRuslan Ermilov ;; 27c5922fbfSRuslan Ermilov esac 28c5922fbfSRuslan Ermilov make "$@" -f ../../../share/mk/bsd.own.mk SRCCONF=/dev/null -V_ -dg1 | 29c5922fbfSRuslan Ermilov grep ^MK_ |sort | 30c5922fbfSRuslan Ermilov while read var _ val; do 31c5922fbfSRuslan Ermilov opt=${var#MK_} 32c5922fbfSRuslan Ermilov case ${val} in 33c5922fbfSRuslan Ermilov yes) 34c5922fbfSRuslan Ermilov echo ${yes_prefix}_${opt} 35c5922fbfSRuslan Ermilov ;; 36c5922fbfSRuslan Ermilov no) 37c5922fbfSRuslan Ermilov echo ${no_prefix}_${opt} 38c5922fbfSRuslan Ermilov ;; 39c5922fbfSRuslan Ermilov *) 40c5922fbfSRuslan Ermilov echo "make showconfig broken" >/dev/stderr 41c5922fbfSRuslan Ermilov exit 1 42c5922fbfSRuslan Ermilov ;; 43c5922fbfSRuslan Ermilov esac 44c5922fbfSRuslan Ermilov done 45c5922fbfSRuslan Ermilov} 46c5922fbfSRuslan Ermilov 47c5922fbfSRuslan Ermilovmain() 48c5922fbfSRuslan Ermilov{ 49c5922fbfSRuslan Ermilov 50c5922fbfSRuslan Ermilov trap 'rm -f _config _config2 _deps' exit 51c5922fbfSRuslan Ermilov ident=${ident#$} 52c5922fbfSRuslan Ermilov ident=${ident% $} 5341c8ddc3SRuslan Ermilov fbsdid='$'FreeBSD'$' 54c5922fbfSRuslan Ermilov cat <<EOF 55c5922fbfSRuslan Ermilov.\" DO NOT EDIT-- this file is automatically generated. 56c5922fbfSRuslan Ermilov.\" from ${ident} 57c5922fbfSRuslan Ermilov.\" ${fbsdid} 58c5922fbfSRuslan Ermilov.Dd $(LC_TIME=C date +'%B %e, %Y') 59c5922fbfSRuslan Ermilov.Dt SRC.CONF 5 60c5922fbfSRuslan Ermilov.Os 61c5922fbfSRuslan Ermilov.Sh NAME 62c5922fbfSRuslan Ermilov.Nm src.conf 6357caf3d6STom Rhodes.Nd "source build options" 64c5922fbfSRuslan Ermilov.Sh DESCRIPTION 65c5922fbfSRuslan ErmilovThe 66c5922fbfSRuslan Ermilov.Nm 67c5922fbfSRuslan Ermilovfile contains settings that will apply to every build involving the 68c5922fbfSRuslan Ermilov.Fx 69c5922fbfSRuslan Ermilovsource tree; see 70c5922fbfSRuslan Ermilov.Xr build 7 . 71c5922fbfSRuslan Ermilov.Pp 72c5922fbfSRuslan ErmilovThe 73c5922fbfSRuslan Ermilov.Nm 74c5922fbfSRuslan Ermilovfile uses the standard makefile syntax. 75c5922fbfSRuslan ErmilovHowever, 76c5922fbfSRuslan Ermilov.Nm 77c5922fbfSRuslan Ermilovshould not specify any dependencies to 78c5922fbfSRuslan Ermilov.Xr make 1 . 79c5922fbfSRuslan ErmilovInstead, 80c5922fbfSRuslan Ermilov.Nm 81c5922fbfSRuslan Ermilovis to set 82c5922fbfSRuslan Ermilov.Xr make 1 83c5922fbfSRuslan Ermilovvariables that control the aspects of how the system builds. 84c5922fbfSRuslan Ermilov.Pp 85c5922fbfSRuslan ErmilovThe default location of 86c5922fbfSRuslan Ermilov.Nm 87c5922fbfSRuslan Ermilovis 88c5922fbfSRuslan Ermilov.Pa /etc/src.conf , 89c5922fbfSRuslan Ermilovthough an alternative location can be specified in the 90c5922fbfSRuslan Ermilov.Xr make 1 91c5922fbfSRuslan Ermilovvariable 92c5922fbfSRuslan Ermilov.Va SRCCONF . 93c5922fbfSRuslan ErmilovOverriding the location of 94c5922fbfSRuslan Ermilov.Nm 95c5922fbfSRuslan Ermilovmaybe necessary if the system-wide settings are not suitable 96c5922fbfSRuslan Ermilovfor a particular build. 97c5922fbfSRuslan ErmilovFor instance, setting 98c5922fbfSRuslan Ermilov.Va SRCCONF 99c5922fbfSRuslan Ermilovto 100c5922fbfSRuslan Ermilov.Pa /dev/null 101c5922fbfSRuslan Ermiloveffectively resets all build controls to their defaults. 102c5922fbfSRuslan Ermilov.Pp 103c5922fbfSRuslan ErmilovThe only purpose of 104c5922fbfSRuslan Ermilov.Nm 105c5922fbfSRuslan Ermilovis to control the compilation of the 106c5922fbfSRuslan Ermilov.Fx 10757caf3d6STom Rhodessource code, which is usually located in 108c5922fbfSRuslan Ermilov.Pa /usr/src . 109c5922fbfSRuslan ErmilovAs a rule, the system administrator creates 110c5922fbfSRuslan Ermilov.Nm 111c5922fbfSRuslan Ermilovwhen the values of certain control variables need to be changed 112c5922fbfSRuslan Ermilovfrom their defaults. 113c5922fbfSRuslan Ermilov.Pp 114c5922fbfSRuslan ErmilovIn addition, control variables can be specified 115c5922fbfSRuslan Ermilovfor a particular build via the 116c5922fbfSRuslan Ermilov.Fl D 117c5922fbfSRuslan Ermilovoption of 118c5922fbfSRuslan Ermilov.Xr make 1 119c5922fbfSRuslan Ermilovor in environment; see 120c5922fbfSRuslan Ermilov.Xr environ 7 . 121c5922fbfSRuslan Ermilov.Pp 12207b7d7fbSTom RhodesThe values of variables are ignored regardless of their setting; 12357caf3d6STom Rhodeseven if they would be set to 124c5922fbfSRuslan Ermilov.Dq Li FALSE 125c5922fbfSRuslan Ermilovor 12657caf3d6STom Rhodes.Dq Li NO . 12757caf3d6STom RhodesJust the existence of an option will cause 12857caf3d6STom Rhodesit to be honoured by 12957caf3d6STom Rhodes.Xr make 1 . 130c5922fbfSRuslan Ermilov.Pp 131c5922fbfSRuslan ErmilovThe following list provides a name and short description for variables 132c5922fbfSRuslan Ermilovthat can be used for source builds. 133c5922fbfSRuslan Ermilov.Bl -tag -width indent 134c5922fbfSRuslan ErmilovEOF 135c5922fbfSRuslan Ermilov show settings |sort >_config 136c5922fbfSRuslan Ermilov show options | 137c5922fbfSRuslan Ermilov while read opt; do 138c5922fbfSRuslan Ermilov if [ -f ${opt} ]; then 139c5922fbfSRuslan Ermilov cat <<EOF 140c5922fbfSRuslan Ermilov.It Va ${opt} 141c5922fbfSRuslan ErmilovEOF 142c5922fbfSRuslan Ermilov sed -e's/\$\(FreeBSD: .*\) \$/from \1/' ${opt} 143c5922fbfSRuslan Ermilov else 144c5922fbfSRuslan Ermilov echo "no description found for ${opt}, skipping" >/dev/stderr 145c3b08cc6SYaroslav Tykhiy continue 146c5922fbfSRuslan Ermilov fi 147c5922fbfSRuslan Ermilov show settings -D${opt} |sort >_config2 148c5922fbfSRuslan Ermilov comm -13 _config _config2 |grep -v "^${opt}$" >_deps 149c5922fbfSRuslan Ermilov if [ -s _deps ]; then 150c5922fbfSRuslan Ermilov cat <<EOF 151c5922fbfSRuslan ErmilovWhen set, it also enforces the following options: 152c5922fbfSRuslan Ermilov.Pp 153c5922fbfSRuslan Ermilov.Bl -item -compact 154c5922fbfSRuslan ErmilovEOF 155c5922fbfSRuslan Ermilov cat _deps |while read opt2; do 156c5922fbfSRuslan Ermilov cat <<EOF 157c5922fbfSRuslan Ermilov.It 158c5922fbfSRuslan Ermilov.Va ${opt2} 159c5922fbfSRuslan ErmilovEOF 160c5922fbfSRuslan Ermilov done 161c5922fbfSRuslan Ermilov cat <<EOF 162c5922fbfSRuslan Ermilov.El 163c5922fbfSRuslan ErmilovEOF 164c5922fbfSRuslan Ermilov fi 165c5922fbfSRuslan Ermilov done 166c5922fbfSRuslan Ermilov cat <<EOF 167c5922fbfSRuslan Ermilov.El 168c5922fbfSRuslan Ermilov.Sh FILES 169c5922fbfSRuslan Ermilov.Bl -tag -compact 170c5922fbfSRuslan Ermilov.It Pa /etc/src.conf 171c5922fbfSRuslan Ermilov.It Pa /usr/share/mk/bsd.own.mk 172c5922fbfSRuslan Ermilov.El 173c5922fbfSRuslan Ermilov.Sh SEE ALSO 174c5922fbfSRuslan Ermilov.Xr make 1 , 175c5922fbfSRuslan Ermilov.Xr make.conf 5 , 176c5922fbfSRuslan Ermilov.Xr build 7 , 177c5922fbfSRuslan Ermilov.Xr ports 7 178c5922fbfSRuslan Ermilov.Sh HISTORY 179c5922fbfSRuslan ErmilovThe 180c5922fbfSRuslan Ermilov.Nm 181c5922fbfSRuslan Ermilovfile appeared in 182c5922fbfSRuslan Ermilov.Fx 7.0 . 183c5922fbfSRuslan Ermilov.Sh AUTHORS 184c5922fbfSRuslan ErmilovThis manual page was autogenerated. 185c5922fbfSRuslan ErmilovEOF 186c5922fbfSRuslan Ermilov} 187c5922fbfSRuslan Ermilov 188c5922fbfSRuslan Ermilovmain 189