xref: /titanic_51/usr/src/cmd/localedef/Makefile (revision bc09504ff1ed70f84c9713b732281f14a9ef49b2)
16b5e5868SGarrett D'Amore#
26b5e5868SGarrett D'Amore# This file and its contents are supplied under the terms of the
36b5e5868SGarrett D'Amore# Common Development and Distribution License ("CDDL"), version 1.0.
45aec55ebSGarrett D'Amore# You may only use this file in accordance with the terms of version
55aec55ebSGarrett D'Amore# 1.0 of the CDDL.
66b5e5868SGarrett D'Amore#
76b5e5868SGarrett D'Amore# A full copy of the text of the CDDL should have accompanied this
86b5e5868SGarrett D'Amore# source.  A copy of the CDDL is also available via the Internet at
96b5e5868SGarrett D'Amore# http://www.illumos.org/license/CDDL.
106b5e5868SGarrett D'Amore#
116b5e5868SGarrett D'Amore
126b5e5868SGarrett D'Amore#
1344fd9652SGarrett D'Amore# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
148f4fd638SAndrzej Szeszo# Copyright 2011 EveryCity Ltd. All rights reserved.
152da1cd3aSGarrett D'Amore# Copyright 2013 DEY Storage Systems, Inc.
167de0ac86SRobert Mustacchi# Copyright 2015 Joyent, Inc.
176b5e5868SGarrett D'Amore#
186b5e5868SGarrett D'Amore
196b5e5868SGarrett D'AmorePROG=localedef
206b5e5868SGarrett D'Amore
217de0ac86SRobert MustacchiNDIR=native
227de0ac86SRobert MustacchiNPROG=$(NDIR)/localedef
237de0ac86SRobert Mustacchi
246b5e5868SGarrett D'Amoreinclude ../Makefile.cmd
256b5e5868SGarrett D'Amore
266b5e5868SGarrett D'AmoreOBJS = 	charmap.o collate.o ctype.o messages.o monetary.o numeric.o time.o \
276b5e5868SGarrett D'Amore	scanner.o localedef.o wide.o parser.tab.o
28*bc09504fSGordon RossNOBJS = $(OBJS:%.o=native/%.o) native/avl.o native/mkdirp.o
296b5e5868SGarrett D'Amore
306b5e5868SGarrett D'AmoreHDRS	= localedef.h
316b5e5868SGarrett D'Amore
3267b886e0SDan McDonaldSRCS   = $(OBJS:%.o=%.c)
3367b886e0SDan McDonald
346b5e5868SGarrett D'AmoreCPPFLAGS	+= -I $(SRC)/lib/libc/port/locale
357de0ac86SRobert MustacchiNATIVE_CPPFLAGS	+= -I $(SRC)/lib/libc/port/locale
367014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-char-subscripts
377014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
387014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
396b5e5868SGarrett D'AmoreLDLIBS		+= -lgen
406b5e5868SGarrett D'AmoreLDLIBS 		+= -lavl
417de0ac86SRobert Mustacchi
42*bc09504fSGordon RossNATIVELDLIBS=
43*bc09504fSGordon Ross
446b5e5868SGarrett D'AmoreYFLAGS		= -d -b parser
457014882cSRichard Lowe
467de0ac86SRobert MustacchiCLEANFILES	= $(NOBJS) $(OBJS) parser.tab.c parser.tab.h
476b5e5868SGarrett D'AmoreCLEANFILES	+= \
48017c01f8SYuri Pankov		UTF-8.cm UTF-8.ct \
496b5e5868SGarrett D'Amore		8859-1.cm 8859-2.cm 8859-3.cm 8859-4.cm \
506b5e5868SGarrett D'Amore		8859-5.cm 8859-5.cm 8859-6.cm 8859-7.cm \
516b5e5868SGarrett D'Amore		8859-8.cm 8859-9.cm 8859-9.cm 8859-10.cm \
526b5e5868SGarrett D'Amore		8859-11.cm 8859-13.cm 8859-14.cm 8859-15.cm \
536b5e5868SGarrett D'Amore		8859-16.cm \
546b5e5868SGarrett D'Amore		KOI8-R.cm
557de0ac86SRobert MustacchiCLOBBERFILES	= $(PROG) $(NPROG) $(POFILE) \
56b6805bf7SGordon Ross		GB18030.cm UTF-8.cm
57b6805bf7SGordon Ross
586b5e5868SGarrett D'AmorePIFILES		= $(OBJS:%.o=%.i)
596b5e5868SGarrett D'AmorePOFILE		= localedef_cmd.po
606b5e5868SGarrett D'Amore
616b5e5868SGarrett D'AmoreISO8859_1_LOCALES	= \
626b5e5868SGarrett D'Amore		da_DK \
6368271d9eSJerry Jelinek		de_CH de_DE \
646b5e5868SGarrett D'Amore		en_AU en_CA en_GB en_NZ en_US \
6568271d9eSJerry Jelinek		es_AR es_BO es_CL es_CO es_EC es_ES es_GT es_MX es_NI es_PA \
666b5e5868SGarrett D'Amore		es_PE es_SV es_UY es_VE \
6768271d9eSJerry Jelinek		fr_CA fr_CH fr_FR \
686b5e5868SGarrett D'Amore		is_IS \
6968271d9eSJerry Jelinek		it_CH it_IT \
706b5e5868SGarrett D'Amore		sv_SE
716b5e5868SGarrett D'Amore
726b5e5868SGarrett D'AmoreISO8859_2_LOCALES	= \
736b5e5868SGarrett D'Amore		cs_CZ \
746b5e5868SGarrett D'Amore		hr_HR \
756b5e5868SGarrett D'Amore		hu_HU \
766b5e5868SGarrett D'Amore		pl_PL \
776b5e5868SGarrett D'Amore		sq_AL
786b5e5868SGarrett D'Amore
796b5e5868SGarrett D'AmoreISO8859_5_LOCALES	= \
806b5e5868SGarrett D'Amore		bg_BG \
816b5e5868SGarrett D'Amore		mk_MK \
826b5e5868SGarrett D'Amore		ru_RU
836b5e5868SGarrett D'Amore
845080145bSGarrett D'AmoreISO8859_6_LOCALES	=
856b5e5868SGarrett D'Amore
866b5e5868SGarrett D'AmoreISO8859_7_LOCALES	= \
876b5e5868SGarrett D'Amore		el_GR
886b5e5868SGarrett D'Amore
896b5e5868SGarrett D'AmoreISO8859_9_LOCALES	= \
906b5e5868SGarrett D'Amore		tr_TR
916b5e5868SGarrett D'Amore
926b5e5868SGarrett D'AmoreISO8859_11_LOCALES	= \
936b5e5868SGarrett D'Amore		th_TH
946b5e5868SGarrett D'Amore
956b5e5868SGarrett D'AmoreISO8859_13_LOCALES	= \
966b5e5868SGarrett D'Amore		lt_LT \
976b5e5868SGarrett D'Amore		lv_LV
986b5e5868SGarrett D'Amore
996b5e5868SGarrett D'AmoreISO8859_15_LOCALES	= \
1006b5e5868SGarrett D'Amore		ca_ES \
1016b5e5868SGarrett D'Amore		da_DK \
1026b5e5868SGarrett D'Amore		de_AT de_DE \
1036b5e5868SGarrett D'Amore		en_GB en_IE en_US \
1046b5e5868SGarrett D'Amore		es_ES \
1056b5e5868SGarrett D'Amore		fi_FI \
1066b5e5868SGarrett D'Amore		fr_BE fr_FR \
1076b5e5868SGarrett D'Amore		it_IT \
1086b5e5868SGarrett D'Amore		nl_BE nl_NL \
1096b5e5868SGarrett D'Amore		pt_PT \
1106b5e5868SGarrett D'Amore		sv_FI sv_SE
1116b5e5868SGarrett D'Amore
1126b5e5868SGarrett D'AmoreKOI8_R_LOCALES		= \
1136b5e5868SGarrett D'Amore		ru_RU
1146b5e5868SGarrett D'Amore
1152de57b5dSBruce YaoGB18030_LOCALES		= \
1162de57b5dSBruce Yao		zh_CN
1172de57b5dSBruce Yao
1186b5e5868SGarrett D'Amore#
1196b5e5868SGarrett D'Amore# All new locales should be in UTF-8 form.
1206b5e5868SGarrett D'Amore#
1216b5e5868SGarrett D'AmoreUTF_8_LOCALES		= \
1226b5e5868SGarrett D'Amore		af_ZA \
1236b5e5868SGarrett D'Amore		ar_AE ar_BH ar_DZ ar_EG ar_IQ ar_JO ar_KW ar_LB ar_LY ar_MA \
1246b5e5868SGarrett D'Amore		ar_OM ar_QA ar_SA ar_TN ar_YE \
1256b5e5868SGarrett D'Amore		as_IN \
1266b5e5868SGarrett D'Amore		az_AZ \
1276b5e5868SGarrett D'Amore		be_BY \
1286b5e5868SGarrett D'Amore		bg_BG \
1296b5e5868SGarrett D'Amore		bn_BD bn_IN \
1306b5e5868SGarrett D'Amore		bo_CN bo_IN \
1318f4fd638SAndrzej Szeszo		bs_BA \
1326b5e5868SGarrett D'Amore		ca_ES \
1336b5e5868SGarrett D'Amore		cs_CZ \
1346b5e5868SGarrett D'Amore		da_DK \
1356b5e5868SGarrett D'Amore		de_AT de_BE de_CH de_DE de_LI de_LU \
1366b5e5868SGarrett D'Amore		el_CY el_GR \
1376b5e5868SGarrett D'Amore		en_AU en_BW en_BZ en_CA en_GB en_HK en_IE en_IN en_JM en_MH \
1386b5e5868SGarrett D'Amore		en_MT en_NA en_NZ en_PH en_PK en_SG en_TT en_US en_ZA en_ZW \
1396b5e5868SGarrett D'Amore		es_AR es_BO es_CL es_CO es_CR es_DO es_EC es_ES es_GQ es_GT \
1406b5e5868SGarrett D'Amore		es_HN es_MX es_NI es_PA es_PE es_PR es_PY es_SV es_US es_UY \
1416b5e5868SGarrett D'Amore		es_VE \
1426b5e5868SGarrett D'Amore		et_EE \
1436b5e5868SGarrett D'Amore		fi_FI \
1446b5e5868SGarrett D'Amore		fil_PH \
1456b5e5868SGarrett D'Amore		fr_BE fr_CA fr_CF fr_CH fr_FR fr_GN fr_LU fr_MC fr_MG fr_ML \
1466b5e5868SGarrett D'Amore		fr_NE fr_SN \
1476b5e5868SGarrett D'Amore		ga_IE \
1486b5e5868SGarrett D'Amore		gu_IN \
1496b5e5868SGarrett D'Amore		he_IL \
1506b5e5868SGarrett D'Amore		hi_IN \
1516b5e5868SGarrett D'Amore		hr_HR \
1526b5e5868SGarrett D'Amore		hu_HU \
1536b5e5868SGarrett D'Amore		hy_AM \
1546b5e5868SGarrett D'Amore		id_ID \
1556b5e5868SGarrett D'Amore		ii_CN \
1566b5e5868SGarrett D'Amore		is_IS \
1576b5e5868SGarrett D'Amore		it_CH it_IT \
1586b5e5868SGarrett D'Amore		ja_JP \
1596b5e5868SGarrett D'Amore		ka_GE \
1606b5e5868SGarrett D'Amore		kk_KZ \
1619aa4b6ecSShampavman		km_KH \
1626b5e5868SGarrett D'Amore		kn_IN \
1636b5e5868SGarrett D'Amore		ko_KR \
1646b5e5868SGarrett D'Amore		kok_IN \
1656b5e5868SGarrett D'Amore		lt_LT \
1666b5e5868SGarrett D'Amore		lv_LV \
1676b5e5868SGarrett D'Amore		mk_MK \
1686b5e5868SGarrett D'Amore		ml_IN \
1696b5e5868SGarrett D'Amore		mn_CN mn_MN \
1706b5e5868SGarrett D'Amore		mr_IN \
1715b72c2c7SShampavman		ms_MY \
1726b5e5868SGarrett D'Amore		mt_MT \
1736b5e5868SGarrett D'Amore		ne_IN ne_NP \
1746b5e5868SGarrett D'Amore		nl_BE nl_NL \
1756b5e5868SGarrett D'Amore		nb_NO \
1766b5e5868SGarrett D'Amore		nn_NO \
1776b5e5868SGarrett D'Amore		or_IN \
1786b5e5868SGarrett D'Amore		pa_IN pa_PK \
1796b5e5868SGarrett D'Amore		pl_PL \
1806b5e5868SGarrett D'Amore		pt_BR pt_GW pt_MZ pt_PT \
1816b5e5868SGarrett D'Amore		ro_MD ro_RO \
1826b5e5868SGarrett D'Amore		ru_MD ru_RU ru_UA \
1836b5e5868SGarrett D'Amore		sa_IN \
1846b5e5868SGarrett D'Amore		si_LK \
1856b5e5868SGarrett D'Amore		sk_SK \
1868f4fd638SAndrzej Szeszo		sl_SI \
1876b5e5868SGarrett D'Amore		sq_AL \
18844fd9652SGarrett D'Amore		sr_BA sr_ME sr_RS \
1896b5e5868SGarrett D'Amore		sv_FI sv_SE \
1906b5e5868SGarrett D'Amore		ta_IN ta_LK \
1916b5e5868SGarrett D'Amore		te_IN \
1926b5e5868SGarrett D'Amore		th_TH \
1936b5e5868SGarrett D'Amore		tr_TR \
1946b5e5868SGarrett D'Amore		uk_UA \
1956b5e5868SGarrett D'Amore		ug_CN \
1966b5e5868SGarrett D'Amore		ur_IN ur_PK \
1976b5e5868SGarrett D'Amore		vi_VN \
198b599bd93SRobert Mustacchi		zh_CN zh_HK zh_MO zh_SG zh_TW \
199b599bd93SRobert Mustacchi		zz_AA
2006b5e5868SGarrett D'Amore
201017c01f8SYuri PankovUTF8SRCS	= $(UTF_8_LOCALES:%=data/%.UTF-8.src)
202017c01f8SYuri Pankov
2036b5e5868SGarrett D'AmoreLOCNAMES	= \
2046b5e5868SGarrett D'Amore		$(ISO8859_1_LOCALES:%=%.ISO8859-1) \
2056b5e5868SGarrett D'Amore		$(ISO8859_2_LOCALES:%=%.ISO8859-2) \
2066b5e5868SGarrett D'Amore		$(ISO8859_5_LOCALES:%=%.ISO8859-5) \
2076b5e5868SGarrett D'Amore		$(ISO8859_6_LOCALES:%=%.ISO8859-6) \
2086b5e5868SGarrett D'Amore		$(ISO8859_7_LOCALES:%=%.ISO8859-7) \
2096b5e5868SGarrett D'Amore		$(ISO8859_9_LOCALES:%=%.ISO8859-9) \
2106b5e5868SGarrett D'Amore		$(ISO8859_11_LOCALES:%=%.ISO8859-11) \
2116b5e5868SGarrett D'Amore		$(ISO8859_13_LOCALES:%=%.ISO8859-13) \
2126b5e5868SGarrett D'Amore		$(ISO8859_15_LOCALES:%=%.ISO8859-15) \
2136b5e5868SGarrett D'Amore		$(KOI8_R_LOCALES:%=%.KOI8-R) \
2142de57b5dSBruce Yao		$(GB18030_LOCALES:%=%.GB18030) \
2156b5e5868SGarrett D'Amore		$(UTF_8_LOCALES:%=%.UTF-8)
2166b5e5868SGarrett D'Amore
2176b5e5868SGarrett D'AmoreLOCDIRS		= $(LOCNAMES:%=locale/%)
2186b5e5868SGarrett D'Amore
2196b5e5868SGarrett D'AmoreSTAMPFILES	= $(LOCDIRS:%=%/stamp)
2206b5e5868SGarrett D'Amore
2216b5e5868SGarrett D'AmoreCATDIRS		= \
2226b5e5868SGarrett D'Amore		$(LOCDIRS:%=%/LC_COLLATE) \
2236b5e5868SGarrett D'Amore		$(LOCDIRS:%=%/LC_CTYPE) \
2246b5e5868SGarrett D'Amore		$(LOCDIRS:%=%/LC_MESSAGES) \
2256b5e5868SGarrett D'Amore		$(LOCDIRS:%=%/LC_MONETARY) \
2266b5e5868SGarrett D'Amore		$(LOCDIRS:%=%/LC_NUMERIC) \
2276b5e5868SGarrett D'Amore		$(LOCDIRS:%=%/LC_TIME)
2286b5e5868SGarrett D'Amore
2296b5e5868SGarrett D'AmoreDATA		= $(CATDIRS:%=%/LCL_DATA)
2306b5e5868SGarrett D'Amore
2316b5e5868SGarrett D'AmoreDCOLL		= LC_COLLATE/LCL_DATA
2326b5e5868SGarrett D'AmoreDCTYPE		= LC_CTYPE/LCL_DATA
2336b5e5868SGarrett D'AmoreDMSGS		= LC_MESSAGES/LCL_DATA
2346b5e5868SGarrett D'AmoreDMON		= LC_MONETARY/LCL_DATA
2356b5e5868SGarrett D'AmoreDNUM		= LC_NUMERIC/LCL_DATA
2366b5e5868SGarrett D'AmoreDTIME		= LC_TIME/LCL_DATA
2376b5e5868SGarrett D'Amore
2386b5e5868SGarrett D'AmoreROOTLOCDIRS	= $(LOCDIRS:%=$(ROOTLIB)/%)
2396b5e5868SGarrett D'AmoreROOTCATDIRS	= $(CATDIRS:%=$(ROOTLIB)/%)
2406b5e5868SGarrett D'AmoreROOTDATA	= $(DATA:%=$(ROOTLIB)/%)
2416b5e5868SGarrett D'Amore
242b599bd93SRobert Mustacchi#
243b599bd93SRobert Mustacchi# This is a list of locales that happen to have translations for them
244b599bd93SRobert Mustacchi# present in the gate.
245b599bd93SRobert Mustacchi#
246b599bd93SRobert MustacchiTRANSDIR	= translations
247b599bd93SRobert MustacchiTRANSLOCS	= \
248b599bd93SRobert Mustacchi		zz_AA.UTF-8
249b599bd93SRobert MustacchiTRANSMOS	= $(TRANSLOCS:%=$(TRANSDIR)/%.mo)
250b599bd93SRobert Mustacchi
251b599bd93SRobert MustacchiOSTMOFILE	= LC_MESSAGES/SUNW_OST_OSLIB.mo
252b599bd93SRobert Mustacchi
253b599bd93SRobert MustacchiPRIVTRANSLOCS	= \
254b599bd93SRobert Mustacchi		zz_AA.UTF-8
255b599bd93SRobert MustacchiPRIVFILE	= LC_MESSAGES/priv_names
256b599bd93SRobert Mustacchi
257b599bd93SRobert Mustacchi
258b599bd93SRobert MustacchiROOTTRANSLATIONS = $(TRANSLOCS:%=$(ROOTLIB)/locale/%/$(OSTMOFILE))
259b599bd93SRobert MustacchiROOTPRIVTRANS = $(PRIVTRANSLOCS:%=$(ROOTLIB)/locale/%/$(PRIVFILE))
260b599bd93SRobert Mustacchi
2616b5e5868SGarrett D'Amore$(ROOTDATA)	:= FILEMODE=0444
2626b5e5868SGarrett D'Amore
2636b5e5868SGarrett D'Amoreall: $(PROG) $(DATA)
2646b5e5868SGarrett D'Amore
265b599bd93SRobert Mustacchitranslate: $(ROOTTRANSLATIONS) $(ROOTPRIVTRANS)
266b599bd93SRobert Mustacchi
267b599bd93SRobert Mustacchiinstall: all $(ROOTPROG) $(ROOTDATA) $(ROOTTRANSLATIONS) $(ROOTPRIVTRANS)
2686b5e5868SGarrett D'Amore
2697de0ac86SRobert Mustacchi$(NDIR):
2707de0ac86SRobert Mustacchi	mkdir $@
2717de0ac86SRobert Mustacchi
2727de0ac86SRobert Mustacchi$(NDIR)/%.o: %.c
2737de0ac86SRobert Mustacchi	$(NATIVECC) $(NATIVE_CFLAGS) $(NATIVE_CPPFLAGS) -o $@ -c $<
274*bc09504fSGordon Ross
275*bc09504fSGordon Ross$(NDIR)/avl.o : ../../common/avl/avl.c
276*bc09504fSGordon Ross	$(NATIVECC) $(NATIVE_CFLAGS) $(NATIVE_CPPFLAGS) -o $@ -c \
277*bc09504fSGordon Ross	  ../../common/avl/avl.c
278*bc09504fSGordon Ross
279*bc09504fSGordon Ross$(NDIR)/mkdirp.o : ../../lib/libgen/common/mkdirp.c
280*bc09504fSGordon Ross	$(NATIVECC) $(NATIVE_CFLAGS) $(NATIVE_CPPFLAGS) -o $@ -c \
281*bc09504fSGordon Ross	  ../../lib/libgen/common/mkdirp.c
2827de0ac86SRobert Mustacchi
2837de0ac86SRobert Mustacchi$(NPROG): $(NDIR) .WAIT $(NOBJS)
2847de0ac86SRobert Mustacchi	$(LINK.c) $(NOBJS) -o $@ $(NATIVELDLIBS)
2857de0ac86SRobert Mustacchi	$(POST_PROCESS)
2867de0ac86SRobert Mustacchi
2876b5e5868SGarrett D'Amore$(PROG): $(OBJS)
2886b5e5868SGarrett D'Amore	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
2896b5e5868SGarrett D'Amore	$(POST_PROCESS)
2906b5e5868SGarrett D'Amore
2917de0ac86SRobert Mustacchi$(OBJS) $(NOBJS):	parser.tab.h
2926b5e5868SGarrett D'Amore
2936b5e5868SGarrett D'Amoreparser.tab.c parser.tab.h: parser.y $(HDRS)
2946b5e5868SGarrett D'Amore	$(YACC) $(YFLAGS) parser.y
2956b5e5868SGarrett D'Amore
2966b5e5868SGarrett D'Amorelint:	$(SRCS)
2976b5e5868SGarrett D'Amore	$(LINT.c) $(CPPFLAGS) $(SRCS)
2986b5e5868SGarrett D'Amore
2996b5e5868SGarrett D'Amoreclean:
3006b5e5868SGarrett D'Amore	$(RM) $(CLEANFILES)
3016b5e5868SGarrett D'Amore	$(RM) $(STAMPFILES)
3026b5e5868SGarrett D'Amore
303b6805bf7SGordon Rossclobber: clean
304b6805bf7SGordon Ross	$(RM) $(CLOBBERFILES)
305b6805bf7SGordon Ross	$(RM) -r $(LOCDIRS)
3067de0ac86SRobert Mustacchi	$(RM) -r $(NDIR)
307b599bd93SRobert Mustacchi	$(RM) $(TRANSMOS)
308b6805bf7SGordon Ross
3096b5e5868SGarrett D'Amore$(POFILE):	$(PIFILES)
3106b5e5868SGarrett D'Amore	$(RM) $@
3116b5e5868SGarrett D'Amore	$(RM) messages.po
3126b5e5868SGarrett D'Amore	$(XGETTEXT) -s $(PIFILES)
3136b5e5868SGarrett D'Amore	$(SED) -e '/domain/d' messages.po > $@
3146b5e5868SGarrett D'Amore	$(RM) $(PIFILES) messages.po
3156b5e5868SGarrett D'Amore
3166b5e5868SGarrett D'Amorelocale $(ROOTLOCDIRS) $(ROOTCATDIRS):
3176b5e5868SGarrett D'Amore	$(INS.dir)
3186b5e5868SGarrett D'Amore
319b6805bf7SGordon Ross$(ROOTBIN)/%: $(ROOTBIN) %
320b6805bf7SGordon Ross	$(INS.file)
3216b5e5868SGarrett D'Amore
322017c01f8SYuri Pankov# Strip LC_CTYPE contents for UTF-8 locales and replace them
323017c01f8SYuri Pankov# with UTF-8.ct we compiled
324017c01f8SYuri Pankovlocale/%.UTF-8/stamp:		data/%.UTF-8.src UTF-8.cm \
3257de0ac86SRobert Mustacchi				UTF-8.ct locale $(NPROG)
326017c01f8SYuri Pankov	$(SED) '/^LC_CTYPE/,/^END LC_CTYPE/d;$$r UTF-8.ct' $< | \
3277de0ac86SRobert Mustacchi		./$(NPROG) -U -w data/widths.txt -f UTF-8.cm $(@D)
3286b5e5868SGarrett D'Amore	$(TOUCH) $@
32968271d9eSJerry Jelinek# Convert EURO_SIGN to CURRENCY_SIGN for the ISO8859-1 locales
3307de0ac86SRobert Mustacchilocale/%.ISO8859-1/stamp:	data/%.UTF-8.src 8859-1.cm locale $(NPROG)
33168271d9eSJerry Jelinek	sed 's/EURO_SIGN/CURRENCY_SIGN/' $< > $<.tmp
33268271d9eSJerry Jelinek	./$(NPROG) -U -w data/widths.txt -i $<.tmp -f 8859-1.cm $(@D)
33368271d9eSJerry Jelinek	rm -f $<.tmp
3346b5e5868SGarrett D'Amore	$(TOUCH) $@
3357de0ac86SRobert Mustacchilocale/%.ISO8859-2/stamp:	data/%.UTF-8.src 8859-2.cm locale $(NPROG)
3367de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f 8859-2.cm $(@D)
3376b5e5868SGarrett D'Amore	$(TOUCH) $@
3387de0ac86SRobert Mustacchilocale/%.ISO8859-5/stamp:	data/%.UTF-8.src 8859-5.cm locale $(NPROG)
3397de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f 8859-5.cm $(@D)
3406b5e5868SGarrett D'Amore	$(TOUCH) $@
3417de0ac86SRobert Mustacchilocale/%.ISO8859-7/stamp:	data/%.UTF-8.src 8859-7.cm locale $(NPROG)
3427de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f 8859-7.cm $(@D)
3436b5e5868SGarrett D'Amore	$(TOUCH) $@
3447de0ac86SRobert Mustacchilocale/%.ISO8859-6/stamp:	data/%.UTF-8.src 8859-6.cm locale $(NPROG)
3457de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f 8859-6.cm $(@D)
3466b5e5868SGarrett D'Amore	$(TOUCH) $@
3477de0ac86SRobert Mustacchilocale/%.ISO8859-9/stamp:	data/%.UTF-8.src 8859-9.cm locale $(NPROG)
3487de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f 8859-9.cm $(@D)
3496b5e5868SGarrett D'Amore	$(TOUCH) $@
3507de0ac86SRobert Mustacchilocale/%.ISO8859-11/stamp:	data/%.UTF-8.src 8859-11.cm locale $(NPROG)
3517de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f 8859-11.cm $(@D)
3526b5e5868SGarrett D'Amore	$(TOUCH) $@
3537de0ac86SRobert Mustacchilocale/%.ISO8859-13/stamp:	data/%.UTF-8.src 8859-13.cm locale $(NPROG)
3547de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f 8859-13.cm $(@D)
3556b5e5868SGarrett D'Amore	$(TOUCH) $@
3567de0ac86SRobert Mustacchilocale/%.ISO8859-15/stamp:	data/%.UTF-8.src 8859-15.cm locale $(NPROG)
3577de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f 8859-15.cm $(@D)
3586b5e5868SGarrett D'Amore	$(TOUCH) $@
3597de0ac86SRobert Mustacchilocale/%.KOI8-R/stamp:		data/%.UTF-8.src KOI8-R.cm locale $(NPROG)
3607de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f KOI8-R.cm $(@D)
3616b5e5868SGarrett D'Amore	$(TOUCH) $@
3627de0ac86SRobert Mustacchilocale/%.GB18030/stamp:		data/%.UTF-8.src GB18030.cm locale $(NPROG)
3637de0ac86SRobert Mustacchi	./$(NPROG) -U -w data/widths.txt -i $< -f GB18030.cm $(@D)
3642de57b5dSBruce Yao	$(TOUCH) $@
3656b5e5868SGarrett D'Amore
3666b5e5868SGarrett D'Amorelocale/%/$(DCOLL):	locale/%/stamp
3676b5e5868SGarrett D'Amorelocale/%/$(DCTYPE):	locale/%/stamp
3686b5e5868SGarrett D'Amorelocale/%/$(DMSGS):	locale/%/stamp
3696b5e5868SGarrett D'Amorelocale/%/$(DMON):	locale/%/stamp
3706b5e5868SGarrett D'Amorelocale/%/$(DNUM):	locale/%/stamp
3716b5e5868SGarrett D'Amorelocale/%/$(DTIME):	locale/%/stamp
3726b5e5868SGarrett D'Amore
3736b5e5868SGarrett D'AmoreUTF-8.cm: data/UTF-8.cm
3746b5e5868SGarrett D'Amore	$(LN) -sf data/UTF-8.cm  $@
3756b5e5868SGarrett D'Amore
376017c01f8SYuri PankovUTF-8.ct: $(UTF8SRCS)
377017c01f8SYuri Pankov	$(SH) data/ctype.sh $(UTF8SRCS) > $@
378017c01f8SYuri Pankov
3792de57b5dSBruce YaoGB18030.cm: data/GB18030.cm
3802de57b5dSBruce Yao	$(LN) -sf data/GB18030.cm  $@
3812de57b5dSBruce Yao
3826b5e5868SGarrett D'Amore%.cm: data/%.TXT UTF-8.cm
3836b5e5868SGarrett D'Amore	$(RM) $@
3846b5e5868SGarrett D'Amore	$(PERL) data/convert_map.pl $< > $@
3856b5e5868SGarrett D'Amore
3866b5e5868SGarrett D'Amore$(ROOTDATA):	$(ROOTLOCDIRS) $(ROOTCATDIRS) $(DATA)
3876b5e5868SGarrett D'Amore	$(RM) $@
3886b5e5868SGarrett D'Amore	$(CP) $(@:$(ROOTLIB)/%=%) $@
3896b5e5868SGarrett D'Amore	$(CHMOD) 0444 $@
390b599bd93SRobert Mustacchi
391b599bd93SRobert Mustacchi%.mo: %.po
392b599bd93SRobert Mustacchi	$(MSGFMT) -o $@ $<
393b599bd93SRobert Mustacchi
394b599bd93SRobert Mustacchi$(ROOTLIB)/locale/%/$(OSTMOFILE): $(TRANSDIR)/%.mo
395b599bd93SRobert Mustacchi	$(INS.rename)
396b599bd93SRobert Mustacchi	$(CHMOD) 0444 $@
397b599bd93SRobert Mustacchi
398b599bd93SRobert Mustacchi$(ROOTLIB)/locale/%/$(PRIVFILE): $(TRANSDIR)/%.priv
399b599bd93SRobert Mustacchi	$(INS.rename)
400b599bd93SRobert Mustacchi	$(CHMOD) 0444 $@
401