summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/grep/Makefile
blob: e2ed9b451a54a0068ba6d8b8f4e3bc82f41c1dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#	$NetBSD: Makefile,v 1.21 2001/08/03 14:42:35 enami Exp $

.include <bsd.own.mk>

PROG=		grep
SRCS+=		grep.c dfa.c kwset.c obstack.c savedir.c getopt.c getopt1.c \
		search.c stpcpy.c regex.c grepmat.c
MAN=		grep.1

DIST=		${.CURDIR}/../../dist

CPPFLAGS+=	-DHAVE_CONFIG_H
CLEANFILES+=    ${PROG}.1 ${PROG}.info ${PROG}.cat1

LDADD+=		-lintl
DPADD+=		${LIBINTL}
CPPFLAGS+=	-I${DIST}/grep/src -I${.CURDIR}
CPPFLAGS+=	-DENABLE_NLS -DHAVE_LIBINTL_H=1 \
		-DGNULOCALEDIR=\"/usr/share/locale\" \
		-DLOCALE_ALIAS_PATH=\"/usr/share/locale:.\" \
		-DLOCALEDIR=\"/usr/share/locale\"
# libintl-less build should use this instead of the above lines
#CPPFLAGS+=	-I${DIST}/grep/src -I${.CURDIR}

.if ${MKNLS} != "no"
.for F in de.gmo el.gmo es.gmo fr.gmo ko.gmo nl.gmo no.gmo pl.gmo pt_BR.gmo \
	ru.gmo sl.gmo sv.gmo
FILES+=		${F}
FILESDIR_${F}=	/usr/share/locale/${F:.gmo=}/LC_MESSAGES
FILESNAME_${F}=	grep.mo
.endfor
.endif

TEXINFO=	grep.texi
INFOFLAGS=	-I${.CURDIR}/../../dist/grep/doc

MLINKS=	grep.1 egrep.1 \
	grep.1 fgrep.1
LINKS=	${BINDIR}/grep ${BINDIR}/egrep \
	${BINDIR}/grep ${BINDIR}/fgrep

.include <bsd.info.mk>
.include <bsd.prog.mk>

.PATH: ${DIST}/grep/doc ${DIST}/grep/intl ${DIST}/grep/po ${DIST}/grep/src