xref: /freebsd/usr.bin/m4/Makefile (revision ecebb3cc1d2d074defc302d8ae6820bb6b20d4fe)
188497f0cSBaptiste Daroussin#	$OpenBSD: Makefile,v 1.13 2014/05/12 19:11:19 espie Exp $
2acc9d408SJuli Mallett# $FreeBSD$
39b50d902SRodney W. Grimes
49b50d902SRodney W. Grimes# -DEXTENDED
59b50d902SRodney W. Grimes# 	if you want the paste & spaste macros.
69b50d902SRodney W. Grimes
7c6063d0dSWarner Losh.include <src.opts.mk>
83a92d97fSJulio Merino
99b50d902SRodney W. GrimesPROG=	m4
10a35f04fbSWarner LoshCFLAGS+=-DEXTENDED -I${.CURDIR} -I${SRCTOP}/lib/libopenbsd
11d031bd19SBaptiste DaroussinLIBADD=	m openbsd
127e659f94SEd Schouten
137e659f94SEd SchoutenNO_WMISSING_VARIABLE_DECLARATIONS=
14acc9d408SJuli Mallett
155bb9250eSAlex RichardsonSRCS=	eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y
165bb9250eSAlex Richardson.if target(bootstrap_m4_tokenizer)
175bb9250eSAlex Richardson# When crossbuilding on non-FreeBSD we need to first build m4 with pre-generated
185bb9250eSAlex Richardson# tokenizer files and the build the real m4 once we have lex+yacc.
195bb9250eSAlex RichardsonSRCS+=	tokenizer.c
205bb9250eSAlex Richardson.else
215bb9250eSAlex RichardsonSRCS+=	tokenizer.l
225bb9250eSAlex Richardson.endif
23a841e1ebSBaptiste Daroussin
245bb9250eSAlex RichardsonGENFILES=	tokenizer.c parser.c parser.h
25*ecebb3ccSKyle EvansWARNS?=	3
26d5777986SBaptiste Daroussin
27a841e1ebSBaptiste Daroussintokenizer.o: parser.h
28a841e1ebSBaptiste Daroussin
295bb9250eSAlex RichardsonCLEANFILES+=	parser.c parser.h tokenizer.o tokenizer.c
309b50d902SRodney W. Grimes
31d511b20aSEnji CooperHAS_TESTS=
324b330699SEnji CooperSUBDIR.${MK_TESTS}+= tests
333a92d97fSJulio Merino
349b50d902SRodney W. Grimes.include <bsd.prog.mk>
35