003 File Manager
Current Path:
/usr/src/contrib/bmake/mk
usr
/
src
/
contrib
/
bmake
/
mk
/
📁
..
📄
ChangeLog
(52.99 KB)
📄
FILES
(858 B)
📄
README
(12.8 KB)
📄
auto.dep.mk
(1.95 KB)
📄
auto.obj.mk
(2.41 KB)
📄
autoconf.mk
(1.89 KB)
📄
autodep.mk
(5.72 KB)
📄
compiler.mk
(1.13 KB)
📄
cython.mk
(2.49 KB)
📄
dep.mk
(2.98 KB)
📄
dirdeps-cache-update.mk
(5.86 KB)
📄
dirdeps-options.mk
(2.92 KB)
📄
dirdeps-targets.mk
(5.26 KB)
📄
dirdeps.mk
(28.03 KB)
📄
doc.mk
(1.08 KB)
📄
dpadd.mk
(9.42 KB)
📄
files.mk
(2.13 KB)
📄
final.mk
(403 B)
📄
gendirdeps.mk
(12.02 KB)
📄
host-target.mk
(1.49 KB)
📄
host.libnames.mk
(700 B)
📄
inc.mk
(2.2 KB)
📄
init.mk
(2.14 KB)
📄
install-mk
(3.92 KB)
📄
install-new.mk
(1.28 KB)
📄
java.mk
(2.09 KB)
📄
ldorder.mk
(4.64 KB)
📄
lib.mk
(15.83 KB)
📄
libnames.mk
(585 B)
📄
libs.mk
(2.11 KB)
📄
links.mk
(1.63 KB)
📄
man.mk
(3.53 KB)
📄
manifest.mk
(2.37 KB)
📄
meta.autodep.mk
(9.41 KB)
📄
meta.stage.mk
(11.01 KB)
📄
meta.subdir.mk
(2.11 KB)
📄
meta.sys.mk
(4.03 KB)
📄
meta2deps.py
(23.86 KB)
📄
meta2deps.sh
(9.43 KB)
📄
mk-files.txt
(14.24 KB)
📄
mkopt.sh
(2.31 KB)
📄
nls.mk
(802 B)
📄
obj.mk
(2.15 KB)
📄
options.mk
(2.61 KB)
📄
own.mk
(5.85 KB)
📄
prlist.mk
(907 B)
📄
prog.mk
(5.28 KB)
📄
progs.mk
(2.23 KB)
📄
rst2htm.mk
(1.53 KB)
📄
scripts.mk
(2.4 KB)
📄
srctop.mk
(1.66 KB)
📄
stage-install.sh
(2.85 KB)
📄
subdir.mk
(2.2 KB)
📁
sys
📄
sys.clean-env.mk
(3.56 KB)
📄
sys.debug.mk
(1.19 KB)
📄
sys.dependfile.mk
(2.08 KB)
📄
sys.mk
(3.55 KB)
📄
sys.vars.mk
(2.91 KB)
📄
target-flags.mk
(1.55 KB)
📄
warnings.mk
(4.12 KB)
📄
whats.mk
(1.99 KB)
📄
yacc.mk
(1.38 KB)
Editing: sys.clean-env.mk
# $Id: sys.clean-env.mk,v 1.23 2020/08/19 17:51:53 sjg Exp $ # # @(#) Copyright (c) 2009, Simon J. Gerraty # # This file is provided in the hope that it will # be of use. There is absolutely NO WARRANTY. # Permission to copy, redistribute or otherwise # use this file is hereby granted provided that # the above copyright notice and this notice are # left intact. # # Please send copies of changes and bug-fixes to: # sjg@crufty.net # # This makefile would normally be included by sys.env.mk # The variables used by this makefile include: # # MAKE_ENV_SAVE_VAR_LIST # The actuall list of variables from the environment that will be # preserved. # MAKE_ENV_SAVE_PREFIX_LIST # A list of prefixes to match against the environment - the results # are added to MAKE_ENV_SAVE_VAR_LIST after being filtered by... # MAKE_ENV_SAVE_EXCLUDE_LIST # A list of words or patterns which is turned into a list of :N # modifiers. .if ${.MAKE.LEVEL} == 0 && ${MAKE_VERSION} >= 20100606 # We save any env var that starts with the words in MAKE_ENV_SAVE_PREFIX_LIST. # This gets expanded to an egrep expression like '^(A|B|C...)' # and added to MAKE_ENV_SAVE_VAR_LIST below. # If any of these end up being too greedy, MAKE_ENV_SAVE_EXCLUDE_LIST # can be used to filter. MAKE_ENV_SAVE_PREFIX_LIST += \ CCACHE \ CVS \ DEBUG \ DISTCC \ HOST \ MACHINE \ MAKE \ MK \ NEED_ \ SB_ \ SSH \ SVN \ USE_ \ WITH_ \ WITHOUT_ \ # This could be a list of vars or patterns to explicitly exclude. MAKE_ENV_SAVE_EXCLUDE_LIST ?= _ # This is the actual list that we will save # HOME is probably something worth clobbering eg. # HOME=/var/empty MAKE_ENV_SAVE_VAR_LIST += \ HOME \ LOGNAME \ OBJROOT \ OBJTOP \ PATH \ SB \ SRCTOP \ USER \ ${_env_vars:${MAKE_ENV_SAVE_EXCLUDE_LIST:${M_ListToSkip}}} _env_vars != env | egrep '^(${MAKE_ENV_SAVE_PREFIX_LIST:ts|})' | sed 's,=.*,,'; echo _export_list = .for v in ${MAKE_ENV_SAVE_VAR_LIST:O:u} .if defined($v) _export_list += $v # Save current value $v := ${$v} .endif .endfor # Now, clobber the environment .unexport-env # This is a list of vars that we handle specially below _tricky_env_vars = MAKEOBJDIR OBJTOP # Export our selection - sans tricky ones .export ${_export_list:${_tricky_env_vars:${M_ListToSkip}}} # This next bit may need tweaking # if you don't happen to like the way I set it. .if defined(MAKEOBJDIR) # We are going to set this to the equivalent of the shell's # MAKEOBJDIR='${.CURDIR:S,${SRCTOP},${OBJTOP},}' _srctop := ${SRCTOP:U${SB_SRC:U${SB}/src}} _objroot := ${OBJROOT:U${SB_OBJROOT:U${SB}/${SB_OBJPREFIX}}} .if ${MAKE_VERSION} < 20160218 _objtop := ${OBJTOP:U${_objroot}${MACHINE}} # Take care of ${MACHINE} .if ${MACHINE:Nhost*} == "" || ${OBJTOP} == ${HOST_OBJTOP:Uno} OBJTOP = ${_objtop:S,${HOST_TARGET}$,\${MACHINE},} .else OBJTOP = ${_objtop:S,${MACHINE}$,\${MACHINE},} .endif # Export like this MAKEOBJDIR = $${.CURDIR:S,${_srctop},$${OBJTOP},} #.info ${MAKE_SAVE_ENV_VARS _srctop _objroot _objtop OBJTOP MAKEOBJDIR:L:@v@${.newline}$v=${$v}@} # Export these as-is, and do not track... # otherwise the environment will be ruined when we evaluate them below. .export-env ${_tricky_env_vars} # Now evaluate for ourselves .for v in ${_tricky_env_vars} $v := ${$v} .endfor .else # we cannot use the '$$' trick, anymore # but we can export a literal (unexpanded) value SRCTOP := ${_srctop} OBJROOT := ${_objroot} OBJTOP = ${OBJROOT}${MACHINE} MAKEOBJDIR = ${.CURDIR:S,${SRCTOP},${OBJTOP},} .export-literal SRCTOP OBJROOT ${_tricky_env_vars} .endif #.info ${_tricky_env_vars:@v@${.newline}$v=${$v}@} #showenv: # @env | egrep 'OBJ|SRC' .endif # MAKEOBJDIR .endif # level 0
Upload File
Create Folder