1 # $NetBSD: Makefile,v 1.2 2013/11/22 16:11:08 christos 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
13 VI_FILES
= ${DIST}/cl
/*.c
${DIST}/common
/*.c \
14 ${DIST}/ex
/*.c
${DIST}/vi
/*.c
16 FILESDIR
= /usr
/share
/nvi
/catalog
21 CLEANFILES
+= ${CATALOG} english.base
*.
check __ck1 __ck2
25 ${CATALOG}: ${CATALOG
:S
/$/.base
/}
28 if
test -f
$@.base
; then \
31 f
=${DIST}/catalog
/$@.base
; \
36 print "\nMESSAGE NUMBER 1 IS NOT LEGAL"; \
39 if (++nline > $$1) { \
40 print "DUPLICATE MESSAGE NUMBER " $$1; \
43 for (; nline < $$1; ++nline) \
47 ${TOOL_SED} -e
'1s/^/VI_MESSAGE_CATALOG/' \
49 -e
'1!s/"$$/X/' > $@
; \
50 if grep DUPLICATE
$@
> /dev
/null
; then \
53 if grep
'NOT LEGAL' $@
> /dev
/null
; then \
54 grep
'NOT LEGAL' $@
; \
57 CHK
= dutch.
check english.
check french.
check german.
check \
58 ru_RU.KOI8-R.
check spanish.
check swedish.
check
62 f
=${DIST}/catalog
/`basename $@ .check`; \
63 (echo
"Unused message id's (this is okay):"; \
65 while (++nline < $$1) \
66 printf "%03d\n", nline; \
67 }' < ${DIST}/catalog
/$$f.base
; \
68 echo
=========================; \
69 echo
"MISSING ERROR MESSAGES (Please add!):"; \
70 ${TOOL_AWK} '{print $$1}' < $$f.base |
sort -u
> __ck1
; \
71 ${TOOL_AWK} '{print $$1}' < english.base |
sort -u
> __ck2
; \
72 comm
-13 __ck1 __ck2
; \
73 echo
=========================; \
74 echo
"Extra error messages (just delete them):"; \
75 comm
-23 __ck1 __ck2
; \
76 echo
=========================; \
77 echo
"MESSAGES WITH THE SAME MESSAGE ID's (FIX!):"; \
79 `${TOOL_SED} '/^$$/d' < $$f.base | sort -u | \
80 ${TOOL_AWK} '{print $$1}' | uniq -d`; do \
83 echo
=========================; \
84 echo
"Duplicate messages, both id and message (this is okay):"; \
85 ${TOOL_SED} '/^$$/d' < $$f.base |
sort | uniq
-c | \
86 ${TOOL_AWK} '$$1 != 1 { print $$0 }' |
sort -n
; \
87 echo
=========================; \
88 echo
"Duplicate messages, just message (this is okay):"; \
89 ${TOOL_SED} '/^$$/d' < $$f |
sort | uniq
-c | \
90 ${TOOL_AWK} '$$1 != 1 { print $$0 }' |
sort -n
; \
91 echo
=========================) > $@
93 english.base
: dump
${VI_FILES} #Makefile
96 ${TOOL_SED} -e
'/|/!d' \
102 .
include <bsd.hostprog.mk
>