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# 13*44fd9652SGarrett D'Amore# Copyright 2011 Nexenta Systems, Inc. All rights reserved. 148f4fd638SAndrzej Szeszo# Copyright 2011 EveryCity Ltd. All rights reserved. 156b5e5868SGarrett D'Amore# 166b5e5868SGarrett D'Amore 176b5e5868SGarrett D'AmorePROG=localedef 186b5e5868SGarrett D'Amore 196b5e5868SGarrett D'Amoreinclude ../Makefile.cmd 206b5e5868SGarrett D'Amore 216b5e5868SGarrett D'AmoreOBJS = charmap.o collate.o ctype.o messages.o monetary.o numeric.o time.o \ 226b5e5868SGarrett D'Amore scanner.o localedef.o wide.o parser.tab.o 236b5e5868SGarrett D'Amore 246b5e5868SGarrett D'AmoreHDRS = localedef.h 256b5e5868SGarrett D'Amore 266b5e5868SGarrett D'AmoreSRCS = $(OBJS:%.o=%.c) 276b5e5868SGarrett D'Amore 286b5e5868SGarrett D'AmoreCPPFLAGS += -I $(SRC)/lib/libc/port/locale 296b5e5868SGarrett D'AmoreLDLIBS += -lgen 306b5e5868SGarrett D'AmoreLDLIBS += -lavl 316b5e5868SGarrett D'AmoreYFLAGS = -d -b parser 326b5e5868SGarrett D'AmoreCLEANFILES = $(OBJS) parser.tab.c parser.tab.h 336b5e5868SGarrett D'AmoreCLEANFILES += \ 346b5e5868SGarrett D'Amore UTF-8.cm \ 356b5e5868SGarrett D'Amore 8859-1.cm 8859-2.cm 8859-3.cm 8859-4.cm \ 366b5e5868SGarrett D'Amore 8859-5.cm 8859-5.cm 8859-6.cm 8859-7.cm \ 376b5e5868SGarrett D'Amore 8859-8.cm 8859-9.cm 8859-9.cm 8859-10.cm \ 386b5e5868SGarrett D'Amore 8859-11.cm 8859-13.cm 8859-14.cm 8859-15.cm \ 396b5e5868SGarrett D'Amore 8859-16.cm \ 406b5e5868SGarrett D'Amore KOI8-R.cm 416b5e5868SGarrett D'AmoreCLOBBERFILES = $(PROG) $(POFILE) $(DATA:%=locale/%) 426b5e5868SGarrett D'AmorePIFILES = $(OBJS:%.o=%.i) 436b5e5868SGarrett D'AmorePOFILE = localedef_cmd.po 446b5e5868SGarrett D'Amore 456b5e5868SGarrett D'AmoreISO8859_1_LOCALES = \ 466b5e5868SGarrett D'Amore da_DK \ 476b5e5868SGarrett D'Amore de_CH \ 486b5e5868SGarrett D'Amore en_AU en_CA en_GB en_NZ en_US \ 496b5e5868SGarrett D'Amore es_AR es_BO es_CL es_CO es_EC es_GT es_MX es_NI es_PA \ 506b5e5868SGarrett D'Amore es_PE es_SV es_UY es_VE \ 516b5e5868SGarrett D'Amore fr_CA fr_CH \ 526b5e5868SGarrett D'Amore is_IS \ 536b5e5868SGarrett D'Amore it_CH \ 546b5e5868SGarrett D'Amore sv_SE 556b5e5868SGarrett D'Amore 566b5e5868SGarrett D'AmoreISO8859_2_LOCALES = \ 576b5e5868SGarrett D'Amore cs_CZ \ 586b5e5868SGarrett D'Amore hr_HR \ 596b5e5868SGarrett D'Amore hu_HU \ 606b5e5868SGarrett D'Amore pl_PL \ 616b5e5868SGarrett D'Amore sq_AL 626b5e5868SGarrett D'Amore 636b5e5868SGarrett D'AmoreISO8859_5_LOCALES = \ 646b5e5868SGarrett D'Amore bg_BG \ 656b5e5868SGarrett D'Amore mk_MK \ 666b5e5868SGarrett D'Amore ru_RU 676b5e5868SGarrett D'Amore 686b5e5868SGarrett D'AmoreISO8859_6_LOCALES = \ 696b5e5868SGarrett D'Amore ar_EG 706b5e5868SGarrett D'Amore 716b5e5868SGarrett D'AmoreISO8859_7_LOCALES = \ 726b5e5868SGarrett D'Amore el_GR 736b5e5868SGarrett D'Amore 746b5e5868SGarrett D'AmoreISO8859_9_LOCALES = \ 756b5e5868SGarrett D'Amore tr_TR 766b5e5868SGarrett D'Amore 776b5e5868SGarrett D'AmoreISO8859_11_LOCALES = \ 786b5e5868SGarrett D'Amore th_TH 796b5e5868SGarrett D'Amore 806b5e5868SGarrett D'AmoreISO8859_13_LOCALES = \ 816b5e5868SGarrett D'Amore lt_LT \ 826b5e5868SGarrett D'Amore lv_LV 836b5e5868SGarrett D'Amore 846b5e5868SGarrett D'AmoreISO8859_15_LOCALES = \ 856b5e5868SGarrett D'Amore ca_ES \ 866b5e5868SGarrett D'Amore da_DK \ 876b5e5868SGarrett D'Amore de_AT de_DE \ 886b5e5868SGarrett D'Amore en_GB en_IE en_US \ 896b5e5868SGarrett D'Amore es_ES \ 906b5e5868SGarrett D'Amore fi_FI \ 916b5e5868SGarrett D'Amore fr_BE fr_FR \ 926b5e5868SGarrett D'Amore it_IT \ 936b5e5868SGarrett D'Amore nl_BE nl_NL \ 946b5e5868SGarrett D'Amore pt_PT \ 956b5e5868SGarrett D'Amore sv_FI sv_SE 966b5e5868SGarrett D'Amore 976b5e5868SGarrett D'AmoreKOI8_R_LOCALES = \ 986b5e5868SGarrett D'Amore ru_RU 996b5e5868SGarrett D'Amore 1006b5e5868SGarrett D'Amore# 1016b5e5868SGarrett D'Amore# All new locales should be in UTF-8 form. 1026b5e5868SGarrett D'Amore# 1036b5e5868SGarrett D'AmoreUTF_8_LOCALES = \ 1046b5e5868SGarrett D'Amore af_ZA \ 1056b5e5868SGarrett D'Amore ar_AE ar_BH ar_DZ ar_EG ar_IQ ar_JO ar_KW ar_LB ar_LY ar_MA \ 1066b5e5868SGarrett D'Amore ar_OM ar_QA ar_SA ar_TN ar_YE \ 1076b5e5868SGarrett D'Amore as_IN \ 1086b5e5868SGarrett D'Amore az_AZ \ 1096b5e5868SGarrett D'Amore be_BY \ 1106b5e5868SGarrett D'Amore bg_BG \ 1116b5e5868SGarrett D'Amore bn_BD bn_IN \ 1126b5e5868SGarrett D'Amore bo_CN bo_IN \ 1138f4fd638SAndrzej Szeszo bs_BA \ 1146b5e5868SGarrett D'Amore ca_ES \ 1156b5e5868SGarrett D'Amore cs_CZ \ 1166b5e5868SGarrett D'Amore da_DK \ 1176b5e5868SGarrett D'Amore de_AT de_BE de_CH de_DE de_LI de_LU \ 1186b5e5868SGarrett D'Amore el_CY el_GR \ 1196b5e5868SGarrett D'Amore en_AU en_BW en_BZ en_CA en_GB en_HK en_IE en_IN en_JM en_MH \ 1206b5e5868SGarrett D'Amore en_MT en_NA en_NZ en_PH en_PK en_SG en_TT en_US en_ZA en_ZW \ 1216b5e5868SGarrett D'Amore es_AR es_BO es_CL es_CO es_CR es_DO es_EC es_ES es_GQ es_GT \ 1226b5e5868SGarrett D'Amore es_HN es_MX es_NI es_PA es_PE es_PR es_PY es_SV es_US es_UY \ 1236b5e5868SGarrett D'Amore es_VE \ 1246b5e5868SGarrett D'Amore et_EE \ 1256b5e5868SGarrett D'Amore fi_FI \ 1266b5e5868SGarrett D'Amore fil_PH \ 1276b5e5868SGarrett D'Amore fr_BE fr_CA fr_CF fr_CH fr_FR fr_GN fr_LU fr_MC fr_MG fr_ML \ 1286b5e5868SGarrett D'Amore fr_NE fr_SN \ 1296b5e5868SGarrett D'Amore ga_IE \ 1306b5e5868SGarrett D'Amore gu_IN \ 1316b5e5868SGarrett D'Amore he_IL \ 1326b5e5868SGarrett D'Amore hi_IN \ 1336b5e5868SGarrett D'Amore hr_HR \ 1346b5e5868SGarrett D'Amore hu_HU \ 1356b5e5868SGarrett D'Amore hy_AM \ 1366b5e5868SGarrett D'Amore id_ID \ 1376b5e5868SGarrett D'Amore ii_CN \ 1386b5e5868SGarrett D'Amore is_IS \ 1396b5e5868SGarrett D'Amore it_CH it_IT \ 1406b5e5868SGarrett D'Amore ja_JP \ 1416b5e5868SGarrett D'Amore ka_GE \ 1426b5e5868SGarrett D'Amore kk_KZ \ 1436b5e5868SGarrett D'Amore kn_IN \ 1446b5e5868SGarrett D'Amore ko_KR \ 1456b5e5868SGarrett D'Amore kok_IN \ 1466b5e5868SGarrett D'Amore lt_LT \ 1476b5e5868SGarrett D'Amore lv_LV \ 1486b5e5868SGarrett D'Amore mk_MK \ 1496b5e5868SGarrett D'Amore ml_IN \ 1506b5e5868SGarrett D'Amore mn_CN mn_MN \ 1516b5e5868SGarrett D'Amore mr_IN \ 1525b72c2c7SShampavman ms_MY \ 1536b5e5868SGarrett D'Amore mt_MT \ 1546b5e5868SGarrett D'Amore ne_IN ne_NP \ 1556b5e5868SGarrett D'Amore nl_BE nl_NL \ 1566b5e5868SGarrett D'Amore nb_NO \ 1576b5e5868SGarrett D'Amore nn_NO \ 1586b5e5868SGarrett D'Amore or_IN \ 1596b5e5868SGarrett D'Amore pa_IN pa_PK \ 1606b5e5868SGarrett D'Amore pl_PL \ 1616b5e5868SGarrett D'Amore pt_BR pt_GW pt_MZ pt_PT \ 1626b5e5868SGarrett D'Amore ro_MD ro_RO \ 1636b5e5868SGarrett D'Amore ru_MD ru_RU ru_UA \ 1646b5e5868SGarrett D'Amore sa_IN \ 1656b5e5868SGarrett D'Amore si_LK \ 1666b5e5868SGarrett D'Amore sk_SK \ 1678f4fd638SAndrzej Szeszo sl_SI \ 1686b5e5868SGarrett D'Amore sq_AL \ 169*44fd9652SGarrett D'Amore sr_BA sr_ME sr_RS \ 1706b5e5868SGarrett D'Amore sv_FI sv_SE \ 1716b5e5868SGarrett D'Amore ta_IN ta_LK \ 1726b5e5868SGarrett D'Amore te_IN \ 1736b5e5868SGarrett D'Amore th_TH \ 1746b5e5868SGarrett D'Amore tr_TR \ 1756b5e5868SGarrett D'Amore uk_UA \ 1766b5e5868SGarrett D'Amore ug_CN \ 1776b5e5868SGarrett D'Amore ur_IN ur_PK \ 1786b5e5868SGarrett D'Amore vi_VN \ 1796b5e5868SGarrett D'Amore zh_CN zh_HK zh_MO zh_SG zh_TW 1806b5e5868SGarrett D'Amore 1816b5e5868SGarrett D'AmoreLOCNAMES = \ 1826b5e5868SGarrett D'Amore $(ISO8859_1_LOCALES:%=%.ISO8859-1) \ 1836b5e5868SGarrett D'Amore $(ISO8859_2_LOCALES:%=%.ISO8859-2) \ 1846b5e5868SGarrett D'Amore $(ISO8859_5_LOCALES:%=%.ISO8859-5) \ 1856b5e5868SGarrett D'Amore $(ISO8859_6_LOCALES:%=%.ISO8859-6) \ 1866b5e5868SGarrett D'Amore $(ISO8859_7_LOCALES:%=%.ISO8859-7) \ 1876b5e5868SGarrett D'Amore $(ISO8859_9_LOCALES:%=%.ISO8859-9) \ 1886b5e5868SGarrett D'Amore $(ISO8859_11_LOCALES:%=%.ISO8859-11) \ 1896b5e5868SGarrett D'Amore $(ISO8859_13_LOCALES:%=%.ISO8859-13) \ 1906b5e5868SGarrett D'Amore $(ISO8859_15_LOCALES:%=%.ISO8859-15) \ 1916b5e5868SGarrett D'Amore $(KOI8_R_LOCALES:%=%.KOI8-R) \ 1926b5e5868SGarrett D'Amore $(UTF_8_LOCALES:%=%.UTF-8) 1936b5e5868SGarrett D'Amore 1946b5e5868SGarrett D'AmoreLOCDIRS = $(LOCNAMES:%=locale/%) 1956b5e5868SGarrett D'Amore 1966b5e5868SGarrett D'AmoreSTAMPFILES = $(LOCDIRS:%=%/stamp) 1976b5e5868SGarrett D'Amore 1986b5e5868SGarrett D'AmoreCATDIRS = \ 1996b5e5868SGarrett D'Amore $(LOCDIRS:%=%/LC_COLLATE) \ 2006b5e5868SGarrett D'Amore $(LOCDIRS:%=%/LC_CTYPE) \ 2016b5e5868SGarrett D'Amore $(LOCDIRS:%=%/LC_MESSAGES) \ 2026b5e5868SGarrett D'Amore $(LOCDIRS:%=%/LC_MONETARY) \ 2036b5e5868SGarrett D'Amore $(LOCDIRS:%=%/LC_NUMERIC) \ 2046b5e5868SGarrett D'Amore $(LOCDIRS:%=%/LC_TIME) 2056b5e5868SGarrett D'Amore 2066b5e5868SGarrett D'AmoreDATA = $(CATDIRS:%=%/LCL_DATA) 2076b5e5868SGarrett D'Amore 2086b5e5868SGarrett D'AmoreDCOLL = LC_COLLATE/LCL_DATA 2096b5e5868SGarrett D'AmoreDCTYPE = LC_CTYPE/LCL_DATA 2106b5e5868SGarrett D'AmoreDMSGS = LC_MESSAGES/LCL_DATA 2116b5e5868SGarrett D'AmoreDMON = LC_MONETARY/LCL_DATA 2126b5e5868SGarrett D'AmoreDNUM = LC_NUMERIC/LCL_DATA 2136b5e5868SGarrett D'AmoreDTIME = LC_TIME/LCL_DATA 2146b5e5868SGarrett D'Amore 2156b5e5868SGarrett D'AmoreROOTLOCDIRS = $(LOCDIRS:%=$(ROOTLIB)/%) 2166b5e5868SGarrett D'AmoreROOTCATDIRS = $(CATDIRS:%=$(ROOTLIB)/%) 2176b5e5868SGarrett D'AmoreROOTDATA = $(DATA:%=$(ROOTLIB)/%) 2186b5e5868SGarrett D'Amore 2196b5e5868SGarrett D'Amore$(ROOTDATA) := FILEMODE=0444 2206b5e5868SGarrett D'Amore 2216b5e5868SGarrett D'Amoreall: $(PROG) $(DATA) 2226b5e5868SGarrett D'Amore 2236b5e5868SGarrett D'Amoreinstall: all $(ROOTPROG) $(ROOTDATA) 2246b5e5868SGarrett D'Amore 2256b5e5868SGarrett D'Amore$(PROG): $(OBJS) 2266b5e5868SGarrett D'Amore $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 2276b5e5868SGarrett D'Amore $(POST_PROCESS) 2286b5e5868SGarrett D'Amore 2296b5e5868SGarrett D'Amore$(OBJS): parser.tab.h 2306b5e5868SGarrett D'Amore 2316b5e5868SGarrett D'Amoreparser.tab.c parser.tab.h: parser.y $(HDRS) 2326b5e5868SGarrett D'Amore $(YACC) $(YFLAGS) parser.y 2336b5e5868SGarrett D'Amore 2346b5e5868SGarrett D'Amorelint: $(SRCS) 2356b5e5868SGarrett D'Amore $(LINT.c) $(CPPFLAGS) $(SRCS) 2366b5e5868SGarrett D'Amore 2376b5e5868SGarrett D'Amoreclean: 2386b5e5868SGarrett D'Amore $(RM) $(CLEANFILES) 2396b5e5868SGarrett D'Amore $(RM) $(STAMPFILES) 2406b5e5868SGarrett D'Amore 2416b5e5868SGarrett D'Amore$(POFILE): $(PIFILES) 2426b5e5868SGarrett D'Amore $(RM) $@ 2436b5e5868SGarrett D'Amore $(RM) messages.po 2446b5e5868SGarrett D'Amore $(XGETTEXT) -s $(PIFILES) 2456b5e5868SGarrett D'Amore $(SED) -e '/domain/d' messages.po > $@ 2466b5e5868SGarrett D'Amore $(RM) $(PIFILES) messages.po 2476b5e5868SGarrett D'Amore 2486b5e5868SGarrett D'Amorelocale $(ROOTLOCDIRS) $(ROOTCATDIRS): 2496b5e5868SGarrett D'Amore $(INS.dir) 2506b5e5868SGarrett D'Amore 2516b5e5868SGarrett D'Amoreinclude ../Makefile.targ 2526b5e5868SGarrett D'Amore 2536b5e5868SGarrett D'Amorelocale/%.UTF-8/stamp: data/%.UTF-8.src UTF-8.cm locale $(PROG) 2546b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f UTF-8.cm $(@D) 2556b5e5868SGarrett D'Amore $(TOUCH) $@ 2566b5e5868SGarrett D'Amorelocale/%.ISO8859-1/stamp: data/%.UTF-8.src 8859-1.cm locale $(PROG) 2576b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-1.cm $(@D) 2586b5e5868SGarrett D'Amore $(TOUCH) $@ 2596b5e5868SGarrett D'Amorelocale/%.ISO8859-2/stamp: data/%.UTF-8.src 8859-2.cm locale $(PROG) 2606b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-2.cm $(@D) 2616b5e5868SGarrett D'Amore $(TOUCH) $@ 2626b5e5868SGarrett D'Amorelocale/%.ISO8859-5/stamp: data/%.UTF-8.src 8859-5.cm locale $(PROG) 2636b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-5.cm $(@D) 2646b5e5868SGarrett D'Amore $(TOUCH) $@ 2656b5e5868SGarrett D'Amorelocale/%.ISO8859-7/stamp: data/%.UTF-8.src 8859-7.cm locale $(PROG) 2666b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-7.cm $(@D) 2676b5e5868SGarrett D'Amore $(TOUCH) $@ 2686b5e5868SGarrett D'Amorelocale/%.ISO8859-6/stamp: data/%.UTF-8.src 8859-6.cm locale $(PROG) 2696b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-6.cm $(@D) 2706b5e5868SGarrett D'Amore $(TOUCH) $@ 2716b5e5868SGarrett D'Amorelocale/%.ISO8859-9/stamp: data/%.UTF-8.src 8859-9.cm locale $(PROG) 2726b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-9.cm $(@D) 2736b5e5868SGarrett D'Amore $(TOUCH) $@ 2746b5e5868SGarrett D'Amorelocale/%.ISO8859-11/stamp: data/%.UTF-8.src 8859-11.cm locale $(PROG) 2756b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-11.cm $(@D) 2766b5e5868SGarrett D'Amore $(TOUCH) $@ 2776b5e5868SGarrett D'Amorelocale/%.ISO8859-13/stamp: data/%.UTF-8.src 8859-13.cm locale $(PROG) 2786b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-13.cm $(@D) 2796b5e5868SGarrett D'Amore $(TOUCH) $@ 2806b5e5868SGarrett D'Amorelocale/%.ISO8859-15/stamp: data/%.UTF-8.src 8859-15.cm locale $(PROG) 2816b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f 8859-15.cm $(@D) 2826b5e5868SGarrett D'Amore $(TOUCH) $@ 2836b5e5868SGarrett D'Amorelocale/%.KOI8-R/stamp: data/%.UTF-8.src KOI8-R.cm locale $(PROG) 2846b5e5868SGarrett D'Amore ./$(PROG) -U -i $< -f KOI8-R.cm $(@D) 2856b5e5868SGarrett D'Amore $(TOUCH) $@ 2866b5e5868SGarrett D'Amore 2876b5e5868SGarrett D'Amorelocale/%/$(DCOLL): locale/%/stamp 2886b5e5868SGarrett D'Amorelocale/%/$(DCTYPE): locale/%/stamp 2896b5e5868SGarrett D'Amorelocale/%/$(DMSGS): locale/%/stamp 2906b5e5868SGarrett D'Amorelocale/%/$(DMON): locale/%/stamp 2916b5e5868SGarrett D'Amorelocale/%/$(DNUM): locale/%/stamp 2926b5e5868SGarrett D'Amorelocale/%/$(DTIME): locale/%/stamp 2936b5e5868SGarrett D'Amore 2946b5e5868SGarrett D'AmoreUTF-8.cm: data/UTF-8.cm 2956b5e5868SGarrett D'Amore $(LN) -sf data/UTF-8.cm $@ 2966b5e5868SGarrett D'Amore 2976b5e5868SGarrett D'Amore%.cm: data/%.TXT UTF-8.cm 2986b5e5868SGarrett D'Amore $(RM) $@ 2996b5e5868SGarrett D'Amore $(PERL) data/convert_map.pl $< > $@ 3006b5e5868SGarrett D'Amore 3016b5e5868SGarrett D'Amore$(ROOTDATA): $(ROOTLOCDIRS) $(ROOTCATDIRS) $(DATA) 3026b5e5868SGarrett D'Amore $(RM) $@ 3036b5e5868SGarrett D'Amore $(CP) $(@:$(ROOTLIB)/%=%) $@ 3046b5e5868SGarrett D'Amore $(CHMOD) 0444 $@ 305