3 .if
!target
(__
<bsd.symver.mk
>__
)
8 # Generate the version map given the version definitions
10 .if
${MK_SYMVER} == "yes" && !empty
(VERSION_DEF
) && !empty
(SYMBOL_MAPS
)
11 # Find the awk script that generates the version map.
12 VERSION_GEN?
= version_gen.awk
13 VERSION_MAP?
= Version.map
15 CLEANFILES
+= ${VERSION_MAP}
17 # Compute the make's -m path.
20 .for _arg in
${.MAKEFLAGS
}
26 _mpath
+= /usr
/share
/mk
28 # Look up ${VERSION_GEN} in ${_mpath}.
30 .for path in
${_mpath}
32 .if exists
(${path}/${VERSION_GEN})
33 _vgen
= ${path}/${VERSION_GEN}
38 .error
${VERSION_GEN} not found in the search path.
41 # Run the symbol maps through the C preprocessor before passing
42 # them to the symbol version generator.
43 ${VERSION_MAP}: ${VERSION_DEF} ${_vgen} ${SYMBOL_MAPS}
44 cat
${SYMBOL_MAPS} |
${CPP} - - \
45 | awk
-v vfile
=${VERSION_DEF} -f
${_vgen} > ${.TARGET
}
46 .
endif # !empty(VERSION_DEF) && !empty(SYMBOL_MAPS)
47 .
endif # !target(__<bsd.symver.mk>__)