1 # $NetBSD: Makefile,v 1.6 2008/10/25 22:27:39 apb Exp $
3 # @(#)Makefile 8.29 (Berkeley) 10/19/96
7 .
include "../Makefile.inc"
11 CATALOG
= dutch english french german ru_RU.KOI8-R spanish swedish
12 VI_FILES
= ${DIST}/cl
/*.c
${DIST}/common
/*.c \
13 ${DIST}/ex
/*.c
${DIST}/vi
/*.c
15 FILESDIR
= /usr
/share
/nvi
/catalog
20 CLEANFILES
+= ${CATALOG} english.base
*.
check __ck1 __ck2
24 ${CATALOG}: ${CATALOG
:S
/$/.base
/}
27 if
test -f
$@.base
; then \
30 f
=${DIST}/catalog
/$@.base
; \
35 print "\nMESSAGE NUMBER 1 IS NOT LEGAL"; \
38 if (++nline > $$1) { \
39 print "DUPLICATE MESSAGE NUMBER " $$1; \
42 for (; nline < $$1; ++nline) \
46 ${TOOL_SED} -e
'1s/^/VI_MESSAGE_CATALOG/' \
48 -e
'1!s/"$$/X/' > $@
; \
49 if grep DUPLICATE
$@
> /dev
/null
; then \
52 if grep
'NOT LEGAL' $@
> /dev
/null
; then \
53 grep
'NOT LEGAL' $@
; \
56 CHK
= dutch.
check english.
check french.
check german.
check \
57 ru_RU.KOI8-R.
check spanish.
check swedish.
check
61 f
=${DIST}/catalog
/`basename $@ .check`; \
62 (echo
"Unused message id's (this is okay):"; \
64 while (++nline < $$1) \
65 printf "%03d\n", nline; \
66 }' < ${DIST}/catalog
/$$f.base
; \
67 echo
=========================; \
68 echo
"MISSING ERROR MESSAGES (Please add!):"; \
69 ${TOOL_AWK} '{print $$1}' < $$f.base |
sort -u
> __ck1
; \
70 ${TOOL_AWK} '{print $$1}' < english.base |
sort -u
> __ck2
; \
71 comm
-13 __ck1 __ck2
; \
72 echo
=========================; \
73 echo
"Extra error messages (just delete them):"; \
74 comm
-23 __ck1 __ck2
; \
75 echo
=========================; \
76 echo
"MESSAGES WITH THE SAME MESSAGE ID's (FIX!):"; \
78 `${TOOL_SED} '/^$$/d' < $$f.base | sort -u | \
79 ${TOOL_AWK} '{print $$1}' | uniq -d`; do \
82 echo
=========================; \
83 echo
"Duplicate messages, both id and message (this is okay):"; \
84 ${TOOL_SED} '/^$$/d' < $$f.base |
sort | uniq
-c | \
85 ${TOOL_AWK} '$$1 != 1 { print $$0 }' |
sort -n
; \
86 echo
=========================; \
87 echo
"Duplicate messages, just message (this is okay):"; \
88 ${TOOL_SED} '/^$$/d' < $$f |
sort | uniq
-c | \
89 ${TOOL_AWK} '$$1 != 1 { print $$0 }' |
sort -n
; \
90 echo
=========================) > $@
92 english.base
: dump
${VI_FILES} #Makefile
95 ${TOOL_SED} -e
'/|/!d' \
101 .
include <bsd.hostprog.mk
>