X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/blobdiff_plain/0465e1d385953232678697cd5c17964cf45eaf49..f3dd7aaa1d932bfe070ada30a2bcacd0d60f3680:/usr.bin/m4/Makefile diff --git a/usr.bin/m4/Makefile b/usr.bin/m4/Makefile index 16067650ec..8cc7535ffb 100644 --- a/usr.bin/m4/Makefile +++ b/usr.bin/m4/Makefile @@ -5,19 +5,32 @@ # if you want the paste & spaste macros. PROG= m4 -CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib +CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib -I. DPADD= ${LIBY} ${LIBL} ${LIBM} LDADD= -ly -ll -lm -SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y tokenizer.l +# m4 depends on lex which depends on m4. Jeeze, gimme a break! To break +# this loop we manually lex tokenizer.l and installed it in the source +# tree as manual_tokenizer.c. Now we can build m4 without needing lex. +# +# To regenerate manual_tokenizer.c rename manual_tokenizer.c to tokenizer.l +# and manual_tokenizer.o to tokenizer.o, build, copy tokenizer.c from the +# obj dir to manual_tokenizer.c here, and then adjust the Makefile back to +# using manual_tokenizer.c. +# +# A pox on whatever idiots who thought making lex depend on m4 was a good +# idea. m4 is such a piece of crap, nobody should be using it anymore. +# +SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y +SRCS+= manual_tokenizer.c .PATH: ${.CURDIR}/lib SRCS+= ohash_create_entry.c ohash_delete.c ohash_do.c ohash_entries.c \ ohash_enum.c ohash_init.c ohash_int.h ohash_interval.c \ ohash_lookup_interval.c ohash_lookup_memory.c ohash_qlookup.c \ ohash_qlookupi.c -tokenizer.o: parser.h +manual_tokenizer.o: parser.h -CLEANFILES+= parser.c parser.h tokenizer.o +CLEANFILES+= parser.c parser.h manual_tokenizer.o .include