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