blob: d65dece3fd157afdee87c9e161b4526058d1b47e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# $FreeBSD$
# Build a bootstrap version of m4 (needed in order to build libelf and lex)
.PATH: ${SRCTOP}/usr.bin/m4 ${.CURDIR}
# Avoid using lex or yacc to generate sources
LEX:=/this/should/not/be/used
tokenizer.c: bootstrap_m4_tokenizer
test -e ${.TARGET}
# This target is used as a marker in usr.bin/m4/Makefile to not add the
# lex and yacc includes. Therefore we must define it before including
# the other Makefile.
bootstrap_m4_tokenizer: inittokenizer.c
.for _f in tokenizer.c
@cmp -s ${.CURDIR}/init${_f} ${_f} || { \
echo "Bootstrapping ${_f}" ; \
${CP} ${.CURDIR}/init${_f} ${_f} ; \
}
.endfor
BINDIR= /usr/bin
.include "${SRCTOP}/usr.bin/m4/Makefile"
regen:
(cd ${SRCTOP}/usr.bin/m4 && lex -t ${SRCTOP}/usr.bin/m4/tokenizer.l) | grep -v '#line' > inittokenizer.c
|