__aeabi_ldivmod: fix sign logic
[minix.git] / usr.bin / nvi / catalog / Makefile
blob6a3cbecb784205d19e470187455efb1995725be3
1 # $NetBSD: Makefile,v 1.6 2008/10/25 22:27:39 apb Exp $
3 # @(#)Makefile 8.29 (Berkeley) 10/19/96
5 NOMAN= # defined
7 .include "../Makefile.inc"
9 .PATH: ${DIST}/catalog
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
14 FILES= ${CATALOG}
15 FILESDIR= /usr/share/nvi/catalog
17 HOSTPROG= dump
18 SRCS= dump.c
20 CLEANFILES+= ${CATALOG} english.base *.check __ck1 __ck2
22 realall: ${CATALOG}
24 ${CATALOG}: ${CATALOG:S/$/.base/}
25 @echo "... $@"; \
26 rm -f $@; \
27 if test -f $@.base; then \
28 f=$@.base; \
29 else \
30 f=${DIST}/catalog/$@.base; \
31 fi; \
32 sort -u $$f | \
33 ${TOOL_AWK} '{ \
34 if ($$1 == 1) { \
35 print "\nMESSAGE NUMBER 1 IS NOT LEGAL"; \
36 exit 1; \
37 } \
38 if (++nline > $$1) { \
39 print "DUPLICATE MESSAGE NUMBER " $$1; \
40 exit 1; \
41 } \
42 for (; nline < $$1; ++nline) \
43 print ""; \
44 print $0; \
45 }' | \
46 ${TOOL_SED} -e '1s/^/VI_MESSAGE_CATALOG/' \
47 -e '/"/s/^[^"]*"//' \
48 -e '1!s/"$$/X/' > $@; \
49 if grep DUPLICATE $@ > /dev/null; then \
50 grep DUPLICATE $@; \
51 fi; \
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
58 check: ${CHK}
59 ${CHK}: ${CATALOG}
60 @echo "... $@"; \
61 f=${DIST}/catalog/`basename $@ .check`; \
62 (echo "Unused message id's (this is okay):"; \
63 ${TOOL_AWK} '{ \
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!):"; \
77 for j in \
78 `${TOOL_SED} '/^$$/d' < $$f.base | sort -u | \
79 ${TOOL_AWK} '{print $$1}' | uniq -d`; do \
80 egrep $$j $$f.base; \
81 done; \
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
93 ${_MKTARGET_CREATE}
94 ./dump ${VI_FILES} |\
95 ${TOOL_SED} -e '/|/!d' \
96 -e 's/|/ "/' \
97 -e 's/^"//' \
98 -e 's/\\"/"/g' |\
99 sort -n > $@
101 .include <bsd.hostprog.mk>