3 # Build a bootstrap version of m4 (needed in order to build libelf and lex)
4 .PATH: ${SRCTOP}/usr.bin/m4 ${.CURDIR}
6 # Avoid using lex or yacc to generate sources
7 LEX:=/this/should/not/be/used
9 tokenizer.c: bootstrap_m4_tokenizer
12 # This target is used as a marker in usr.bin/m4/Makefile to not add the
13 # lex and yacc includes. Therefore we must define it before including
15 bootstrap_m4_tokenizer: inittokenizer.c
16 .for _f in tokenizer.c
17 @cmp -s ${.CURDIR}/init${_f} ${_f} || { \
18 echo "Bootstrapping ${_f}" ; \
19 ${CP} ${.CURDIR}/init${_f} ${_f} ; \
24 .include "${SRCTOP}/usr.bin/m4/Makefile"
27 (cd ${SRCTOP}/usr.bin/m4 && lex -t ${SRCTOP}/usr.bin/m4/tokenizer.l) | grep -v '#line' > inittokenizer.c