kern: Remove debug print
[dragonfly.git] / share / mk / bsd.symver.mk
blob29d347185b062935cc10b97610ac706ed3966fa4
1 # $FreeBSD$
3 .if !target(__<bsd.symver.mk>__)
4 __<bsd.symver.mk>__:
6 .include <bsd.init.mk>
8 # Generate the version map given the version definitions
9 # and symbol maps.
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}
19 .else
20 .error ${VERSION_GEN} not found in ${.PARSEDIR}
21 .endif
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>__)