1#         $NetBSD: Makefile,v 1.41 2024/08/23 09:06:37 wiz Exp $
2#         @(#)Makefile        8.1 (Berkeley) 6/8/93
3
4FILES=    NetBSD.el acronyms acronyms-o acronyms.comp airport ascii \
5          birthtoken bsd-family-tree \
6          country domains dot.clang-format operator \
7          eqnchar flowers indent.pro inter.phone language man.template \
8          mdoc.template na.phone na.postal style zipcodes
9FILESDIR=${BINDIR}/misc
10
11# TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, RUN 'make' with
12# "INSTALL_OFFENSIVE_FORTUNES=NO", or set "INSTALL_OFFENSIVE_FORTUNES=NO"
13# IN bsd.own.mk OR /etc/mk.conf.
14
15INSTALL_OFFENSIVE_FORTUNES?=    YES
16.if (${INSTALL_OFFENSIVE_FORTUNES} == "YES")
17TYPE=     real
18.else
19TYPE=     fake
20.endif
21CLEANFILES+=acronyms-o
22FILESBUILD_acronyms-o=yes
23
24# According to iana@ISI.EDU, the URL below is the authoritative list
25# distributed by the ISO 3166 Maintenance Agency.
26DOMAIN_URL=         https://www.iana.org/domains/root/db
27update-domains:
28          ( \
29            echo '# $$''NetBSD''$$' ;  \
30            echo '# ISO 3166 country codes, from ${DOMAIN_URL}' ; \
31            echo '# Last update:' `date` ; \
32            echo '#' ; \
33            ftp -o - ${DOMAIN_URL} \
34            | ${TOOL_SED} -f ${.CURDIR}/nanpa.sed \
35            | ${TOOL_SED} '/^\..*/!d' \
36            | ${TOOL_SED} 's/"/\"/g' \
37            | ${TOOL_AWK} 'BEGIN{FS=":"} {print $$1 " " $$3}' \
38           ) > domains ; \
39
40update-na.phone:
41          < /dev/null ${TOOL_AWK} -f nanpa.awk > na.phone
42
43update-country:
44          ${.CURDIR}/make.country > country
45
46
47.include <bsd.prog.mk>
48
49acronyms-o: acronyms-o.${TYPE}
50          @cp ${.ALLSRC} ${.TARGET}
51