summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authortv <tv@NetBSD.org>1999-02-11 17:26:22 +0000
committertv <tv@NetBSD.org>1999-02-11 17:26:22 +0000
commit585a9eb044776b5500a4cbbe0284239d5ab50366 (patch)
tree5a695a90f4f8799f3465a80ebb846634cc982d86 /gnu/usr.bin
parentd26f8b9b4b917c7111f6d6fb61db869b378d33b4 (diff)
Clean up, add locale files, and add Texinfo doc.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/grep/Makefile17
-rw-r--r--gnu/usr.bin/grep/Makefile.inc20
-rw-r--r--gnu/usr.bin/grep/common/Makefile26
-rw-r--r--gnu/usr.bin/grep/common/config.h2
-rw-r--r--gnu/usr.bin/grep/common/libintl.h3
5 files changed, 43 insertions, 25 deletions
diff --git a/gnu/usr.bin/grep/Makefile b/gnu/usr.bin/grep/Makefile
index 41bd77d1f90..6bacaf49995 100644
--- a/gnu/usr.bin/grep/Makefile
+++ b/gnu/usr.bin/grep/Makefile
@@ -1,8 +1,19 @@
-# $NetBSD: Makefile,v 1.9 1999/02/09 13:18:58 simonb Exp $
+# $NetBSD: Makefile,v 1.10 1999/02/11 17:26:22 tv Exp $
-SUBDIR+=common
-SUBDIR+=egrep fgrep grep
+SUBDIR= common egrep fgrep grep
all-egrep all-fgrep all-grep: all-common
+.for F in de.gmo el.gmo es.gmo fr.gmo ko.gmo nl.gmo no.gmo pl.gmo ru.gmo \
+ sl.gmo sv.gmo
+FILES+= ${F}
+FILESDIR_${F}= /usr/share/locale/${F:.gmo=}/LC_MESSAGES
+FILESNAME_${F}= grep.mo
+.endfor
+
+TEXINFO= grep.texi
+INFOFLAGS= -I${.CURDIR}/../../dist/grep/doc
+.PATH: ${.CURDIR}/../../dist/grep/doc ${.CURDIR}/../../dist/grep/po
+
+.include <bsd.info.mk>
.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/grep/Makefile.inc b/gnu/usr.bin/grep/Makefile.inc
index a365c5e14bf..f2b9086971d 100644
--- a/gnu/usr.bin/grep/Makefile.inc
+++ b/gnu/usr.bin/grep/Makefile.inc
@@ -1,16 +1,16 @@
-# $NetBSD: Makefile.inc,v 1.1 1999/02/09 13:18:58 simonb Exp $
+# $NetBSD: Makefile.inc,v 1.2 1999/02/11 17:26:22 tv Exp $
-DIST= ${.CURDIR}/../../../dist/grep
-.PATH: ${DIST}/src
-.PATH: ${DIST}/doc
+DIST= ${.CURDIR}/../../../dist
+.PATH: ${DIST}/grep/src ${DIST}/grep/doc
-#COBJDIR!= cd ${.CURDIR}/../common ; make print-objdir
-COBJDIR!=cd $(.CURDIR)/../common; \
- printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
+.if !make(print-objdir)
+LIBCOMMONDIR!= cd ${.CURDIR}/../common && ${MAKE} -s print-objdir
+.endif
-CPPFLAGS+=-I${.CURDIR}/../common
-DPADD+= ${COBJDIR}/libgrep.a
-LDADD+= -L${COBJDIR} -lgrep
+CPPFLAGS+= -I${.CURDIR}/../common -I${DIST}/grep/intl -DHAVE_CONFIG_H \
+ -DLOCALEDIR=\"/usr/share/locale\"
+DPADD+= ${LIBCOMMONDIR}/libcommon.a
+LDADD+= -L${LIBCOMMONDIR} -lcommon
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
diff --git a/gnu/usr.bin/grep/common/Makefile b/gnu/usr.bin/grep/common/Makefile
index 08def08b049..f2061bf7793 100644
--- a/gnu/usr.bin/grep/common/Makefile
+++ b/gnu/usr.bin/grep/common/Makefile
@@ -1,15 +1,19 @@
-# $NetBSD: Makefile,v 1.1 1999/02/09 13:19:14 simonb Exp $
+# $NetBSD: Makefile,v 1.2 1999/02/11 17:26:23 tv Exp $
-LIB= grep
-SRCS= grep.c dfa.c kwset.c obstack.c savedir.c getopt.c getopt1.c search.c
-SRCS+= stpcpy.c regex.c
-CPPFLAGS+=-DHAVE_CONFIG_H
+LIB= common
+SRCS= bindtextdom.c dcgettext.c dgettext.c gettext.c finddomain.c \
+ loadmsgcat.c localealias.c textdomain.c l10nflist.c \
+ explodename.c intl-compat.c
+SRCS+= grep.c dfa.c kwset.c obstack.c savedir.c getopt.c getopt1.c \
+ search.c stpcpy.c regex.c
+CPPFLAGS+= -DGNULOCALEDIR=\"/usr/share/locale\" \
+ -DLOCALE_ALIAS_PATH=\"/usr/share/locale:.\"
-NOLINT= yes
-NOPIC= yes
-NOPROFILE=yes
-
-# only needed during build - prevent installation of library
-libinstall::
+NOLINT=
+NOPIC=
+NOPROFILE=
+NOLINKLIB=
.include <bsd.lib.mk>
+
+.PATH: ${DIST}/grep/intl
diff --git a/gnu/usr.bin/grep/common/config.h b/gnu/usr.bin/grep/common/config.h
index 1eb008a99c3..692ab9647a4 100644
--- a/gnu/usr.bin/grep/common/config.h
+++ b/gnu/usr.bin/grep/common/config.h
@@ -61,7 +61,7 @@
/* #undef HAVE_STPCPY */
-/* #undef ENABLE_NLS */
+#define ENABLE_NLS 1
/* #undef HAVE_CATGETS */
diff --git a/gnu/usr.bin/grep/common/libintl.h b/gnu/usr.bin/grep/common/libintl.h
new file mode 100644
index 00000000000..3ad6ea84794
--- /dev/null
+++ b/gnu/usr.bin/grep/common/libintl.h
@@ -0,0 +1,3 @@
+/* $NetBSD: libintl.h,v 1.1 1999/02/11 17:26:23 tv Exp $ */
+
+#include <libgettext.h>