buildworld - Attempt to fix m4 bootstrapping issue (2)
[dragonfly.git] / usr.bin / m4 / Makefile
CommitLineData
984263bc 1# $OpenBSD: Makefile,v 1.10 2002/04/26 13:13:41 espie Exp $
4afad3d8 2# $FreeBSD: src/usr.bin/m4/Makefile,v 1.14 2013/01/01 18:26:42 svnexp Exp $
984263bc
MD
3
4# -DEXTENDED
5# if you want the paste & spaste macros.
6
7PROG= m4
f3dd7aaa 8CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib -I.
4afad3d8
PA
9DPADD= ${LIBY} ${LIBL} ${LIBM}
10LDADD= -ly -ll -lm
984263bc 11
f3dd7aaa
MD
12# m4 depends on lex which depends on m4. Jeeze, gimme a break! To break
13# this loop we manually lex tokenizer.l and installed it in the source
14# tree as manual_tokenizer.c. Now we can build m4 without needing lex.
15#
16# To regenerate manual_tokenizer.c rename manual_tokenizer.c to tokenizer.l
17# and manual_tokenizer.o to tokenizer.o, build, copy tokenizer.c from the
18# obj dir to manual_tokenizer.c here, and then adjust the Makefile back to
19# using manual_tokenizer.c.
20#
21# A pox on whatever idiots who thought making lex depend on m4 was a good
22# idea. m4 is such a piece of crap, nobody should be using it anymore.
23#
24SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y
25SRCS+= manual_tokenizer.c
4afad3d8
PA
26.PATH: ${.CURDIR}/lib
27SRCS+= ohash_create_entry.c ohash_delete.c ohash_do.c ohash_entries.c \
28 ohash_enum.c ohash_init.c ohash_int.h ohash_interval.c \
29 ohash_lookup_interval.c ohash_lookup_memory.c ohash_qlookup.c \
30 ohash_qlookupi.c
31
f3dd7aaa 32manual_tokenizer.o: parser.h
4afad3d8 33
f3dd7aaa 34CLEANFILES+= parser.c parser.h manual_tokenizer.o
984263bc
MD
35
36.include <bsd.prog.mk>