]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/build/bootstrap-m4/Makefile
Use __containerof() instead of home-rolled versions.
[FreeBSD/FreeBSD.git] / tools / build / bootstrap-m4 / Makefile
1 # $FreeBSD$
2
3 # Build a bootstrap version of m4 (needed in order to build libelf and lex)
4 .PATH: ${SRCTOP}/usr.bin/m4 ${.CURDIR}
5
6 # Avoid using lex or yacc to generate sources
7 LEX:=/this/should/not/be/used
8
9 tokenizer.c: bootstrap_m4_tokenizer
10         test -e ${.TARGET}
11
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
14 # the other Makefile.
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} ; \
20         }
21 .endfor
22
23 BINDIR= /usr/bin
24 .include "${SRCTOP}/usr.bin/m4/Makefile"
25
26 regen:
27         (cd ${SRCTOP}/usr.bin/m4 && lex -t ${SRCTOP}/usr.bin/m4/tokenizer.l) | grep -v '#line' > inittokenizer.c