Merge pull request #5714 from alexischr/update_bockbuild
[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 for 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                         CalendarType.cs \
23                         Constants.cs \
24                         Patterns.cs \
25                          CultureInfoEntry.cs    \
26                          DateTimeFormatEntry.cs \
27                          NumberFormatEntry.cs   \
28                          RegionInfoEntry.cs     \
29                          TextInfoEntry.cs       \
30                          Entry.cs
31
32 EXTRA_DIST = $(locale_builder_sources) lcids.xml
33
34 locale-builder.exe: $(locale_builder_sources)
35         $(MCS) $(MCSFLAGS) /out:$@ $^
36
37 culture-table: locale-builder.exe locale-data
38         $(RUNTIME) locale-builder.exe
39
40 minimal: locale-builder.exe locale-data
41         $(RUNTIME) locale-builder.exe --locales '$(MINIMAL_LOCALES)'
42
43 locale-data:
44         if ! test -e CLDR/common/supplemental/supplementalData.xml ; then \
45                 curl http://www.unicode.org/Public/cldr/30.0.2/core.zip -o core.zip ; \
46                 unzip core.zip -d CLDR ; \
47         fi
48
49 install-culture-table: culture-info-tables.h
50         cp -f culture-info-tables.h ../../mono/metadata/.
51