# $BSDSUniX$ .if !target(____) ____: .include . if ${MK_FBSD_COMPAT} != "no" # Find the version map given the version definitions # and symbol maps then generate a header for aliasing symbols. . if ${MK_SYMVER} == "yes" && !empty(VERSION_DEF) && !empty(SYMBOL_MAPS) # Find the awk script that generates the version map. SYM_VERSION_GEN?= version_gen.awk SYM_VERSION_MAP?= Version.map FBSD_COMPAT_MAP?= freebsd_sym_compat_map.c CLEANFILES+= ${FBSD_COMPAT_MAP} SRCS+= ${FBSD_COMPAT_MAP} # Compute the make's -m path. _mpath= _oarg= . for _arg in ${.MAKEFLAGS} . if ${_oarg} == "-m" _mpath+= ${_arg} . endif _oarg= ${_arg} . endfor _mpath+= /usr/share/mk # Look up ${SYM_VERSION_GEN} in ${_mpath}. _vgen= . for path in ${_mpath} . if empty(_vgen) . if exists(${path}/${SYM_VERSION_GEN}) _vgen= ${path}/${SYM_VERSION_GEN} . endif . endif . endfor . if empty(_vgen) .error ${SYM_VERSION_GEN} not found in the search path. . endif ${FBSD_COMPAT_MAP}: ${VERSION_DEF} ${_vgen} ${SYMBOL_MAPS} cat ${SYMBOL_MAPS} | ${CPP} - - \ | awk -v vfile=${VERSION_DEF} -f ${_vgen} compat=1 > ${.TARGET} . endif # ${MK_SYMVER} == "yes" && !empty(SYM_VERSION_DEF) && !empty(SYMBOL_MAPS) . endif # ${MK_FBSD_COMPAT} != "no" .endif # !target(____)