New test.
[mono.git] / tools / locale-builder / Makefile.am
1
2 MCS = mcs
3 RUNTIME = mono
4 MCSFLAGS = -debug+
5 # To build a reduced mono runtime with support only for some locales, # run:
6 #       make minimal
7 # To build with a single locale (en_US), run:
8 #       make minimal MINIMAL_LOCALES=en_US
9 # MINIMAL_LOCALES is a regular expression over the filenames in locales.
10 # make minimal saves about 60 KB of the mono binary size.
11 # To create the tables fro all the supported locales, use:
12 #       make culture-table
13 # After make minimal or make culture-table, you need to run:
14 #       make install-culture-table
15 # to copy the needed files where the mono build will pick them up.
16
17 MINIMAL_LOCALES=en
18
19 CLEANFILES = locale-builder.exe culture-info-tables.h
20
21 locale_builder_sources = Driver.cs              \
22                          CultureInfoEntry.cs    \
23                          DateTimeFormatEntry.cs \
24                          NumberFormatEntry.cs   \
25                          RegionInfoEntry.cs     \
26                          TextInfoEntry.cs       \
27                          Entry.cs
28
29 supp_data_files = supp/ar_AE.xml supp/ar_EG.xml supp/ar_KW.xml supp/ar_MA.xml   \
30                  supp/ar_YE.xml supp/en_PH.xml supp/en_ZA.xml supp/th.xml       \
31                  supp/ar_IQ.xml supp/ar_LB.xml supp/ar_OM.xml supp/ar_TN.xml    \
32                  supp/en_US.xml supp/en_ZW.xml supp/ar_DZ.xml supp/ar_JO.xml    \
33                  supp/ar_QA.xml supp/ar.xml    supp/en_IE.xml supp/en.xml               \
34                  supp/ar_SY.xml supp/ar_BH.xml supp/en_CA.xml supp/ar_LY.xml    \
35                  supp/root.xml
36
37 EXTRA_DIST = $(locale_builder_sources) $(supp_data_files) lcids.xml supplementalData.xml textinfo.xml
38
39 locale-builder.exe: $(locale_builder_sources)
40         $(MCS) $(MCSFLAGS) /out:$@ $^
41
42 culture-table: locale-builder.exe lang-data locale-data
43         $(RUNTIME) locale-builder.exe
44
45 minimal: locale-builder.exe lang-data locale-data
46         $(RUNTIME) locale-builder.exe --locales '$(MINIMAL_LOCALES)'
47
48 lang-data:
49         if ! test -f langs/en.xml ; then \
50                 wget http://primates.ximian.com/~jackson/icu_langs.tar.gz ; \
51                 tar xzvf icu_langs.tar.gz ; \
52         fi
53
54 locale-data:
55         if ! test -f locales/en_US.xml ; then \
56                 wget http://primates.ximian.com/~jackson/icu_locales.tar.gz ; \
57                 tar xzvf icu_locales.tar.gz ; \
58         fi
59
60 install-culture-table: culture-info-tables.h
61         cp -f culture-info-tables.h ../../mono/metadata/.
62