]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
src.conf.5: Make it self-documenting that the mkopts are environment-only.
authorbdrewery <bdrewery@FreeBSD.org>
Thu, 17 Sep 2015 20:33:52 +0000 (20:33 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Thu, 17 Sep 2015 20:33:52 +0000 (20:33 +0000)
Sponsored by: EMC / Isilon Storage Division

share/mk/sys.mk
tools/build/options/WITH_META_MODE
tools/build/options/makeman

index 2b86a7b056b4774f6817030512c8bdaafe44f3f2..26919a320cc16ca803cb2cc1284ea406bb8ec97c 100644 (file)
@@ -29,6 +29,11 @@ __DEFAULT_DEPENDENT_OPTIONS= \
        STAGING/META_MODE \
        SYSROOT/META_MODE
 
+__ENV_ONLY_OPTIONS:= \
+       ${__DEFAULT_NO_OPTIONS} \
+       ${__DEFAULT_YES_OPTIONS} \
+       ${__DEFAULT_DEPENDENT_OPTIONS:H}
+
 # early include for customization
 # see local.sys.mk below
 # Not included when building in fmake compatibility mode (still needed
index 88402a464466a23cdde76479953412bdc7496cc1..b255777956bcac691d285ac7a55efcf7615732ad 100644 (file)
@@ -25,11 +25,6 @@ If
 is available the meta file will also capture a record of files
 used to produce the target by tracking syscalls.
 .Pp
-This must be set in the environment or
-.Pa /etc/src-env.conf ,
-not
-.Pa /etc/src.conf .
-.Pp
 The build will hide commands ran unless
 .Va NO_SILENT
 is defined.
index ef469e1751b58b4c6a4240bd1bbabe15e0359b3d..3b5864f1560972a274c1bbce5a10e482eac3922c 100755 (executable)
@@ -221,6 +221,7 @@ EOF
        show with SRCCONF=/dev/null | sort | sed 's/$/=/' > $t/src.conf
        show settings SRCCONF=$t/src.conf | sort > $t/config_WITH_ALL
        show without SRCCONF=/dev/null | sort > $t/config_WITHOUT_ALL
+       env_only_options="$(${make} -V __ENV_ONLY_OPTIONS)"
 
        show_options |
        while read opt targets ; do
@@ -289,6 +290,17 @@ EOF
                        done
                        echo '.El'
                fi
+
+               case " ${env_only_options} " in
+                       *\ ${opt#*_}\ *)
+                               echo ".Pp"
+                               echo "This must be set in the environment or"
+                               echo ".Pa /etc/src-env.conf ,"
+                               echo "not"
+                               echo ".Pa /etc/src.conf ."
+                               ;;
+               esac
+
                twiddle >&2
        done
        cat <<EOF