3 .if !target(__<bsd.symver.mk>__)
8 # Generate the version map given the version definitions
10 .if !defined(NO_SYMVER) && !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 .if exists(${.PARSEDIR}/${VERSION_GEN})
18 _vgen:= ${.PARSEDIR}/${VERSION_GEN}
20 .error ${VERSION_GEN} not found in ${.PARSEDIR}
23 # Run the symbol maps through the C preprocessor before passing
24 # them to the symbol version generator.
25 ${VERSION_MAP}: ${VERSION_DEF} ${_vgen} ${SYMBOL_MAPS}
26 cat ${SYMBOL_MAPS} | ${CPP} - - \
27 | awk -v vfile=${VERSION_DEF} -f ${_vgen} > ${.TARGET}
28 .endif # !empty(VERSION_DEF) && !empty(SYMBOL_MAPS)
29 .endif # !target(__<bsd.symver.mk>__)