xref: /freebsd/usr.bin/m4/Makefile (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
188497f0cSBaptiste Daroussin#	$OpenBSD: Makefile,v 1.13 2014/05/12 19:11:19 espie Exp $
29b50d902SRodney W. Grimes
39b50d902SRodney W. Grimes# -DEXTENDED
49b50d902SRodney W. Grimes# 	if you want the paste & spaste macros.
59b50d902SRodney W. Grimes
6c6063d0dSWarner Losh.include <src.opts.mk>
73a92d97fSJulio Merino
89b50d902SRodney W. GrimesPROG=	m4
9a35f04fbSWarner LoshCFLAGS+=-DEXTENDED -I${.CURDIR} -I${SRCTOP}/lib/libopenbsd
10d031bd19SBaptiste DaroussinLIBADD=	m openbsd
117e659f94SEd Schouten
127e659f94SEd SchoutenNO_WMISSING_VARIABLE_DECLARATIONS=
13acc9d408SJuli Mallett
145bb9250eSAlex RichardsonSRCS=	eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y
155bb9250eSAlex Richardson.if target(bootstrap_m4_tokenizer)
165bb9250eSAlex Richardson# When crossbuilding on non-FreeBSD we need to first build m4 with pre-generated
175bb9250eSAlex Richardson# tokenizer files and the build the real m4 once we have lex+yacc.
185bb9250eSAlex RichardsonSRCS+=	tokenizer.c
195bb9250eSAlex Richardson.else
205bb9250eSAlex RichardsonSRCS+=	tokenizer.l
215bb9250eSAlex Richardson.endif
22a841e1ebSBaptiste Daroussin
235bb9250eSAlex RichardsonGENFILES=	tokenizer.c parser.c parser.h
24*ecebb3ccSKyle EvansWARNS?=	3
25d5777986SBaptiste Daroussin
26a841e1ebSBaptiste Daroussintokenizer.o: parser.h
27a841e1ebSBaptiste Daroussin
285bb9250eSAlex RichardsonCLEANFILES+=	parser.c parser.h tokenizer.o tokenizer.c
299b50d902SRodney W. Grimes
30d511b20aSEnji CooperHAS_TESTS=
314b330699SEnji CooperSUBDIR.${MK_TESTS}+= tests
323a92d97fSJulio Merino
339b50d902SRodney W. Grimes.include <bsd.prog.mk>
34